Discussion About Blocking Closing Get and Post Methods in Servlet Communication
I was developing a java application that posts the data to a Servlet (something similar to a chat room) in which the data is communicated between distributed clients all over the internet. As you know HTTP communications are not fast like socket communications especially when you have to update your client status. i.e. we all agree that you can post data from your client to the servlet whenever you want but how can you get the new data from the servlet instantaneously (almost instantaneously). I Googled the web for such stuff and found a good solution which is often used in java-based chat rooms. The solution is simple in which the servlet will block the GET/Post requests from the client i.e. the get/post timeout in the client side should be set to zero thus they willn't time out, on the servlet side the Servlet will accept the requests but will not close the connections it until it updates them with new data (i.e. to block closing the connections until it updates them with new data).
The above is a short brief for the real implementation.
Any way I just wanted to share this technique with you and check out your reviews, ideas, comments.