Handle Web Server with multiple clients

旧时模样 提交于 2019-12-12 01:57:44

问题


I am working on a web application which can serve only one client.Now I need to include functionality to serve multiple clients. For that one mechanism should be there in which all the clients can see OR will be notified if any changes are done by some another client in the application. So my job is now to notify all the clients once any changes are done from the back end by another client.

I found one solution in which I will call one cgi script from javascript at a particular period of time and it will let the other users know about the notifications done (i.e by alerts). But I think that it will be an overhead to server to continuously call that script repeatedly. Is there any other solution in which I can resolve my purpose ???

Thanks in advance...


回答1:


This depends a lot on your server side technology, but what you are probably after is something like Javascript Comet (Wikipedia)

There is a thread on StackOverflow here talking about Comet



来源:https://stackoverflow.com/questions/7567462/handle-web-server-with-multiple-clients

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!