Hi Deepak,
The features you're asking about have also been requested for MongoDB in various forms, and some have alternative approaches available now. I've noted some relevant approaches below as well as server issues in our public issue tracker (
https://jira.mongodb.org/) which you can upvote and/or watch. Different products have different focus and features, so I would not expect identical implementations and you need to decide what best fits your use case.
If you're interested in where MongoDB is heading longer term, our CTO Eliot Horowitz recently shared some thoughts in his
Roadmap talk at the MongoDB World 2014 in New York City, including the possibility of multi-master databases.
In regards to your specific questions (as at MongoDB 2.6) ...
There is currently a simple
HTTP Status Interface API which can be used for monitoring, although if you want programmatic (and more detailed) stats I would write a program to poll information from the
serverStatus command. The quickest way to get started with MongoDB monitoring is using the free cloud-based
MMS Monitoring service, which includes an agent that gathers interesting metrics every minute and pushes them to your MMS account via https. The MMS documentation includes a list of information collected and
commands used by the monitoring agent.
The MongoDB server does not include a full REST API, however there are many
third party options listed in the documentation and you can probably find solutions using your preferred programming language / stack.
You generally never want to expose your database server directly on the internet, and an external-facing REST API (eg. for mobile apps) would need to be properly secured. Given the ubiquity of drivers for MongoDB, I think a REST API likely makes more sense in an application layer rather than the database.
A relevant feature request for a more complete REST API:
> Real-time change notification API
MongoDB has a concept of
tailable cursors which can be used to track changes to a capped collection (including the
oplog capped collection which tracks all changes for replication). This isn't exactly the same as a notification API, but there are solutions such as
Mongo Connector that leverage tailable cursors to monitor data changes and take some action (for example, integrating with third party search solutions).
Some relevant feature requests:
> Master-master replication
As mentioned in the MongoDB roadmap talk, this is an area of interest being considered. FYI, multi-master is a broad topic and there are different ways to implement "multi-master" features (
MVCC,
vector clock, etc) depending on the goals.
Relevant feature request:
> Offline mode
This is somewhat related to multi-master support if you are referring to ability for a node in a replica set needing to be highly available while perhaps partitioned from other members of the replica set. Currently MongoDB replica sets only support a single primary, so there is no provision for a secondary or offline node to accept updates and somehow reconcile those with a primary.
However, "offline mode" in relation to mobile is a different use case: effectively you want
to cache data on the device when offline and sync when a network connection is available. You certainly do not want to run a server version of MongoDB on your mobile device as there is limited memory and power. In general what you want is an API which is perhaps similar to MongoDB but takes care of the offline/online state in order to sync data back to a server/API. Depending on what you're after (and how much of the stack you want to host/manage yourself) there are a number of solutions/stacks available that are using MongoDB as a backend (for example: Meteor, Parse, Firebase, ...).
Regards,
Stephen