New answers tagged

1

Is this a significant problem? Maybe? How important are differences in timing between the different projections? Assuming that these projections are listening to the events independently of each other, there can be a bit of drift when the projector gets ahead of, or falls behind, the html renderer. What happens to the html renderer if the database is ...


0

My question has been answered in this article: http://php-and-symfony.matthiasnoback.nl/2015/01/some-questions-about-the-command-bus/ The command bus has no return value. So instead of waiting for the ID to come back from the database, the ID should be one of the values of the command object. If you then hand it over to the command bus, and nothing fails,...


1

In this example of the command pattern, returning a value is handled with a callback. I would imagine that a future or promise would work just as well. Decoupling of the return type is not mentioned in the example; in systems I've seen that are similar to this where you subscribe to an Event (the moral equivalent of a "generic" callback), one would return ...


0

Geert-Jan, I too think the compensation action can simply delete the corresponding event(s). It makes sense and it shows another benefit of Event Sourcing design pattern: easier implementation of the Compensating Transaction design pattern. Some say deleting the event violates the "principles" of event sourcing or CQRS. I think that's a limiting ...


3

In retrospect, I think I was complicating the issue. In general, commands should either throw an exception or raise one or more events. If I could summarise the architecture of Event Sourcing it would be as follows: Commands are inputs representing instructions to do something. Events are outputs representing historical facts of what was done. Event ...


1

You'll get a system that is architecturally more loosely coupled if you only emit events from a command. Put another way, one command should not need to know what other external commands to issue; that should be the responsibility of the external party (who should subscribe to the event, and could be, as you mentioned, a saga manager having coordination ...


1

Recommended viewing: Udi Dahan on Reliable Messaging -- it's not quite what you are describing, but closely related. Now, is it common practice for a command to not emit any events, but rather to enqueue another command? I haven't seen anybody recommending that practice. Short answer: if you don't save some state, then you can't recover the enqueued ...



Top 50 recent answers are included