admin管理员组文章数量:1401133
Is there somebody that has experience using mongoose.js as Node.js mapper for Mongodb at high scale?
I am wondering if I should use the native driver, so I keep everything lightweight or to write a simple wrapper.
If anybody got some tips, advise thank you very much.
Is there somebody that has experience using mongoose.js as Node.js mapper for Mongodb at high scale?
I am wondering if I should use the native driver, so I keep everything lightweight or to write a simple wrapper.
If anybody got some tips, advise thank you very much.
Share Improve this question asked Aug 15, 2012 at 19:19 onlineracoononlineracoon 2,9705 gold badges48 silver badges66 bronze badges 2- 1 Pretty sure mongoose uses the native driver under the hood. mongoosejs./docs/api.html – Paul Commented Aug 15, 2012 at 19:32
- It does, and mongoose also makes it easy to directly use native calls when needed. – JohnnyHK Commented Aug 15, 2012 at 20:00
2 Answers
Reset to default 3A little late to the party some but according to this article Mongoose performs worse pared to the native MongoDB Node.js client. More or less Mongoose is slower (ops/sec) for every single metric collected (queries and inserts).
Source code with the benchmarks can be found here
Unless you really need an ORM\ODM I remended you don't use Mongoose at all.
It seems most people (including me, briefly) are you using Mongoose because the native driver's api is to cluncky and difficult to understand.
That's why I have switch to mongojs. Mongojs is a module that wraps the native driver but with much cleaner api that is almost identical to mongo shell.
I can't really ment on the scalability of Mongoose but mongojs is just that, a lightweight wrapper around the native driver.
本文标签: javascriptNodejs mongoose performanceStack Overflow
版权声明:本文标题:javascript - Node.js mongoose performance - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744194269a2594661.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论