本文介绍了Node.js猫鼬性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人有将Mongoose.js用作Mongodb的Node.js映射器的大规模经验?

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.

推荐答案

除非您真的需要ORM \ ODM,否则我建议您完全不要使用Mongoose.

Unless you really need an ORM\ODM I recommended you don't use Mongoose at all.

似乎大多数人(包括我在内)都在使用Mongoose,因为本机驱动程序的api很笨拙且难以理解.

It seems most people (including me, briefly) are you using Mongoose because the native driver's api is to cluncky and difficult to understand.

这就是为什么我切换到 mongojs 的原因.Mongojs是包装本机驱动程序的模块,但具有更清晰的api,几乎与mongo shell相同.

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.

我无法真正评论Mongoose的可伸缩性,但mongojs只是它,它是本机驱动程序的轻量级包装.

I can't really comment on the scalability of Mongoose but mongojs is just that, a lightweight wrapper around the native driver.

这篇关于Node.js猫鼬性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 18:09