Large Meteor projects - best practices. High-Level Guide to Scaling Meteor. The first and highest-impact place to optimize is in softwareland: Mongo schema design, indexing, and oplogSubscription and query design (also try to avoid types of queries that use the polling driver) For server architecture, place at the front a SockJS-safe, sticky-session load balancer that distributes connections to app servers based on least connections.
On the application servers: CPU: Run an instance of meteor for each CPU core, since node is single-threaded. Memory: Meteor’s MergeBox is keeping on the server a copy of each client’s client-specific subscription data, so make as many publications as you can general-purpose (as in, they return the same data for all users or a group of users, rather than different data for each user). A floor for your per-client memory usage is how much additional memory your publications take up when another user connects. However, in Arunoda’s experience, CPU is more often the bottleneck than memory. Kudos.
Meteor Toys. Meteor.js Iron Router Filters, Before and After Hooks. Introduction The Meteor.js Iron Router is the one package that helps me so much and is the first one I add in every application.
If you do not know the Iron-Router make sure to learn how to use it because it realy helps so much! The Iron Router basically decides what to render for the current Route (URL). Also do not think that you are building a so called one-page app and you do not need urls. You always need urls (e.g. share a state, bookmarking). What are Iron Router Hooks? The Iron Router basically works like this: A new route is calledThe Iron Router checks if there are before hooks and runs them allIf all before hooks are done and ready the rendering takes placeNow the after hooks are all run That means we can create functions that are run before any route and this is amazing if you for example want to filter a route to be only for logged in users. The Meteor Chef. Awatson1978/meteor-cookbook. Ericdouglas/Meteor-Learning. App from scratch. Last updated 06 May 2015 A meteor hitting our planet and killing everyone Please note that this tutorial is in Coffeescript.
Oplog. Tutorials. Packages. Tips, tricks, stackoverflow. Apps. Blaze: easy reactive templating. Extremely easy to use With Blaze, you can write your app with normal-looking templates in the language of your choice.
You don't need to declare dependencies or write any code to manage how the screen updates: it's all automatic. High performance When your data changes, Blaze makes the smallest possible update to just the piece of the DOM that needs to change or move and batches those updates to minimize page reflows. Since most apps only update a few pieces of data at a time, this approach leads to very efficient updates.