can any one give me guide line for making desktop client and and web server chat application. I have to do this project in java(both side client and server), for server side i am doing work in Jsp/servlet with tomcat, but how to make client application communicate with web server and if two clients want to chat what would be the best approach to follow...?

有帮助吗?

解决方案

There are two common designs, i.e Client pull and server push. Each has its own merit and disadvantages.

Client pull requires you to make periodic request to server which may cause traffic load on the server but it is easier to implement.

Server push requires you to have a "server" running on client side waiting for target server to push the message. This sounds more efficient but if you have million of clients connecting to your server, you are likely to have a large number of connections (ports) opened all the time which can be a waste of resource. This is more difficult to implement since you will need to make a client-side server as well.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top