Today we are happy to announce Meteor 0.5.7, a continuation of our performance and scaling efforts. These changes have been in the works for several months, dating back to 0.5.1. They lay the foundations for factoring Meteor's server code into several tiers, each of which can run on multiple cores and scale independently.
Meteor 0.5.7 is a substantial update. The three major items here are a new rev of DDP with different messages and a version negotiation step; extensions to JSON to represent additional data types; and new database observer and publish APIs.
The Meteor client and server communicate using a simple JSON-based protocol called DDP. We've changed some of the DDP messages in this release. We also added a version negotiation step, so that future updates to DDP won't require a flag day update on both sides of the wire. There is an informal specification of DDP in
We've long wanted a principled way to use native MongoDB ObjectIDs in Meteor applications. The new EJSON package answers this requirement. Collection and Session both support EJSON, so you can now use ObjectIDs, Dates, and binary data in your collections and Session variables. You can also define custom EJSON datatypes.
We changed the API for observing live database queries. The new APIs allow callers that don't need ordering information or full documents to use far more efficient query diff implementations. You need to update any calls to
observe: see the
observeChangesdocs for details.
Finally, we realigned the low-level publish API to match the new DDP messages and observe API. You'll need to update any publish functions that previously called
unset. Please see the
publishdocs for more.
We've also optimized server performance in two common cases. In 0.5.7, the subscription duplication detection logic uses significantly less CPU on the server during initial page load and when dealing with large amounts of data. And we avoid requerying the database for changes to unrelated MongoDB documents in the common case of an update to a single document with a known ID.
Authors of applications that use the the database
observe API, the low-level publish APIs, anyone using the
madewith package, and anyone running a custom DDP client or server should read the 0.5.7 release notes and relevant documentation carefully before upgrading. Applications using
Meteor.connect (including the
madewith package) will need to update the client and server versions in lockstep. The madewith.meteor.com service is now running version 0.5.7.
The full release notes are available in the repository.