PouchDB/CouchDB like alternative for MongoDB - mongodb

I'm amazed by the sync capabilities of Pouch and Couch DB, but I'm looking for for an alternative that will let me use my MongoDB databases for client-sync. Is there such thing?
If there is, I'd like to hear your experience with it, what should I be aware of, if there are any catches, etc...

Minimongo is specifically what you are looking for. It was originally developed as part of the excellent Meteor framework, but it can now be used independently to get the local db store and synchronization with a remote db, all using Mongo api.

Related

MongoDB Atlas with GraphQL

Looking to build a react-native app and was going to use MongoDB Atlas for the database, express/apollo/graphql mixed in there for better querying. Has anyone had any experience with these techs together? especialy MongoDB Atlas and express?
I'm not sure how all these techs link together. Any tutorials will be handy as well. Thanks.
MongoDB Atlas provides you the endpoint where you can connect to the replica set and use mongodb.
This takes over many other factors such as installing mongodb, backups and restore. Also, the endpoint(connection string) provided by MongoDB Atlas comes with built-in:
Authentication enabled
Authorized users
Replica set to maintain HA
All of these factors give you advantages of using MongoDB Altas so that you can focus on developing your apps
Using mongodb atlas is likely to give you same things you would expect from your local mongodb and express with additional advantages listed above
If you're planning on using MongoDB and GraphQL in a NodeJs service in the interest of getting better querying capabilities, I'd suggest looking at GraphQL-to-MongoDB, or how I learned to stop worrying and love generated query APIs.
Disclaimer: I wrote that blog post.
MongoDB Atlas just announced GraphQL support for Atlas and Stitch. In a nutshell , you can easily generate/ create Schema for a collection in Atlas, Define access rules, relations and generate queries and mutations. GraphiQL is also integrated to run and test your queries. Check this blog post for more details - https://www.mongodb.com/blog/post/introducing-graphql-support-in-mongodb-atlas-with-stitch

Using noSQL in e-commerce server

e-commerce is a product of microsoft.As i gone through the product i came to know that it is mandatory to use SQL server along with e-commerce sever.i want to increase the speed of the retrival process and want to use a NoSQL database like MongoDB in place of SQL.Is that possible? please advice.
No, you can't.
MongoDB can not be used as a drop-in replacement for SQL databases. It already starts with the different and incompatible query language.
But it goes on with them having a completely different way of handling data, which makes it superior in some roles, but inferior in others. Even when you would use some translation-middleware which mimics a SQL server and translates the query commands into the equivalents of the MongoDB database behind it and translates the response back, the performance would likely be a lot worse than with a native MSSQL database, because you would be using MongoDB in a way it wasn't meant to be used.
When you want to use MongoDB successfully, you completely need to change the way you model your data and the way you deal with it. This affects your whole application design. When you try to use MongoDB as if it were a relational database, you will be extremely disappointed.
The same applies to other NoSQL databases.
Also, not every problem is a good fit for every database technology. When it comes to eCommerce applications, you should really think twice before choosing a database technology which doesn't fully guarantee ACID in all situations. Most (not all!) SQL databases do, most (not all!) NoSQL databases don't.

Meteor.js and Mongoose Compatibility

I want to use the Mongoose ORM with meteor mainly on the server side until meteor releases a schema approach.
Can i call Mongoose ORM operations within Meteor methods and publish using the Mongoose retrieving methods likefindById.
Are there any potential problems or meteor features that i would miss out on if i approached things this way?
Unfortunately, there are problems. We've wanted to do the same thing, but (out of the box) the mongoose package doesn't use Meteor's DDP protocol, and won't trigger the reactivity when you do CRUD operations. There may be also issues with Fibers/etc, although we haven't pushed with Mongoose enough to find them.
The good news is that (server-side) Meteor watches the db for any changes, DDP-induced or not, and will pick them up in about 10-seconds or so. It will then publish them to the clients, which will pick them up in standard meteor format.
We've been looking for a mongoose-ddp-meteor package to solve this issue, and might have to end up building one ourselves.
EDIT:
As of December 2013, Meteor's Mongo package listens to Mongo's oplog, and will reflect any changes done by external mongoose activity in real-time.

How can I share MongoDB collections between Meteor apps?

I'd like to be able to have an admin app and a client app for my project. Ideally, I'd like to be able to have a shared MongoDB collection. How would I be able to accomplish this?
I tried creating collections with the same name in two different apps, but found that Meteor will keep the data separate. Any idea what I can do? Thanks.
export MONGO_URL=mongodb://localhost:3002/meteor
Then run meteor app, it will change the default database meteor uses. So share databases or collections won't be a problem!
For administrative reason, I would use a individual MongoDB server managed by myself other than using meteor's internal MongoDB.
A reasonable question and probably worth a discussion in excess of this answer:
The MongoDB connection is handled by the Meteor application process itself and this is - as far as I read and understood - part of Meteors philosophy targeting an approach that might be described like: One data source serves one application belonging to it but many clients subscribing to it.
This in mind, combining "admin" and "client" clients in one application (i.e. your Meteor app) is probably the preferred way.
From a server administrative view, however, connections are handled by Meteor in that way that there is always the default local data source which resides in your project directory (.meteor/local/db, try meteor mongo --url to obtain the mongo connection string while the meteor application process is running). But nevertheless one may specify an optional data source string for deployment purposes like described in these deployment instructions.
So you would need to choose a somewhat creepy way of "local development deployment" for your intended setup to get working. Or you go and hack the sources and... no, forget it. You probably want your application and clients to take advantage of e.g. realtime UI updates (publish) and that is why the Meteor application is tied to an "application data source" and vice-versa by now. When connecting from another app, events that trigger changes in the model would not be transported across those applications. The mongoDB instance itself of course isn't aware of that.
I'm sure the core team won't expose the data source connection to a configuration section for considered reasons unless they extend their architecture with some kind of module concept which provides a common service layer of core Model/Collections abstraction across Meteor instances - at least supporting awareness of publish/subscribe events.
Try this DDP test I hacked together for a way to bridge two apps (server A and B).
Both servers can manipulate data, but data is only stored in one collection on server A.
See this link as well

How to connect to MongoDB in an iPhone App?

now I have an iPhone App and basically I want to exchange data from my database (MongoDB) on a server.
Could you please tell me exactly what I should do?
Forgive my innocence, I am a beginner in this area...Thank you very much ahead of time!!
I think you have two options to talk to mongo :
1) Use the rest interface http://www.mongodb.org/display/DOCS/Http+Interface
2) Use Objective-C driver: https://github.com/timburks/NuMongoDB
If you're not completely tied to MongoDB, have a look at CouchDB. It's essentially the same thing as MongoDB (JSON document store) but for the web. They have a nice built-in REST interface which makes database interaction in mobile/server environments very nice.
http://couchdb.apache.org/
In addition to Sid's options, you can also build your own backend that talks to mongodb, that communicates via REST (in your language of choice). This way you can pool your connections on the backend and avoid connectivity issues from the devices.