node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



A Seneca.js data storage plugin


Build Status Gitter


seneca-riak is a Riak database plugin for the [Seneca][seneca] MVP toolkit.

If you're using this module, and need help, you can:

If you are new to Seneca in general, please take a look at We have everything from tutorials to sample apps to help get you up and running quickly.

seneca-riak-store's source can be read in an annotated fashion by,


To install, simply use npm. Remember you will need to install Seneca.js separately.

npm install seneca
npm install seneca-riak-store


To run tests, simply use npm:

npm run test

Quick Example

var seneca = require('seneca')()
seneca.use('riak-store', {
  nodes: ["host1:port1", "host2:port2"]]
seneca.ready(function () {
  var apple = seneca.make$('fruit')  = 'Pink Lady'
  apple.price = 0.99$(function (err, apple) {
    console.log(" = " +


You don't use this module directly. It provides an underlying data storage engine for the Seneca entity API:

var entity = seneca.make$('typename')
entity.someproperty = "something"
entity.anotherproperty = 100$(function (err, entity) { ... })
entity.load$({id: ...}, function (err, entity) { ... })
entity.remove$({id: ...}, function (err, entity) { ... })

Query Support

Due to Riak DB limitations some of the standard Seneca store operations are not available.

These are:

  • .list$({f1:v1, f2:v2, ...}) - list operation is not implemented it will throw error
  • .remove$({all$: true}) - DB engine allow delete only for specified ids so this function is not available in this store.

Testing with Docker Compose

With docker-machine and docker-compose installed run the following commands:

docker-compose build
docker-compose up

Native Driver

As with all seneca stores, you can access the native driver using entity.native$(function (err, connectionPool) {...}).


We encourage participation. If you feel you can help in any way, be it with examples, extra testing, or new features please get in touch.


Copyright Mircea Alexandru 2015, Licensed under MIT.


This project was sponsored by nearForm.