Monthly Archive: March 2014

Mar 22

A Pattern for handling concurrent edits to a MongoDB Document in Node.js

Lately I’ve been working on converting my space strategy game (Astriarch) to multiplayer using Node.js, Mongodb, and Mongoose. One problem I faced while making the game multiplayer is handling concurrent edits to the mongo game documents. Here is the scenerio: two players decide to send ships (edit the document) at the same time. If we …

Continue reading »