Desk Notifications
A common pattern in dealer applications is a memory-persistent queue of messages that are are not specific to a group of users, but all new users want to be updated with messages when they log on. Although we will use the example of desk notifications, similar requirements are found for things like a live history of exchange notices and associated news feed type behaviours.
The simple design below shows a queue of desk updates that also acts as a short history, so users arriving later will see a full set of historic messages. these are automatically pushed to the client until they are up to date. The example also shows that from the dealer point of view we need nothing more complicated that a simple RPC call which can be used to add messages directly into the shared queue.
This particular form of shared queue in rubris-io is circular (which can be as big as we want) so new messages overwrite the oldest.
We can further extend this by pinning the queue to prevent its disposal when all users unsubscribe if we wanted to have the queue live irrespective of any users being logged on.