Backbone data persistence through Redis pub/sub and
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits ahead, 8 commits behind sorensen:master.
Latest commit 2bc5f44 Aug 28, 2011 @Morriz bugfixes and additions:
- made backbone-redis.js work on server without sockets
- added sorting solution
- added foreign key solution
Failed to load latest commit information.
browser bugfixes and additions: Aug 28, 2011
examples bugfixes and additions: Aug 28, 2011
vendor Major project refactor. Aug 12, 2011
.gitignore Project creation Mar 27, 2011
d Fixing syntax errors. Aug 16, 2011
index.js bugfixes and additions: Aug 28, 2011
license Major project refactor. Aug 12, 2011
package.json bugfixes and additions: Aug 28, 2011

Backbone Redis


  • Node
  • Express
  • Backbone
  • Redis


The project can be installed via NPM, or by cloning this repo into your project.

npm install backbone-redis


git clone git://

NodeJS Server Configuration

To begin using the module, you must first create an express server, configure the redis server that you will be using, and then to tell 'Sync' to listen to the app, which is basically a wrapper for the listen() method.

var express         = require('express'),
    Sync            = require('sync'),
    app              = module.exports = express.createServer();

Configure Redis client

Sync.configure(6379, '', {
    maxReconnectionAttempts: 10

Listen to the express server


Client Configuration

Setting up on the client is just as easy, we are basically setting the port that we will be using for data transmition. = new Store({
    port : 8080,
    secure : ('https :' == document.location.protocol)

Thats it! The point of the module is to override Backbone.sync and provide a seamless interface to data persistance.