My original wording is confusing. What I was trying to say is that aggregates, once replayed to the operational state (if that makes sense), should not see the same events that they themselves created. In practice this is enforced with some sort of event number. So if aggregate replayed events 1,2 and 3 and produced event 4. If system applies that…
Yes, that would be its job.
However, I would caution you at looking at the system this way too much. It is better to first approach it from the point of CQRS. What you often will find is that Command side will already have some sort of “sensor” built in. For example, an external system (which represents the command side) may…
Or Erlang. See you on the other side :-)
Here is an example of a web request handled with a standard http server, called cowboy: