|
|
|
|
|
by justaaron
2999 days ago
|
|
The server "publishes" particular queries as a kind of feed, and the client "subscribes" to some number of these feeds and behind the scenes, a miniature mongodb-like-api (mini-mongo) in local storage gets filled with all the published data you are subscribed to, so both the number of documents needed should be limited, as well as the scope of the query itself, for performance reasons...
Scaling in the sense of:
1) number of simultaneous users maintaining a DDP connection with the server and the beating the db and backend take
2) amount of documents that get shoved down the tubes. So, the more fundamental issue:
Nothing about meteor's approach allows substituting components from the rest of the javascript ecosystem, other than the view layer, as the server side only speaks DDP, as does the client, etc. One cannot easily optimize the various routes of the application as it's all just one very tightly coupled SPA with a ddp backend?! I ended up being able to use an apps existing data, and taking the templates/components and patching in
1)routes and all dynamic data and what not from the server side needed to "dish-up" the template plus some
2) vanilla javascript to post data to server routes that may return either markup + data or simply data that get's patched into the specific place in the dom that needs updating. This at least provided a basis for further work on individual routes/views etc. |
|
DDP is a simple protocol that runs on top of WebSockets, which runs over TCP. Back in 2013, someone achieved 12 million concurrent WebSocket connections on a commodity server. There is no reason why Meteor should not be able to handle a comparable number:
https://mrotaru.wordpress.com/2013/10/10/scaling-to-12-milli...
Meteor fully supports the NPM ecosystem. Meteor does not have to always use DDP. You can implement RESTful APIs and serve static pages using the many router packages available.