All Projects → hicknhack-software → Rails Disco

hicknhack-software / Rails Disco

Licence: mit
Distributed Rails with commands, events and projections.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Rails Disco

Ray
项目停止更新,新项目:https://github.com/RayTale/Vertex
Stars: ✭ 635 (+568.42%)
Mutual labels:  event-sourcing, event-driven, distributed-systems
reacted
Actor based reactive java framework for microservices in local and distributed environment
Stars: ✭ 17 (-82.11%)
Mutual labels:  distributed-systems, event-sourcing, event-driven
Booster
Booster Cloud Framework
Stars: ✭ 136 (+43.16%)
Mutual labels:  event-sourcing, event-driven, framework
Akkatecture
a cqrs and event sourcing framework for dotnet core using akka.net
Stars: ✭ 414 (+335.79%)
Mutual labels:  event-sourcing, event-driven
Event Source Cqrs Sample
Sample ES/CQRS application
Stars: ✭ 380 (+300%)
Mutual labels:  event-sourcing, event-driven
Qpc
QP/C real-time embedded framework/RTOS for embedded systems based on active objects (actors) and hierarchical state machines
Stars: ✭ 379 (+298.95%)
Mutual labels:  event-driven, framework
Microservices Event Sourcing
Microservices Event Sourcing 是一个微服务架构的在线购物网站,使用Spring Boot、Spring Cloud、Spring Reactor、OAuth2、CQRS 构建,实现了基于Event Sourcing的最终一致性,提供了构建端到端微服务的最佳实践
Stars: ✭ 657 (+591.58%)
Mutual labels:  event-sourcing, event-driven
Pitstop
This repo contains a sample application based on a Garage Management System for Pitstop - a fictitious garage. The primary goal of this sample is to demonstrate several software-architecture concepts like: Microservices, CQRS, Event Sourcing, Domain Driven Design (DDD), Eventual Consistency.
Stars: ✭ 708 (+645.26%)
Mutual labels:  event-sourcing, event-driven
Eventsourcing
A library for event sourcing in Python.
Stars: ✭ 760 (+700%)
Mutual labels:  event-sourcing, distributed-systems
Asombroso Ddd
Una lista cuidadosamente curada de recursos sobre Domain Driven Design, Eventos, Event Sourcing, Command Query Responsibility Segregation (CQRS).
Stars: ✭ 41 (-56.84%)
Mutual labels:  event-sourcing, event-driven
Foxoffice
Sample application demonstrating how to build a distributed cloud .NET Core application based on CQRS and Event Sourcing.
Stars: ✭ 33 (-65.26%)
Mutual labels:  event-sourcing, event-driven
Apprun
AppRun is a JavaScript library for developing high-performance and reliable web applications using the elm inspired architecture, events and components.
Stars: ✭ 1,087 (+1044.21%)
Mutual labels:  event-driven, framework
Ergo
a Framework for creating mesh networks using technologies and design patterns of Erlang/OTP in Golang
Stars: ✭ 376 (+295.79%)
Mutual labels:  framework, distributed-systems
Scaleapp
scaleApp is a JavaScript framework for scalable and maintainable One-Page-Applications
Stars: ✭ 353 (+271.58%)
Mutual labels:  event-driven, framework
Run Aspnetcore Microservices
Microservices on .Net platforms which used Asp.Net Web API, Docker, RabbitMQ, MassTransit, Grpc, Ocelot API Gateway, MongoDB, Redis, PostgreSQL, SqlServer, Dapper, Entity Framework Core, CQRS and Clean Architecture implementation. Also includes Cross-Cutting concerns like Implementing Centralized Distributed Logging with Elasticsearch, Kibana and SeriLog, use the HealthChecks with Watchdog, Implement Retry and Circuit Breaker patterns with Polly and so on.. See Microservices Architecture and Step by Step Implementation on .NET Course w/ discount->
Stars: ✭ 406 (+327.37%)
Mutual labels:  event-sourcing, event-driven
Eventhus
Go - CQRS / Event Sourcing made easy - Go
Stars: ✭ 350 (+268.42%)
Mutual labels:  event-sourcing, framework
eventide-postgres
Event Sourcing and Microservices Stack for Ruby
Stars: ✭ 92 (-3.16%)
Mutual labels:  event-sourcing, event-driven
dudulina
CQRS + Event Sourcing library for PHP
Stars: ✭ 53 (-44.21%)
Mutual labels:  event-sourcing, event-driven
Message Db
Microservice native message and event store for Postgres
Stars: ✭ 1,260 (+1226.32%)
Mutual labels:  event-sourcing, event-driven
Rails event store
A Ruby implementation of an Event Store based on Active Record
Stars: ✭ 947 (+896.84%)
Mutual labels:  event-sourcing, event-driven

Build Status Coverage Status Dependency Status Code Climate Gem Version License

Rails Disco Logo

Rails Disco - A distributed party with commands, events and projections

Rails Disco is based on Ruby on Rails and makes event sourcing easy. Greg Young showed the advantages of event sourcing multiple times. GOTO Conference Talk (Chicago 2014)

Rails Disco consists out of three main parts: commands, events and projections.

Commands will be created and executed by actions of your controller, instead of directly manipulating your model. These commands are only the order to do something and after possible validations, the framework executes them by creating an event and finally manipulating the model.

The events will be all stored in a separate database and also published to all projections, where they can be processed to update the projections model/database

Finally projections are your representation of your data, they get the events and process them, to get the needed information for building up their models.

Requirements

  • At the moment Rails Disco uses Rails 4. Maybe it works with Rails 3.2, but we didn't test that.

  • Because Rails Disco relies on bunny for sending the events from the domain to the projection, you need RabbitMQ on your system.

  • Any Server which is capable of streaming, e.g. puma or thin (standard Rails server WEBrick will not work). If you are facing problems installing puma on Windows, here is a tutorial.

Getting Started

  1. Install Rails Disco at the command prompt

     gem install rails-disco
    
  2. At the command prompt, create a new Rails Disco application.

     disco new myapp
    

    where myapp is the name of you application.

    (Note: You can also add Rails Disco to an existing Rails application. Simply omit the application name and run the command inside your application.)

  3. Change directory to myapp and migrate the databases:

     cd myapp
     rake disco:migrate:setup
    

    This will operate on the Rails (= projection) and the domain database. You can configure the domain database and more Rails Disco related configurations in config/disco.yml.

  4. If you just want to look a some standard server output, start the disco server (Remember to use a server which is capable of streaming, which means not WEBrick). Else go ahead and skip this point.

     disco server
    

    This will start the domain, the projection and the web server, but you won't see much of the disco yet.

  5. For a humble start, let's create the scaffold for a simple blog system:

     disco generate scaffold Post title:string text:text
    

    The syntax is leaned to Rails' generate style and it basically creates a resource Post with a title and a text attribute.

  6. Now that we have something to rely on, lets migrate and see it in action:

     rake disco:migrate
     disco server
    
  7. Go to http://localhost:3000/posts and you'll see an empty list of our posts with a link to create a new one. Go ahead and create one. If you watch the console output, you can see that an event is created, published and processed by a projection.

  8. If you look at your databases, you see in both of them a table posts, which contains your freshly created post. The domain database also contains a table domain_events. There you find an event for your post creation. Lets see this in action.

  9. Clear your projection database and restart the server.

     rake disco:db:drop
     rake disco:migrate
     disco server
    

    You will see some console output, the projection requests the missing posts from the domain. Finally the state of your projection database will be restored.

  10. That's it for now, have fun with it. For more information take a look at the wiki and the examples

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].