gemyago / event-store

Ruby implementation of the event store. Inspired by NEventStore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ruby implementation of the event store. Inspired by NEventStore.

Installation (Gemfile)

gem 'event-store', github: 'evgeny-myasishchev/event-store'

Sample

# 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

General Features

  • SQL persistence

  • Atomic multistream commits (if supported by underlying persistance engine)

  • JSON, YAML and Marshal serialization

  • Compression

Planned

  • NOSQL persistence

  • Documentation

About

Ruby implementation of the event store. Inspired by NEventStore


Languages

Language:Ruby 100.0%