Lazy web sites run faster
gojko.net
gojko.net
"The key to solve this problem lies in the classical definition of speed. In Physics, speed is defined as the distance divided by time required to cross that distance. So we can make the requests run faster either by decreasing the time, but we can also do it by shortening the distance."
If S = D/T, then to increase speed while holding time constant, you'd need to increase distance, not decrease it. I think it would be better if we thought about the performance he is talking about as what it really is... throughput.
If you have a big pipe spewing water, you can increase the throughput by either increasing the pressure of the water (optimized code) or by removing the rocks in the pipe (long-running/synchronous I/O threads). (Removing said rocks increases cross-sectional area.)
One thing that holds true, however, is that a browser won't make another request to a single server if two requests are still outstanding. So if, say, you have a COMET connection open and a long running server side AJAX request, none of your other AJAX requests will run. This might make the interface appear to hang, regardless of how many connections your web server can handle. I would say the general idea of returning quickly is probably a good one.
I'm sure a lot of you have seen this already, but I love it: http://www.sics.se/~joe/apachevsyaws.html
It seems trivial, but it is quite important.
In regard to the other point: the batch server should never fail since tasks are spawned off as another thread, and even if it does, the tasks are in fact stored in a database.
Fun times!