jason
jason

Reputation: 3512

Where does the Database live in Meteor?

I am not able to understand where the DB of meteor lives(Client or server?). Also specifically I have the following two questions.

  1. If I do a complex query, where is the computation carried out, on the server or on the client?
  2. Is it possible to have a meteor app without a server (and will it have DB support or are there any limitations)

thank you.

Upvotes: 0

Views: 167

Answers (1)

Dan Dascalescu
Dan Dascalescu

Reputation: 152046

Meteor uses MongoDB for the server-side database, and minimongo (an in-memory JavaScript MongoDB emulation) to perform many of the operations on the client while they're being sent to the server, such that the client doesn't have to wait for a server roundtrip. This is how latency compensation, one of the core seven principles, is achieved.

  1. Minimongo currently has a number of limitations, so that you can't do much in terms of complex queries on the client. If you have complex queries, you'll probably want to call a server method.
  2. You can create collections on the client that don't subscribe to any server data, so in theory you could have a meteor app without a server; though the server comes bundled with meteor (which is an http server as well), so I don't think this is a real issue.

The meteor docs are a highly recommended read - http://docs.meteor.com

Upvotes: 2

Related Questions