The goals of the business
Implements a bounded context Exposes resources HTTP used for scaleability (Stateless) Navigated using hypermedia, client only needs to know root URL Not dependant on anything other than event bus UI could be HTML (person), JSON (machine) etc. HTML UI is task based, not CRUD (data) based.
Receives messages from producers Forwards messages to listening consumers
e.g. RabbitMQ, Redis
Something significant which happened
Dependencies point inwards Domain model on the inside (aggregates, commands etc.) Adapters for external concerns, e.g. data store
Encapsulates a business usecase Named such as CreateReviewProduct Have side effects Mutate "write" database OR event store Publish event, named in past tense e.g. ProductReviewed Talk to one aggregate root
Encapsulates a business usecase Named as such FetchProductReview Have no side effects Read from "read" database Talk to one aggregate root
Encapsulates related entities One entity is the root, direct access of other entities is not possible.
Model a distinct business concept, e.g. Product Has an identity Rich in behaviour
Models something without identity, e.g. Address
Stores events, i.e. changes to aggregates Form an audit trail for reporting Publish event that a new event has been received schema: aggregate_id, event_name, data
e.g. MongoDB
Read/Write entities to/from data store
Listens to events published by event store, commands (in process) or services. Writes denormalized data to "read" database Caches locally data fron other services
Fully denormalized removing need for JOIN's Each table provides a view of the data, tables may contain duplicate data.
e.g. MySQL, Postgres, MongoDB