Meteor has a database everywhere approach. This means it provides the same API on the client as well as on the server. The data flow is controlled using a publication subscription model.
On the server sits the real MongoDB database, which stores data persistently. On the client, Meteor has a package called
minimongo, which is a pure in-memory database mimicking most of MongoDB's query and update functions.
Every time a client connects to its Meteor server, Meteor downloads the documents that the client has subscribed to and stores them in its local
minimongo database. From here, they can be displayed in a template or processed by functions.
When the client updates a document, Meteor syncs it back ...