Push server in a clustered environement

Hi all,

I’m using vaadin-push features to notify any connected user when data is modified.
I implemented a broadcaster and each user UI is registered on the broadcaster . When data changes, the broadcaster loop on all available UIs object and invoke a particular method with broadcast message in parameter.
Until now, every thing is ok.

Nevertheless, troubles comes when my application is deployed in a clustered environement.
In fact, suppose I have 10 nodes and at a given instant i’ve got 1000 users connected to the app. We suppose also that each 100 users are connected on one node.
One of these users (connected to the node N° 1) will execute an action that is supposed to notify all other users.
This action is executed on jvm of node N°1. The broadcaster will iterate over all registered UIs on jvm of node N°1 and send to them a push notification.
The problem is that 900 other users will not be notified.

Is there any advice to find a solution for this problem?

This isn’t exactly a Vaadin related problem, rather, a pure Java problem about broadcasting the event in a cluster. For this, you can use something like the Akka framework. I haven’t used it myself, but I have some colleagues using Akka in their projects and I’ve heard good things about it.

I have same problem.

I thinks Vaadin Push can push in cluster enviroment because It’s extended from atmosphere Framework.

Who can help me, please,

I think this question targets a layer below Vaadin - the problem is on how to notify all nodes with a single message. There are plenty of software solutions that make this available. For example in JavaEE you can use JMS broadcasting to achieve that; in other kind of developments you can use a standalone JMS server, or a Kafka server, or Akka, or even go lower level and use JGroups (or Hazelcast) - all solutions have their own advantages.

The idea is then as follows: all nodes will subscribe to a common messaging system; the messaging system will then be in charge to rely notification messages to all nodes, which can then in turn use Vaadin UI.access() to push notification to the browsers.