Awesome
Awesome Elixir and CQRS
A curated list of awesome Elixir, Command Query Responsibility Segregation (CQRS), and event sourcing resources.
Contents
- Libraries
- Community resources
- Books
- Articles
- Presentations
- Podcasts
- Research papers
- Screencasts
- Example applications
Libraries
-
Chronik - A lightweight event sourcing micro framework for Elixir.
-
Commanded - Use Commanded to build your own Elixir applications following the CQRS/ES pattern. Provides support for command registration and dispatch, hosting and delegation to aggregate roots, event handling, and long running process managers.
-
Commanded audit middleware - Command auditing middleware for Commanded CQRS/ES applications using Ecto for persistence.
-
Commanded Ecto projections - Read model projections for Commanded using Ecto.
-
Commanded scheduler - Schedule one-off and recurring commands for Commanded CQRS/ES applications .
-
Commanded Swarm registry - Distributed process registry using Swarm for Commanded.
-
-
Disco - Simple, opinionated yet flexible library to build CQRS/ES driven systems.
-
Eidetic - An event sourcing library for Elixir.
-
ES - Event Sourcing for Ecto and Postgresl/Dynamodb events storage.
-
EventBus - Traceable, extendable and minimalist event bus implementation for Elixir with built-in event store and event watcher based on ETS.
-
Eventlog - A simple event log backed by dynamodb and dynamodb streams.
-
EventStore - An Elixir event store using PostgreSQL for persistence.
-
Extreme - Elixir adapter for Greg Young's Event Store.
-
Fable - An Elixir event sourcing library.
-
Helios.Aggregate - Elixir library defining Aggregate behaviour and providing extendable facility for aggregate command pipeline.
-
Incident - Event Sourcing and CQRS in Elixir abstractions.
-
Maestro - An Elixir event store + CQRS library.
-
Pachyderm - A virtual/immortal/durable/resilient/global actor "always exists" and "never fails".
-
Perhap - Purely functional event store and service framework inspired by domain driven design and reactive architectures.
-
Seven Otters - A CQRS/ES Starter Kit for the BEAM.
-
TeaVent - TeaVent allows you to perform event-dispatching in a style that is a mixture of Event Sourcing and The "Elm Architecture" (TEA).
Community resources
-
Awesome Domain-Driven Design - A (non language specific) curated list of Domain-Driven Design (DDD), Command Query Responsibility Segregation (CQRS), Event Sourcing, and Event Storming resources.
-
DDD/CQRS/ES Discord - A Discord server for those who want to chat about domain-driven design, CQRS, event sourcing, and sometimes random things. Main channel is language and framework agnostic. Join ddd-cqrs-es Discord server
-
Elixir lang Slack - This offical Elixir language Slack team includes an #eventsourcing channel for CQRS/ES and Elixir discussion. Join Elixir on Slack to get an invite.
Books
- Building Conduit - Applying CQRS/ES to an Elixir and Phoenix web app.
- Real-World Event Sourcing - Distribute, Evolve, and Scale Your Elixir Applications
Articles
-
A Functional Foundation for CQRS/ES by Mathias Verraes - A CQRS architecture can be seen as a set of referentially transparent functions that model decisions and interpretation.
-
Building a CQRS/ES web application in Elixir using Phoenix by Ben Smith - Case study describing how a web application was built using CQRS/ES.
-
CQRS with Elixir and Phoenix by Jean-François Cloutier - Implementing the CQRS pattern in Elixir.
-
DDD within Elixir/Phoenix project: Umbrella apps & Service Object by David McLeod.
-
Elixir: Domain driven design with Actor Model by Naveen Negi.
-
Event Sourcing in Elixir by Derek Kraan - Explore how we can use some of Elixir’s more interesting features to implement event sourcing.
-
Event Sourcing in React, Redux & Elixir by Gary McAdam - How we write fast, scalable, real-time apps at Rapport.
-
My First Event Sourced Application by Leif Gensert - Building an event sourced application using Commanded.
2019
-
Event Sourcing With Elixir by Bruno Antunes - A multi-part blog series on event sourcing with Elixir using Commanded.
-
My Journey into CQRS and Event Sourcing by Rodrigo Botti - Learning these patterns by building a patient consent example application in Elixir.
-
Creating a single-node Elixir/Phoenix web app with Commanded & Postgres by Ben Moss - A blog post series to walk the reader through installing and configuring Commanded for use in a single-node Phoenix web app backed by Postgres.
2021
-
Building an event-sourced game with Phoenix Liveview by Charles Desneuf - A series on building an event-sourced game in Elixir with Phoenix Liveview.
-
Getting started with Elixir and EventStoreDB with the Spear gRPC client by Michael Davis.
-
Tackling software complexity with the CELP stack by Cees de Groot.
2022
-
Adding soft delete to a Phoenix Commanded (CQRS) API by Christian Alexander
-
Supercharging our event-sourcing capabilities with Phoenix LiveView by Simone D'Avico - Building visual tools to tame event sourcing architecture complexity.
-
Using CQRS in a simple Phoenix API with Commanded by Christian Alexander
Presentations
2014
- CQRS with Erlang by Bryan Hunter @ NDC 2014 - Dive into CQRS, and explore a sample implementation written in Erlang. [ slides | source code ]
2016
- Implementing CQRS on top of OTP (in Elixir) by Hubert Łępicki. [ video ]
2017
-
Building CQRS/ES web applications in Elixir using Phoenix by Ben Smith.
-
Event Sourcing with Commanded by Andriy Drozdyuk. [ slides | source code ]
-
Intro to Event Sourcing and CQRS in Elixir by Ben Moss.
-
Perhap: Applying Domain Driven Design and Reactive Architectures to Functional Programming at ElixirConf 2017 by Rob Martin.
-
Winter is coming by Luis Ferreira @ Functional Conf 2017 - Building maintainable applications by applying domain-driven design in Elixir using umbrella apps and its actor model. [ slides | video ]
2018
-
Building beautiful systems with Phoenix contexts by Andrew Hao @ ElixirDaze 2018 - Learn about Phoenix contexts from their origins in domain-driven design and how they help you to organise an Elixir application by providing rules around communication, boundary enforcement and testing. [ slides ]
-
CQRS and Event Sourcing by Bernardo Amorim @ Code Beam SF 2018 - A look into what Event Sourcing and Command Query Responsibility Segregation are and how they fit together, followed by a tutorial on how to implement an application using these concepts with Commanded (a framework for Elixir).
-
Event-driven architectures in Elixir by Maciej Kaszubowski @ ElixirConf EU 2018 - Learn how you can improve your architecture and reduce coupling by using events. [ slides ]
-
Event Sourcing in Elixir by Pedro Assumpção @ ChicagoElixir Meetup, November 2018 - In this talk, Pedro quickly introduces Event Sourcing and CQRS, but the main part is about FootBroker, an online soccer fantasy game that it is running in production in a beta stage, and has its main pieces using Event Sourcing and CQRS patterns.
-
Event Sourcing in Real World Applications Challenges, Successes and Lessons Learned by James Smith @ ElixirConf 2018 - Building a real time auction application for supplying fuel to ships using event sourcing.
2019
-
An event-driven approach to building Elixir applications by Ben Smith @ Code Elixir LDN 2019 - We experience the real world by reacting to events that have occurred, what if we modelled our Elixir applications in the same way? [ slides ]
-
Building Event Sourced Apps by Leif Gensert @ London BEAM User Group, January 2019 - Instead of defining a global data model that fits all of your use cases think about the things your system does. Record the events that occur and then build multiple data models that fit your individual use cases.
-
CQRS/ES & Elixir by Bertrand Dubaut @ Amsterdam Elixir Meetup, September 2019 - An introduction to the CQRS/ES architecture pattern and how to implement it in your application in Elixir with the Commanded framework.
-
Elixir + CQRS - Architecting for Availability, Operability, and Maintainability At PagerDuty by Jon Grieman @ ElixirConf 2019 - This talk looks at the service that powers PagerDuty’s timeline entries, a critical component for understanding what happens during an incident and covers how the service is architected for Command Query Responsibility Segregation and the benefits of those choices.
-
Event sourcing in practice - Using Elixir to build event-driven applications by Ben Smith @ Elixir London user group, March 2019 - Practical example of event sourcing in Elixir.
-
Event sourcing/CQRS in Elixir with Commanded: Where the rubber hits the road by Ben Moss @ Toronto Elixir meetup, May 2019. [ source code ]
-
gen_persistence: persist the state of your processes by Benoît Chesneau @ Code BEAM STO 2019 - This talk describes the usage of
gen_persistence
and how to create custom plugins to store events and snapshots. [ slides ]
2020
- Event Sourcing with Elixir by Peter Ullrich @ ElixirConf EU Virtual 2020 - Introduction to event sourcing with examples using EventStore. [ slides | source ]
2021
-
Eventsourcing and CQRS in Elixir by Vasilis Spilka @ ElixirConf EU 2021 - In this talk, we will go through how we can build an eventsourced application using simple abstractions provided to us by the Commanded library. [ slides ]
-
Modelling complex business domains with events by Ben Smith @ Alchemy Conf 2021 - Discover how we can use domain events (simple facts relevant to a business) to model business processes. Using tools such as Event Storming we can design our applications around these events. [ slides ]
Podcasts
2021
-
Elixir Mix #148 Event Sourcing and CQRS ft. Ben Moss - Discusion about Event Sourcing and CQRS in Elixir. Event sourcing is the practice of logging data across logged series of events and then reconstructing data from the events. CQRS is focused on keeping read and write operations from conflicting.
-
Thinking Elixir #075 RabbitMQ and Commanded at Simplebet with Dave Lucia - Talk about Simplebet's use of RabbitMQ and Commanded for solving unique real-time problems. We learn how Simplebet uses Elixir when creating real-time sports betting markets. We also learn what CQRS systems are, how the Commanded library supports that in Elixir, and how Commanded pairs well with RabbitMQ.
Research papers
2017
- The Dark Side of Event Sourcing: Managing Data Conversion by Michiel Overeem, Marten Spoor, and Slinger Jansen.
2021
- An Empirical Characterization of Event Sourced Systems and Their Schema Evolution - Lessons from Industry by Michiel Overeem, Marten Spoor, Slinger Jansen, Sjaak Brinkkemper.
Screencasts
Example applications
-
Bank by Bernardo Amorim - Sample Application for Elixir Brasil Talk.
-
Bonfire by Qiu Hua - A small project for exploring some interesting approaches to a delightful web application.
-
Coins by Bernardo Amorim - An example app using CQRS and Event Sourcing built with Commanded for a talk at CodeBEAM SF 2018.
-
Conduit - A blogging platform, an exemplary Medium.com clone, built as a Phoenix web application.
-
DDD Shipping Example by Peter C Marks - Elixir implementation of the shipping example from Eric Evan's "Domain-driven Design: Tackling Complexity in the Heart of Software" book.
-
Gift card demo by Ben Smith - a Commanded demo application focused around a simplified gift card domain using Phoenix LiveView for realtime UI updates.
-
Segment Challenge by Ben Smith - a full featured Elixir Phoenix web application built with Commanded used to host Strava competitions for athletes.
-
Simple Pay by Christopher Yammine - An exploration of using CQRS/ES with Elixir & EventStore database.
-
Honeydew by Matthew Moody - A very basic example to help you get started with the CELP (Commanded, Elixir, LiveView, PostgreSQL) stack.
License
To the extent possible under law, Ben Smith has waived all copyright and related or neighbouring rights to this work.