[hunchentoot-devel] COMET with Hunchentoot?
Hans Hübner
hans.huebner at gmail.com
Mon Mar 2 13:31:13 UTC 2009
On Mon, Mar 2, 2009 at 12:49, Edi Weitz <edi at agharta.de> wrote:
> On Mon, Mar 2, 2009 at 11:49 AM, Hans Hübner <hans.huebner at gmail.com> wrote:
>
>> Wouldn't you be able to write a task manager that first reads the
>> request header, then decides whether the request is a COMET request
>> and queue it or hand it over to another thread for processing?
>
> If you first read the request header, you're interfering with the rest
> of the architecture which expects to be able to read the whole request
> including headers from the client.
The interaction between PROCESS-CONNECTION and PROCESS-REQUEST would
need to be revised in a manner that makes it possible for a request
handler to return to in a manner that prevents the stream from being
closed or polled for data again. As a start, reading the request
header, creating the request object instance, processing the request
and sending back the reply should be split and made more explicit so
that an application could implement a different flow of control, but
still use the components that Hunchentoot uses.
The COMET acceptor class would then be able to interrogate after the
headers of the request have been read and handle COMET requests
differently from others.
-Hans
More information about the Tbnl-devel
mailing list