EventStore <img src=“https://travis-ci.org/evgeny-myasishchev/event-store.svg?branch=master” alt=“Build Status” /> <img src=“https://codeclimate.com/github/evgeny-myasishchev/event-store.png” /> <img src=“https://codeclimate.com/github/evgeny-myasishchev/event-store/coverage.png” />¶ ↑
Ruby implementation of the event store. Inspired by NEventStore.
gem 'event-store', github: 'evgeny-myasishchev/event-store'
# Bootstrap store = EventStore.bootstrap do |with| with.console_logging with.in_memory_persistence end # Create new stream stream = store.create_stream(employee_id) stream.add EmployeeHired.new(employee_id, full_name) stream.commit_changes t # Add new events to existing stream stream = store.open_stream(employee_id) stream.add EmployeeResigned.new(employee_id, reason) stream.commit_changes t
A complete sample is here: doc/sample.rb
-
SQL persistence
-
Atomic multistream commits (if supported by underlying persistance engine)
-
JSON, YAML and Marshal serialization
-
Compression
-
NOSQL persistence
-
Documentation