[Opensim-dev] HttpServer overview & RFC

Stefan Andersson stefan at tribalmedia.se
Thu May 29 09:16:32 UTC 2008


To me it sounds like 'Handled' is the flush-and-end helper function to 'Detached'?
I guess the best example is the "long poll" of the LL http polling queue, where every request is specified to be 'held' for a time interval, so that the server can add events over a time.
 
And, on that note : one of the problems we see and will see even more, is that http requests that are taken from the thread pool helps to exhaust the pool.
 
If we had some declarative way of stating 'this handler has the potential to be long running' meaning it will get a new thread allocated, that would probably be a good idea.
 
(Or the http handler has an internal private thread pool)
Best regards,Stefan AnderssonTribal Media AB Join the 3d web revolution : http://tribalnet.se/ 



> Date: Thu, 29 May 2008 09:52:54 +0200> From: DrScofield at xyzzyxyzzy.net> To: opensim-dev at lists.berlios.de> Subject: Re: [Opensim-dev] HttpServer overview & RFC> > Dr Scofield wrote:> > Sean Dague wrote:> > > >> On Wed, May 28, 2008 at 08:07:23AM +0200, Dr Scofield wrote:> >> > >> > >>> hi all, another request for comments :-)> >>> > >>> > >> First, +1 on the approach here. A couple of questions / comments in> >> line just to educate myself.> >>> >> [...]> >> [...]> >> > >>> == making use of HttpServer ==> >>> what i'd actually like to implement (either as an HttpModule or as an> >>> HttpListener handler) is an event--event handler scheme:> >>> * incoming HTTP request is pushed as an OSHttpRequest object into an> >>> HTTP request queue.> >>> * each OSHttpRequest encapsulates> >>>> >>> * the HTTP request header,> >>> * an input stream fed by the remote client,> >>> * an output stream feeding the remote client> >>> * method to produce OSHttpResponse object (for signaling redirects,> >>> setting status codes, etc)> >>>> >>> we have a pool of OSHttpRequest pumps that take OSHttpRequest objects> >>> and pump them via the registered event handlers to whoever registered> >>> an interest (via multicast mechanism that stefan already explained a> >>> couple of days ago as well)> >>>> >>> event handlers return either> >>> * Pass --- didn't act on it> >>> * Handled --- acted on it, response return as out parameter> >>> * Detach --- acting on it, taking care of it myself, don't do> >>> anything> >>> > >>> > >> Can you give an example of Handled vs. Detach usage?> >> > >> > > Handled: simple request for an item/an action, no streaming per se > > involved.> > Detach: HTTP connection that we keep open; for example, "long poll" > > support: client connects, requests status update, OpenSim queues the > > request by detaching the OSHttpRequest from OSHttpServer and placing it > > in a queue. OSHttpServer happily continues, not sending anything back > > nor closing the input and output streams. eventually the event the > > client was interested in occurs, event handler goes through queue of, > > err, queued OSHttpRequests and responds --- optionally re-queuing the > > OSHttpRequest.> > > another example for detach: streaming media (though can't really think > of an OpenSim example in that context).> > > -- > dr dirk husemann ---- virtual worlds research ---- ibm zurich research lab> SL: dr scofield ---- drscofield at xyzzyxyzzy.net ---- http://xyzzyxyzzy.net/> RL: hud at zurich.ibm.com - +41 44 724 8573 - http://www.zurich.ibm.com/~hud/> > _______________________________________________> Opensim-dev mailing list> Opensim-dev at lists.berlios.de> https://lists.berlios.de/mailman/listinfo/opensim-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080529/7c1ebee8/attachment-0001.html>


More information about the Opensim-dev mailing list