Emulate Sequences in MongoDB
Interesting approach of emulating sequences with MongoDB, by hosting JavaScript code on the server side. Anyway, there’s a part that confused me:
This also isn’t the most efficient approach for high performance because db.eval() monopolizes mongod, so depending on the database usage pattern this could be pretty disruptive. On the other hand, this mongod behavior effectively acts as a lock and means calling this function will be atomic.
If we are to believe the above comment, it just means that executing a server side MongoDB function is blocking and that doesn’t really sound scalable at all. Not to mention that I thought they improved on this behavior with the MongoDB 1.4 release.
I’m wondering if anyone can clarify what is the behavior for server-side MongoDB functions.
via: http://shearic.blogspot.com/2010/04/mongodb-sequences.html