Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple, transparent, object persistence for NodeJS.

branch: master

changed docs

latest commit 13bacca2f6
chrisdew authored February 10, 2011
Octocat-spinner-32 .settings first January 28, 2011
Octocat-spinner-32 docs changed docs February 10, 2011
Octocat-spinner-32 examples added TODO February 09, 2011
Octocat-spinner-32 lib changed docs February 10, 2011
Octocat-spinner-32 test added TODO February 09, 2011
Octocat-spinner-32 .project first January 28, 2011
Octocat-spinner-32 AUTHORS first January 28, 2011
Octocat-spinner-32 LICENSE refactoring progressing February 03, 2011
Octocat-spinner-32 Makefile fixed documentation February 09, 2011
Octocat-spinner-32 changed docs February 10, 2011
Octocat-spinner-32 package.json v0.2.0 February 10, 2011
Octocat-spinner-32 updated push to make docs automatically February 05, 2011

BarricaneDB - a transparent object persistence mechanism for NodeJS.

Status v0.2.0 - Just about works - there will be bugs.

BarricaneDB is a persistence layer for NodeJS which was developed to meet my following requirements:

  • My app's state exists as a heap of objects in RAM. I just want to be able to shutdown my app and get that same heap of objects the next time I start my app.
  • I don't want to have to add or change more than a dozen lines of code.
  • I want a proper transaction log, so that the data is resilient against application crashes.
  • I want to be able to read the transaction log - I care more about making my app easily debuggable than saving disk space.

BarricaneDB is a loose implementation of the Prevalence System Design Pattern, as implemented in Java by Prevaylor, but for NodeJS.


There's also docco-generated, documentation online at


  • npm install barricane-db

Reasons why BarricaneDB will never be a good fit for your application.

  • Your data set is too big to fit in RAM.
  • Your application doesn't happily shard into BarricaneDB's one-DB-per-process design.
  • You need to query your database from outside the NodeJS process - e.g. Crystal Reports.

Reasons why BarricaneDB is not currently a good fit.

  • Your application needs a production-tested solution.
  • You need good error handling.
  • You need async database opening (persistence is already fully async).
  • Transactions are important to you.
  • Your application needs ACID guarantees. BarricaneDB could loose 1-5 seconds of data on a process crash (OS dependent).

Backwards compatibility.

  • We use codecs to separate the data representation from the database.
  • All future versions of BarricaneDB will be able to read v0.2.0 .swoj files.

Keep up with BarricaneDB.


  • Whether I do anything more to this project, beyond functionality required for some of my other projects, really depends on there being some level of interest in the community. If you want things to happen, please watch this project on GitHub and subscribe to the Google Group.
  • Some of the features I'd like to add include:
  • Change the DB to an emitter and make the open async.
  • Create a subscribe facility so that webclient-proxy objects can be notified on changes to objects which are displayed on user's browsers.
  • Create a more efficient delta-codec which only logs the changed fields of registered instances.
  • Add ACID transactions.
  • Anything you'd like to add? - Create an issue on GitHub.
Something went wrong with that request. Please try again.