Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including committed with all npm packages installed. Try it out:

var committed = require("committed")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

committed v2.0.5

This library can be used to create mongodb transactions that are Atomic, Isolated and Durable. If you're using mongo you already know its not ACID compliant. This library doesn't magically change that. However, used carefully it can help you hit some common requirements. Isolation for multi-collection operations is easy to achieve using committed's transaction queues. Atomicity and Durability require more effort, as you must capture db operations as 'instructions' with matching rollbacks. A small set of instructions is supplied. When used in this way, transaction objects are written to their own collection which therefore also acts as a robust audit trail.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free