On 2001.12.19, Peter M. Jansson <[EMAIL PROTECTED]> wrote: > On Wed, 19 Dec 2001, Dossy wrote: > > > I think Pete's point is (Pete, correct me if I'm wrong): > > > > What goddamned business does any web developer have desigining > > a single page that fires off a bring-your-server-to-its-knees > > type of query or functionality? > > I just needed to correct this point -- I'm arguing for managing visitor > expectations better. Sometimes a bring-your-server-to-its-knees request is > OK, as long as it's understood beforehand that the request will have this > effect.
I still think it's a design issue. If there's something that's going to take a long time, then kick off the request in a worker thread, return the user to the website but provide them a link somewhere in the navigation that lets them bring up the long-running process when it's done. This implies session management has been implemented as well, but hey, nobody said life was easy. You could also use the dslreports.com trick. One page kicks off the expensive, potentially long-running query but returns a page that says "processing ..." with an animated GIF. The GIF pretends to be a status bar, and the last frame of the GIF (it's non-looping) says "done! click here to view your results." The image is a link to the next page which pulls the results (from a database?) and displays them. If a user clicks on the image early, the results page displays "no info. available" placeholders for what's still being computed. It's trickery, but it's still better than having a user sit watching a spinning globe ... -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)