AvES is an that is tailored towards storing Events for Event Sourcing.
It uses the RESP (REdis Serialization Protocol) to communicate. This way it is possible to create clients by reusing the already available protocol. For example, it is possible to use the official Redis command line interface program to communicate with aves.
An event store is a datastore that stores events on disk indefinitely. An initial event sent for an aggregate stream creates the store of all events for that stream.
git clone https://github.com/maarek/aves.git
cd aves
make build
Once AvES is installed and available in your PATH
, you can run it by executing the following command.
aves --out mydb.aves
There is now a aves server running on your machine and listening on 127.0.0.1:6480
.
In another terminal window, you can specify to a client to listen to only new events.
avcli "SUBSCRIBE" 'my-stream'
And in another one again you can send new events. All clients which are subscribed to that same stream will see the events.
avcli publish 'my-stream' '1' 'Hello World!'
avcli publish 'my-stream' '2' 'Hello America!'
avcli publish 'my-stream' '3' 'Hello Africa!'
avcli publish 'my-stream' '4' 'Hello Japan!'