开发者

What is suggested way to have server-side hooks over mongodb?

开发者 https://www.devze.com 2023-03-11 08:17 出处:网络
MongoDB performs really well compared to our hacking of MySQL in de-normalized way. After database migration, I realized that we might need some server-side procedures to invoke after/before database

MongoDB performs really well compared to our hacking of MySQL in de-normalized way. After database migration, I realized that we might need some server-side procedures to invoke after/before database manipulation. Some sorta 3-tier architecture. I am just wondering the possible and easy开发者_运维问答 way to prototype it. Are there any light server-side hooks for mongodb, just like server-side hooks for svn, git?

ex, post-commit, pre-commit, ...


No, there are no features currently available in MongoDB equivalent to hooks or triggers. It'd be best to handle this sort of thing from within your application logic.


FWIW, one of the messages in the web UI seems to imply that some hooks do exist ("adding sharding hook to enable versioning and authentication to remote servers"), but they might be only avilable within the compiled binaries, not to clients.

0

精彩评论

暂无评论...
验证码 换一张
取 消