I'm investigating how we can notify UI/async clients (websocket) about an update which happened in an embedded view.Let me elaborate... We currently have a newsfeed where NewsItem is an aggregate root which acts as a wrapper for news about other aggregates. News is extracted asynchronously from domain events of several aggregates. For example BlogPost. The NewsItem contains a type to identify where the news is about (for example NewPost), a timestamp and also the target user ID. There is a newsfeed view-service which combines the items with the real contents of the wrapped aggregate in order to serve the items as a JSON feed in a paginatable fashion. NewsItemViews about a BlogPost also contain the number of comments. Now what should I do when another comments is posted to the BlogPost? Or the contents of a BlogPost is edited? We already have a websocket-based callback system to update the UI of a registered target user. How should I design the event when the contents of the view within a news item is changing?
Is there a ddd approach for sending events about embedded aggregate views
domain driven design;asynchronous programming