3 ms·
Live updates were implemented with listening to MongoDB replication log back on 0.7.0: https://www.meteor.com/blog/2013/12/17/meteor-070-scalable-database-queri
by imslavko 12y ago
Live updates were implemented with listening to MongoDB replication log back on 0.7.0: https://www.meteor.com/blog/2013/12/17/meteor-070-scalable-database-queries-using-mongodb-oplog-instead-of-poll-and-diff https://www.meteor.com/blog/2013/12/17/meteor-070-scalable-d...
This is a much more efficient way to get updates from the database and it also scales horizontally to multiple application servers (and multiple MongoDB replicas!)
If you are curious how it works, this talk is a good start: https://www.youtube.com/watch?v=_dzX_LEbZyI https://www.youtube.com/watch?v=_dzX_LEbZyI
- modeless 12y agoVery cool, thanks. Is server side rendering coming soon as well?
- imslavko 12y agoThe roadmap of Meteor includes "Server-side rendering" planned after 1.0. https://trello.com/c/Lz07fBAm/7-server-side-rendering https://trello.com/c/Lz07fBAm/7-server-side-rendering In my opinion, server-side rendering is a bit overrated since Google knows how to crawl ajaxy apps. SEO is a big concern but you can always render your pages with phantomjs (also a popular approach in the Angular world) or rely on Google being smart. For rendering the page to the end-user, Facebook is not rendering everything server-side, nor does Twitter. I don't have enough knowledge why, but one of the FB engineers told me that it is not really faster: you need to render it twice, send the same data possibly twice, it is hard to correctly chip into the events made on the page, etc.
- modeless 12y agoI'm more concerned with end user page load speed than crawling. I find Facebook and Twitter pages annoyingly slow to load, personally. Sure, server side rendering is difficult but it's exactly the sort of hard problem that a framework ought to be able to solve for you. Edit: actually I just went to twitter and it loaded pretty fast, so I looked at the network requests and they do server side rendering for your timeline.
- imslavko 12y agoHm, looks like you are right. At least the new timeline is server-side rendered. I guess they are updating parts of UI to be rendered on the server to be faster. Interestingly some websites like GitHub are doing the opposite: they are slowly bringing incremental ajax-based transitions to every page, some "real-time" features are implemented with a socket signal refreshing the whole page. One of the community solutions is "FastRender" package, which is not really about rendering. What it does, it puts most of the initial data into HTML page so you don't need to wait for the websocket connection and the data arriving to render the initial page. Improves the initial page load quite significantly: https://meteorhacks.com/fast-render/ https://meteorhacks.com/fast-render/
- deleted 12y ago[deleted]