HTTP Persistent connections on Apache web-server

W

webdev50

Hi,


I need to implement a solution which needs a HTTP persistent connection

from the client( any browser ) to the webserver ( Apache here )


This is how I am trying to acheive the persistent connection:


For every user logging on to the webserver, the browser sends a HTTP
request to the webserver which is being handled by a servlet on the
webserver. The servlet then creates a thread which holds the response
object and waits for some asynchronous data coming from a diff backend
sever.
As soon as some data is posted on to this thread, this thread sends
back the data to the clent on the response object that it has been
holding as a java-script object.
This thread is terminated only when the user logs out od the webserver.



Now, I have a few questions on this part:


1) I find that it is not an appropriate solution, given the fact that
the webserver needs to cater to 20-30k users at a time and creating a
thread per user on the webserver would really not solve the purpose. Am

I right ? ( The webserver would die is n't it?..)


2) Also, is there any limitation on the time that the thread can hold
the response object? like if the thread doesn't get any data posted on
to it from a diff backend sever, will the client( here IE or mozilla )
close the underlying socket connection ?


3)Any limitation on the scalability of this approach ( I want to know
to how many users will this approach solve )?


4) Now given my inner feeling that this approach won't work well, what
is the best way to implement a lonf-lived HTTP persistenet connection
from my browser to the webserver.
(Please note that the webserver need to push some asynchronous data to
the client as long as the user is logged on the webserver ..no refresh
mechanism please )


Apprecaite if reponded well!!!


Thanks in advance to ALL
"webdev50"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top