Note that there are some explanatory texts on larger screens.

plurals
  1. POUnderstanding mod_proxy and Apache 2 for writing a comet-server
    text
    copied!<p>I currently try to implement a simple HTTP-server for some kind of <a href="http://en.wikipedia.org/wiki/Comet_(programming)" rel="noreferrer">comet</a>-technique (long polling XHR-requests). As <code>JavaScript</code> is very strict about crossdomain requests I have a few questions:</p> <ol> <li>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!</li> <li>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 <code>JavaScript</code> delivered by my apache and my comet-server running on a different port, because of some crossdomain restrictions. --> Does not work!</li> <li>Then I came up with the idea to use <code>mod_proxy</code> to map my server on a new subdomain. I really don't could figure out how <code>mod_proxy</code> works but I could imagine that I know have the same effect as on my first approach?</li> </ol> <p>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?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload