0.01
No release in over 3 years
Low commit activity in last 3 years
Eventide on Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Eventide on Rails

Eventide on Rails brings pub/sub, event sourcing, evented systems, and messaging to Ruby on Rails apps. Built on Message DB and the Ruby Award winning Eventide Project, Eventide on Rails blends the best of web app development and evented systems and autonomous services into a single stack.

Using Eventide on Rails, developers can:

  • Record business events from within Rails controllers, models, background jobs, mailers, and service objects
  • Record an audit trail of changes to ActiveRecord models as an event stream
  • Apply data changes made in external services to Rails application data
  • Bring event sourcing to Rails apps
  • Project a stream of events onto an ActiveRecord model
  • Send messages to external pub/sub services via Message DB
  • Receive messages from external services via Message DB

Eventide on Rails creates a harmonious transition between autonomous evented services and web applications empowering developers to read and write to and from Message DB, to project event-sourced entities from event streams, and to interact with external services via commands and events using the ActiveRecord Postgres connection. The implementation will allow the co-hosting of the Message DB message store database with a Postgres application database in Rails, and integrates with ActiveRecord migrations to manage the message store data,

CRUD operations in ActiveRecord will be executed in the same database transaction as the recording of events via Eventide's writer, making the recording of events atomic with Rails application database operations.

user_created_event = UserCreated.build(params)
ActiveRecord::Base.transaction do
  user = User.create(params)
  stream_name = "user-#{user.id}"
  eventide_writer.write(user_created_event, stream_name)
end

All foundational Eventide features will be extended to Rails apps, including readers, writers, projections, and even entity stores and handlers.

Status

In Development

Eventide on Rails is currently in development and will be released after the first quarter of 2020.

License

The eventide-rails library is released under the MIT License.