Hi folks,
I currently try to implement a simple HTTP-server for some kind of comet-technique (long polling XHR-requests). As JavaScript
is very strict about crossdomain requests I have a few questions:
- As I understood any apache worker is blocked while serving a request, so writing the "script" as a usual website would block the apache, when all workers having a request to serve. --> Does not work!
- I came up with the idea writing a own simple HTTP server only for serving this long polling requests. This server should not be blocking, so each worker could handle many request at the same time. As my site also contains content / images etc and my server does not need to server content I started him on a different port then 80. The problem now is that I can't interact between my
JavaScript
delivered by my apache and my comet-server running on a different port, because of some crossdomain restrictions. --> Does not work! - Then I came up with the idea to use
mod_proxy
to map my server on a new subdomain. I really don't could figure out howmod_proxy
works but I could imagine that I know have the same effect as on my first approach?
What would be the best way to create these kind of combination this kind of classic website and these long-polling XHR-requests? Do I need to implement content delivery on my server at my own?