A write fence is a cool data structure that collects a group of writes and runs its callbacks when all writes are committed. When we call a Meteor method from a client, the callback function is called when the client receives the "updated" message for the method from the server. The server uses a write fence to make sure that any documents have been written to Mongo and all "changed" messages have been sent to connected clients for those documents before sending the "updated" message to the calling client. In this video, I'll show you how the WriteFence works.
* <a href="https://www.eventedmind.com/feed/meteor-how-does-the-client-synchronize-writes-with-the-server" target="_blank">How Does The Client Sync Writes With The Server</a>
* <a href="https://www.eventedmind.com/posts/meteor-dynamic-scoping-with-environment-variables" target="_blank">Dynamic Scoping with Environment Variables</a>
One-On-One Questions or Comments?
Something not making sense, want to share your thoughts or just say hello? I check this daily!