JaredHawkins / TweetGeoViz

Visualization tool to view tweets by location and content.
Apache License 2.0
25 stars 16 forks source link

Research and pick one of the Mongo connectors #68

Closed anvk closed 8 years ago

anvk commented 8 years ago

It looks like Monk is not good enough because you cannot detect if Mongo server is down. We should pick another connector instead.

carloscarcamo commented 8 years ago

From mongodb website we have this information: https://docs.mongodb.org/ecosystem/drivers/node-js/ Since almost all npm mongodb packages are built on top of the official Mongodb native driver, we have to choose between the native driver or another based on it which the most widely used are:

The most active of them is mongoose followed by Mongojs and Mongoskin which last commit was on october 2015.

I found another packages which look promising:

Mongoskin and mongojs api are closest to the native driver so we don't have to learn another api, mongoose in the other hand is a little different because we have to define schemas before using the all query api.

I think choosing the right NPM package will depend on the project, right now we are just doing a basic find query no inserts and updates at this moment, but maybe this will change in the future. I have used mongoose before and it's great, mongoskim and mongojs are great also.

If we want to use a ORM style we can choose mongoose, if not, we can go for mongoskin or mongojs

anvk commented 8 years ago

This is a great and thorough research. Great thanks @carloscarcamo I really appreciate it! You are totally right that we are just doing basic queries but picking a somewhat good library in the beginning can save us lots of pain down the road. I trust to your judgement to use mongoose especially since you have some expertise in it already... Let's go with mongoose for now.