All Projects → andreapavoni → Disco

andreapavoni / Disco

Licence: mit
Simple, opinionated yet flexible library to build CQRS/ES driven systems 🕺

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Disco

commanded-ecto-projections
Read model projections for Commanded using Ecto
Stars: ✭ 68 (+119.35%)
Mutual labels:  ecto, cqrs-es
Symfony 5 Es Cqrs Boilerplate
Symfony 5 DDD ES CQRS backend boilerplate
Stars: ✭ 759 (+2348.39%)
Mutual labels:  cqrs-es
Examples Nodejs Cqrs Es Swagger
A Node.js CQRS and Event Sourcing Microservice Example Using Nest.js, Event Store, and Swagger
Stars: ✭ 348 (+1022.58%)
Mutual labels:  cqrs-es
Fun with flags
Feature Flags/Toggles for Elixir
Stars: ✭ 554 (+1687.1%)
Mutual labels:  ecto
Paginator
Cursor-based pagination for Elixir Ecto
Stars: ✭ 374 (+1106.45%)
Mutual labels:  ecto
Elixir Boilerplate
⚗ The stable base upon which we build our Elixir projects at Mirego.
Stars: ✭ 627 (+1922.58%)
Mutual labels:  ecto
Mongodb ecto
MongoDB adapter for Ecto
Stars: ✭ 318 (+925.81%)
Mutual labels:  ecto
Esx
A client for the Elasticsearch with Ecto, written in Elixir
Stars: ✭ 25 (-19.35%)
Mutual labels:  ecto
Eventstore
Event store using PostgreSQL for persistence
Stars: ✭ 729 (+2251.61%)
Mutual labels:  cqrs-es
Ecto enum
Ecto extension to support enums in models
Stars: ✭ 536 (+1629.03%)
Mutual labels:  ecto
Awesome Elixir Cqrs
A curated list of awesome Elixir and Command Query Responsibility Segregation (CQRS) resources.
Stars: ✭ 467 (+1406.45%)
Mutual labels:  cqrs-es
Paper trail
Track and record all the changes in your database with Ecto. Revert back to anytime in history.
Stars: ✭ 380 (+1125.81%)
Mutual labels:  ecto
Nebulex
In-memory and distributed caching toolkit for Elixir.
Stars: ✭ 662 (+2035.48%)
Mutual labels:  ecto
Machinery
State machine thin layer for structs (+ GUI for Phoenix apps)
Stars: ✭ 367 (+1083.87%)
Mutual labels:  ecto
Acwa book ru
Книга "Архитектура сложных веб-приложений. С примерами на Laravel"
Stars: ✭ 886 (+2758.06%)
Mutual labels:  cqrs-es
Crecto
Database wrapper and ORM for Crystal, inspired by Ecto
Stars: ✭ 325 (+948.39%)
Mutual labels:  ecto
Scrivener ecto
Paginate your Ecto queries with Scrivener
Stars: ✭ 451 (+1354.84%)
Mutual labels:  ecto
Kaffy
Powerfully simple admin package for phoenix applications
Stars: ✭ 617 (+1890.32%)
Mutual labels:  ecto
Rails event store
A Ruby implementation of an Event Store based on Active Record
Stars: ✭ 947 (+2954.84%)
Mutual labels:  cqrs-es
Query
Query adds tools to aid the use of Ecto in web settings.
Stars: ✭ 23 (-25.81%)
Mutual labels:  ecto

Disco

Minimal, opinionated yet flexible library to build software based on commands, queries and events. Not a stricly a CQRS/ES in the known terms, because it's not always possible to follow 100% CQRS/ES pattern neither anywhere in your apps. Disco tries to solve this gap.

Production ready?

Not yet. Well, this approach and part of its code has been used to build several apps in production without problems, however before being really usable, it might need some polishing. Expect potential breaking changes until explicitly stated.

Installation and setup

The package is available in Hex, follow these steps to install:

  1. Add disco to your list of dependencies in mix.exs in your app (if it's part of an umbrella project, add it where needed):
def deps do
  # Get from hex
  [{:disco, "~> 0.1.0"}]
  # Or use the latest from master
  [{:disco, github: "andreapavoni/disco"}]
end
  1. Configure the event store only on the app where you want to run it. That means that if you're working on an umbrella project, you have to choose an app in particular. The best way is to have an app dedicated to work as event_store.

    • Generate migrations for the database
    mix do deps.get, compile, disco.generate_event_store_migrations
    
    • Configure event store repo
    # config/config.exs
    
    config :disco, otp_app: :my_app
    config :my_app, ecto_repos: [Disco.Repo]
    
    config :core, Disco.Repo,
      dadatabase: "my_app_database",
      username: System.get_env("POSTGRES_USER"),
      password: System.get_env("POSTGRES_PASSWORD"),
      hostname: System.get_env("POSTGRES_HOSTNAME")
    
  2. Configure the event store client to the app(s) that need to interact with the event store

    • Configure the event store client
    # config/config.exs
    
    config :my_app, :event_store_client, MyApp.EventStoreClient
    
    • Create a wrapper for the event store client (so that it stays isolated)
    defmodule MyApp.EventStoreClient do
      use Disco.EventStore.Client
    end
    

Documentation

The documentation is available at https://hexdocs.pm/disco, it contains almost all the information needed to get started with Disco.

Usage

Quick and dirty console example, to show how it's supposed to work.

TODO / Short term roadmap

  • [x] improve overall documentation
  • [ ] consolidate Event to be a struct and/or protocol
  • [ ] adopt an adapter-based approach for event store database

Contributing

Everyone is welcome to contribute to Disco and help tackling existing issues!

Use the issue tracker for bug reports or feature requests.

Please, do your best to follow the Elixir's Code of Conduct.

License

This source code is released under MIT License. Check LICENSE file for more information.

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].