Skip to main content
added 15 characters in body; deleted 13 characters in body
Source Link
Pepster
  • 299
  • 1
  • 10

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 newsfeed to be updatedevent when the contents of an itemthe view within a news item is changing?

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 newsfeed to be updated when contents of an item view is changing?

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?

edited title
Link
Pepster
  • 299
  • 1
  • 10

How to notify Is there a client when data in theddd approach for sending events about embedded view is updatedaggregate views

edited title; edited title; edited title
Link
Pepster
  • 299
  • 1
  • 10

How to updatenotify a client when data in wrappedthe embedded view is updated

Source Link
Pepster
  • 299
  • 1
  • 10
Loading