All notable changes to this project will be documented in this file. The format is based on Keep a Changelog.
- Upgrade Elixir to 1.12 and Erlang to 23;
- Update package dependencies;
- Fix bug in the task
mix incident.postgres.init
that would generate migration timestamps that were conflicting with each other;
- Update readme with missing syntax highlighting;
- Update Github issue templates;
- Update package dependencies;
- Handle race conditions and concurrent scenarios during command execution;
- Add
EventStoreSupervisor
to superviseEventStore
adapters andLockManager
; - Add
AggregateLock
schema to hold lock data;
- Add integration tests that exercise concurrency and race conditions;
- Change how
Incident
is configured and added in the application supervision tree; - Update
mix incident.postgres.init
to include migration foraggregate_locks
table; - Update documentation regarding library configuration and usage;
- Update package dependencies;
- Update documentation regarding library configuration and usage;
- Add
id
for the in memory event data structure; - Sort events by
id
in the Event StorePostgres
andInMemory
adapters to ensure proper event ordering; - Remove
updated_at
column fromevents
table in themix incident.postgres.init
task; - Update documentation;
- Update package dependencies;
- Update
events
migration to reflect changes in themix incident.postgres.init
task;
- Add
get/2
for Projection StoreInMemory
andPostgres
adapters to fetch a projection for a specific aggregate;
- Add
Transfer
,TransferCommandhandler
,TransferState
andTransferEventHandler
to demonstrate an example of aggregate root use-case; - Add examples of events that can generate specific commands in
TransferEventHandler
to demonstrate sequence of Event -> Command -> Event use-cases;
- The
CommandHandler
now returns{:ok, persisted_event}
instead of just:ok
, allowing event handlers to compose a new command and call theCommandHandler
based on the previous event. This allows a series of Event -> Command -> Event to be built; - Set Elixir minimum version to 1.8;
- Update package dependencies;
- Rename
Bank.EventHandler
toBank.BankAccountEventHandler
to make it clear that this handler is only for theBankAccount
aggregate events as now we have more than one aggregate; - Set Elixir minimum version to 1.8;
- Update package dependencies;
- Add
mix incident.postgres.init
mix task to set upPostgres
as Event Store storage;
- Add
WithdrawMoney
command,MoneyWithdrawn
event, and business logic;
- Update package dependencies;
- Add
Postgres
adapter for events; - Add
Postgres
adapter for projections; - Set up continuous integration with Circle CI;
- Add integration tests for
InMemoryAdapter
; - Add integration tests for
PostgresAdapter
;
- Specify separate event data structures for
InMemoryAdapter
andPostgresAdapter
;
- Use
PostgresAdapter
as default; - Update readme file;
- Define the
Incident.Command
behaviour to specify the command interface; - Define the
Incident.CommandHandler
macro for command handlers; - Define the
Incident.EventHandler
behaviour to specify the event handler interface; - Use
Ecto.Schema
event data structure; - Use
Ecto.Schema
for command data structure;
- Move event persistency from aggregates to command handlers;
- Validate commands in the command handlers using command implementation;
- Initial release with base functionality with In Memory adapters;
- Initial release for the bank example application;