Hi,
Great question.
For this scenario I would use a websockets/long polling based solution. A domain event would be fired in one bounded context and it would be handled in the website. The website would then pump the event down to the browser; perhaps translated into a UI-specific format.
In .NET I would use SignalR, on the JVM I would use Atmosphere.
Other solutions do exist, though, especially when using Event Sourcing. You could expose your domain events as an atom feed, which is directly polled by the UI. As soon as a new event appears on the atom feed, that is the UI's trigger to apply the event to the UI.
With the latter approach you have to write the polling logic yourself on every view page. With the former you have to learn a complex framework and couple yourselves to it a bit.
Inside a desktop application/WPF it's probably easier. Inside your message handler you could just update the view model, which would then propagate changes to the UI, if you are using MVVM.
Sound useful?
Last edited by nick_t; August 4th, 2015 at 01:25 PM..
|