Skip to content

Instantly share code, notes, and snippets.

@nWidart
Last active August 29, 2015 14:13
Show Gist options
  • Save nWidart/8446ecc5daf05d12426f to your computer and use it in GitHub Desktop.
Save nWidart/8446ecc5daf05d12426f to your computer and use it in GitHub Desktop.
A brainstorm for Broadway laravel integreation

Bindings

Interface Implementation
CommandBusInterface SimpleCommandBus
UuidGeneratorInterface Version4Generator
EventDispatcherInterface Broadway\EventDispatcher\EventDispatcher
RepositoryInterface Broadway\EventSourcing\EventSourcingRepository
Broadway\EventStore\EventStoreInterface Broadway\EventStore\DBALEventStore
Broadway\EventHandling\EventBusInterface Broadway\EventHandling\SimpleEventBus
Broadway\EventSourcing\AggregateFactory\AggregateFactoryInterface Broadway\EventSourcing\AggregateFactory\PublicConstructorAggregateFactory
Broadway\Serializer\SerializerInterface Broadway\Serializer\SimpleInterfaceSerializer
Broadway\ReadModel\RepositoryInterface Broadway\ReadModel\ElasticSearch\ElasticSearchRepository

W.I.P. Service Provider

Configuration

  • How to configure the data store (mysql/postgress/mongo...) ?
    • A: Looks like this is the class implementing Broadway\EventStore\EventStoreInterface. This can ben a DBALEventStore (with the problems explained below) or an InMemoryEventStore which doesn't have any dependencies, aka for testing purposes.
  • How to setup Elasticsearch as read model ?

Event Store

About the Broadway\EventStore\EventStoreInterface, there is a DBALEventStore, which uses Doctrine DBAL, but has more dependencies:

  • Doctrine\DBAL\Connection $connection
  • Broadway\Serializer\SerializerInterface $payloadSerializer
  • Broadway\Serializer\SerializerInterface $metadataSerializer
  • $tableName

Using Laravel-Doctrine package, how can we get these requirements? The DBAL connection has been instantiated but don't know what the 2 SerializerInterface dependencies are.

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