Check if UI is alive from server

Is it possible to check, given a UI id, if that UI is still alive? From the Servlet or the ContextListener maybe?
I would like to not wait for the server to discover it when we miss three heartbeats, but proactively asking if a certain UI is still alive.


Normally, the server-side just processes client requests as they come. So, you have such active client polling, you’d need a separate thread to do that and use server push to make polling. For polling the client, you could execute a JavaScript call to a server-side callback.

However, as we are talking about push, AFAIK the push transport already does connection management and knows if the client is alive, so you don’t need polling. I don’t know if the push APIs are very exposed, but maybe can be accessed.

Thank you for the info.
The other option is to set a low heartbeat. What is the lowest you recommend to use? I guess it is directly connected with how many client at the same time I expect to have?