Question

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...?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top