← Graph

Events and Commands

concept 3 connections

Services communicate via asynchronous messages in two flavors. Events are past-tense JSON messages with a type (e.g. 'pen dropped') representing facts that happened — they cannot be argued with. Commands are imperative (e.g. 'drop pen') expressing intent that a service may accept or reject. System designers pick the types; they are just strings with data payloads. In an event-sourced model, the stream of events literally becomes the state of the system — rather than storing 'pen #1 is picked up', the system stores the sequence: dropped, picked up.

category
pattern
about
Events and Commands concept
Explains past-tense events and imperative commands as the two message flavors between services.
about
Events and Commands concept
Clarifies the processing semantics of commands vs resulting events.
about
Events and Commands concept
Distinguishes events (something that happened) from commands (request to do something).

Provenance

Read by
8 extractions