Event Store is "an awesome, rock-solid, super-fast persistence engine for event-sourced applications."
It has HTTP and TCP client interfaces -- this project implements the TCP interface in Node.js in an async fashion.
Very early stage. Only a subset of the TCP API is implemented. But you can create streams of events and read them back, so the most important functionality is in!
Installing:
npm install git://github.com/kenpratt/nodejs-EventStore.git
Connecting:
var EventStore = require("nodejs-EventStore");
var es = EventStore.connect(host, port);
Creating an event stream:
es.createStream(streamName, cb);
Creating an event (callback will contain event number for created event):
es.createEvent(streamName, eventType, data, cb);
Reading & subscribing to an event stream (callback will be called for each existing event in the stream, and for each event added in the future):
es.readAndSubscribeToStream(streamName, cb);
- Node.js
- A running Event Store instance
- Protocol Buffers (protobuf)
- Development Node.js packages:
npm install --dev