Vaadin Push in clustered environment usecase

Hi!

Are there any usecases to use Vaadin in a high-availability clustered environment?

I have a JEE cluster with http session replication. Vaadin application requests a long-time asynchronous operation processed by backend services. Backend replies with a result to the application using JMS queue, then application updates UI. A node that receives JMS reply message may not be the same that sent the request. Thus:

  1. First, we must obtain VaadinSession instance to get UI object (by saved session ID used as correlation ID in JMS reply). To do it we may register SessionInitListener/SessionDestroyListener that will cache all sessions locally on every node (while all sessions are replicated between nodes).

  2. The second problem is that VaadinSession.access*() synchronizes locally but not between nodes. We need to use an external facility to aquire distributed lock on session.

  3. As the documentation says we may make changes on UI with ui.access(). But if current node is not the same which holds push request, UI changes will not be propagated to browser as ui.access() works only locally.

The alternative (good?) way is to create a distributed cache that maps Session ID to the node instance where the last HttpRequest was proceeded. All we need is to hold handleRequest() to create/update entry in cache and to listen for sessionDestroy() to remove it. Then we use JMS topic instead of queue in order to deliever reply to every node. A node will query the cache and bypass message processing if it does not hold request.

Any other idea? Will Vaadin support clustering out-of-the-box?

Salu2,
Antón