sophana wrote: > Jeff With The Big Yellow Suit wrote: > >>> If someone could explain, I would be grateful... >> >> If I'm interpreting your questions and statements correctly >> then you seem to have two misunderstandings. One is about >> how HTTP requests work, and the other is about the costs >> of threading. Please forgive me if I've gotten either of these >> interpretations wrong. >> >> To correct the first misconception, here's an outline of how an HTTP >> request works. >> >> 1) Client opens a TCP connection to server. >> 2) Client sends HTTP request to server over TCP connection. 3) >> Server performs request 4) Server returns the results over _the >> same_ TCP connection. 5) TCP connection is terminated > > I know that already. > I simply didn't understand why the server was polling anything in the > first email of this thread. It is a very specific application for very > long responses (more than 5 minutes)
That's not the only application; it would also be useful if the client wants *instant* notification when something has happened on the server, rather than waiting several seconds for the next polling interval. > >> >> To correct the second misconception, threads are *not* >> zero cost. They're cheap in comparison to forking, but they're >> nowhere near free. That's why non-threaded networking >> frameworks such as twisted exist. By avoiding the costs of >> threading they can achieve much higher throughputs. >> > Sorry, I will repeat myself: We are not talking about the same > threads. Python threads have NOTHING in common with the threads you > are talking about. Not true -- Python really does use actual, honest-to-goodness operating system threads. - Geoff ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss