A brief history of CQRS
Before delving into how CQRS will fit into our event sourced app, I thought it important to at least briefly touch on the origins of this approach. Doing so should help you see how this approach evolved and the kinds of problems it was trying to solve.
CQRS has its origins in the Command-Query Separation (CQS) principle, which was first conceived by French technologist Bertrand Meyer, who is the creator of the Eiffel programming language. According to Wikipedia, the definition of CQS is:
It states that every method should either be a command that performs an action, or a query that returns data to the caller, but not both. In other words, asking a question should not change the answer. More formally, methods should return a value only if they are referentially transparent and hence possess no side effect.
In short, if you are returning a value as part of a method invocation (a query) then you cannot also mutate state as part of that call. Also, if you are going to...