Events

How Services Tell Each Other What They've Done
and how entities get their data

An event is also a message, and also just a data structure.

You might think of events as _responses_, but they're not like responses in an HTTP request/response sense. Events can be received by any number of recipients, not just the sender of the original command. Also, a handler might respond or _react_ to a command by writing many different events.

Often (in simple scenarios), events look a lot like the commands that they respond to.
 

Commands are usually named in the imperative, present tense, e.g.: Deposit. Events are usually named in the past tense, e.g.: Deposited. Events record what has already happened in the past, where as commands are directives and instructions for work that a service carries out.

Events are written to streams. All of the events for a given account are written to that account's stream. If the account ID is 123, the account's stream name is account-123, and all events for the account with ID 123 are written to that stream.

When the deposited event is issued in response to handling the deposit stream, it is written to the account's stream.