Search code examples
notificationseclipse-scout

Scout Eclipse Notification for server


I ask early about notification on client here. Now I am interesting in notification for server side. In particular I am interesting in fact that notification inform all servers.

My problem is cluster of servers. I have some database elements cashed on all servers. If some user on any server update database element cash need to be refresh. Notification could do the job.

Or is there another way to deal with cluster of servers ?

Marko


Solution

  • There is no complete tutorial on this topic, I'm afraid.

    Scout however does have the functionality you are looking for in the form of the IClusterSynchronizationService. You can use it to register listeners and send messages between Eclipse Scout servers.

    For it to work, you'll need a message passing system (message queue) such as ApacheMQ or RabbitMQ. You simply have to install the necessary connector from the Eclipse Marketplace and register them for integration in your application. A detailed explanation is in this tutorial. (You need to add the new connector as dependencies to your product files, register the cluster synchronization service, and configure it with properties for host, port, ...).

    The "BahBah" Demo chat application on GitHub has an implementation of these listeners and how to register them.

    The (inofficial) fork of the BahBah Chat demo has some of these changes already built in.