7

I have been recently migrating all my apps to node.js, like it should be. And I have been using the mongojs driver, however I recently found that there is a mongodb driver. I was wondering, is there any difference between this two? Performance?

2
  • 2
    I would recommend the native node driver produced by mongodb themselves: github.com/mongodb/node-mongodb-native
    – Ari
    Jan 26, 2014 at 21:34
  • the driver itself says it's a "module for mongodb, that emulates the official mongodb API as much as possible." then I assume there's no difference between the 2 of them. and I still recommend the official driver.
    – yaoxing
    Jan 27, 2014 at 2:03

2 Answers 2

16

Mongojs is just simpler in its usage, because some functions and are wrapped and easier to call.

It doesn't affect the performance, but theoretically its a bit slower, because there is an additional function call.

You are good using Node.js and the native driver. For starters and cleaner code mongojs is a good option.

2
  • Good, that is the information I needed. I am going to run a couple of benchmarks and compare this two.
    – David
    Jan 30, 2014 at 1:05
  • I haven't done any benchmarks, but I would be surprised if there was more than 1% difference in performance between those two.
    – Capaj
    Dec 5, 2015 at 22:00
1

MongoJS, is more easy, simple and the final result is not slow.

For the last years i'm using only MongoJS for build API's, with millions of transactions per hour, without problems.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.