New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple event stores #55

Merged
merged 54 commits into from May 14, 2017

Conversation

Projects
None yet
1 participant
@slashdotdash
Member

slashdotdash commented May 14, 2017

Extract event store integration to a behaviour (Commanded.EventStore). This defines the contract to be implemented by an event store adapter. It allows additional event store databases to be used with Commanded.

By default, a GenServer in-memory event store adapter is used. This should only be used for testing as there is no persistence.

The existing PostgreSQL-based eventstore integration has been extracted as a separate package: commanded_eventstore_adapter.

There is now a new adapter for Greg Young's Event Store using the Extreme library, available as package: commanded_extreme_adapter.

You must install the required event store adapter package and update your environment configuration to specify the :event_store_adapter module. See the README for details.

Thanks to @sharksdontfly for taking this feature on and getting the multiple event store adapters implemented.

simon and others added some commits Dec 9, 2016

simon
extreme eventstore adapter implemented delete snapshot; allow to spec…
…ify event names different from event module name by use'ing EventName 'custom-event-name'
simon
restart aggregate registry on eventstore process death; update Aggreg…
…ate.aggregate_version from last received RecordedEvent.event_id
simon
extreme eventstore adapter retries read from first event number when …
…a read did not reach end of stream and the number of read events are less than given count
simon
Remove `:eventstore` from config
Initial in-memory default event store adapter.

Set default adapter to `Commanded.EventStore.Adapters.InMemory`
Remove event store adapters
They will be moved into their own projects.
Remove PostgreSQL service from Travis CI config
Use latest Erlang and Elixir versions.

slashdotdash added some commits Apr 15, 2017

Extract type name behaviour from serialization
Define module name type provider as default implementation. So
`%An.Event{}` module is mapped to the type string "Elixir.An.Event".
Do not supervise event store adapter
Adapter should configure its own supervision tree using the mix
application settings.

@slashdotdash slashdotdash merged commit e966282 into master May 14, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@slashdotdash slashdotdash deleted the sharksdontfly-eventstore-behaviour branch May 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment