|Intense server push dynamic updates on RAP 2.1 [message #1096502]
||Wed, 28 August 2013 13:27
| Milko Krastev
Registered: July 2013
Working on a project for sport live scores, I came across the following situation (problem). |
Data is pushed from outside source in a predefined format reflecting the current score in a sport match. This match can be football, tennis, basketball, etc. Each user can individually subscribe to receive live updates for n matches of all types. That leads to very frequent updates, i.e. server pushes.
So I added all possible supported matches as singleton Java bean instances to the ApplicationContext. Information on each sport match is represented as a widget in the user interface. This widget registers itself as a PropertyChangeListener with the corresponding sport match Java bean in the ApplicationContext. So should a match update occur, the corresponding Java bean is updated, all users subscribed to that match receive live update in the relevant widget. It works ... soft of.
However, there are some complications.
1. How do I update the singleton Java bean instances representing all matches a user can subscribe to from outside RAP (e.g. Timer service, Message Driven Beans, etc)? Currently, these instances are dummy and update themselves with random values.
2. Do you think this solution would work for say 500 simultaneous users?
3. In case of clustered environment (JEE mode), do I have one singleton ApplicationStore across all servers in the cluster, or one for each server?
That's a very common scenario and I believe its discussion would be interesting. Thanks.
Powered by FUDForum
. Page generated in 0.11458 seconds