This talk will go through the concept of event sourcing and show that at its core its really just functional code. You can implement an event sourced system in Object Oriented code but its really hiding what is happening. Have you seen the logo for event store or the cute little dragon? By the end of this talk you will also understand what they mean.
Does anyone know of an event-store that runs in-process? Something like CouchDB or Commanded, but 100% Elixir running in the same process as my application code? I guess Iām looking for the SqLite of event-stores, written in Elixirā¦
Thereās a pending pull request to Commanded that extracts out the storage adapter and provides an additional implementation for Greg Youngās Event Store. With the storage interface now defined as a behaviour you could write an in-memory provider. That would give you a full CQRS/ES library, all in memory and written in pure Elixir.
I do want to implement an in-memory storage provider to use for unit tests. Sorry, I canāt commit to getting it done right now.
If the information you will store is less than 2gigs then the built-in Mnesia will work. But to say which is best is determined based on what you will be storing, how it will be stored, and how it will be looked up.
Another more general question - Iām trying to figure out a strategy for dealing with Code change in my Event Sourced app. Can you point me at a a good reference or talk that explains different strategies for managing code changes, especially when you need to change the format of the messages stored in the Event Store?
I wrote an Elixir library (eventstore-migrator) that implements the copy and transform strategy for my own event store. It copies and mutates events into a new PostgreSQL database. You can transform, remove, aggregate, and alter the serialization format of the events.
Hereās an example of removing an unwanted event.
Iāve created an āawesome listā of Elixir and CQRS/ES resources: Awesome Elixir and CQRS.
The list is designed for only CQRS/ES resources that explicitly target Elixir/Erlang, as thereās an existing awesome collection of general domain-driven design content.