Sending notification or triggering an event in another user’s session

Is there a way to trigger an event on another user’s session ?
For example I may want a service to send a notification automatically to a user without their interaction.
In such a case the user will suddenly see a pop up message.

How can this be done ?

Use UiEventPublisher bean. There’s a good implementation example in this post.