Migrating Ajax web application to web socket
Posted
by
Bastan
on Stack Overflow
See other posts from Stack Overflow
or by Bastan
Published on 2011-01-08T03:46:49Z
Indexed on
2011/01/08
3:54 UTC
Read the original article
Hit count: 178
Hi, I think i'm just missing a little detail that is preventing me from seeing the whole picture.
I have a web application which use ajax request every x time to update client with new information or tasks.
I also have a long running process on the server which is a java computation engine. I would like this engine to send update to the client.
I am wondering how to migrate my web app to using websocket. Probably phpwebsocket or similar. Can my server 'decide' to send information to a specific client? It seems possible looking at the php-websocket.
Can my java backend long process use the websocket server to send notification to a specific client. How? well I can say that my java app could use a class that could send over websocket instead of http.
But how the websocket server knows to which client to send the 'info'. I am puzzle by all this. Any document that explain this in more details? It seems that the websocket could create an instance of my web application.
Thanks
© Stack Overflow or respective owner