I am developing restful services using resteasy for an application. This application has UI which will consume these rest services.
Now I am having a case where I have to do a server push to UI(Client). Across browsing over internet I see Websockets, atmosphere2.0, etc.., however I am wondering how I can capture all the audience using my application to do a server push to the UI.
Also I have to invalidate the connection or time out the user session if there is no activity detected for 30 min.
How can I achieve this?
I have heard of the observer pattern, not sure how it will help in my case.