A breakdown of the three fundamental message types in distributed systems: imperative (Commands), interrogatory (Queries), and informational (Events/state). Each flavour has a distinct purpose and should not be mixed. Commands instruct action, Queries ask about state without changing it, and informational messages (including Domain Events) communicate what has happened or the current state. The post also covers the Single Responsibility Principle applied to messaging: Commands shouldn't return state, Events shouldn't assume receiver behavior, and Queries shouldn't cause side effects. Domain-Driven Design concepts like Intention-Revealing Interfaces and Ubiquitous Language are used to illustrate how to name messages meaningfully.
Table of contents
Imperative MessagesInterrogatory MessagesInformational MessagesMixing FlavoursRead More30 Impressions