Hi Guys,
Aside from the earlier mentioned compile-time reduction techniques
being used now in the HEAD of 0.8-devel, I'm also getting along fine
on the asynchronous HTTP server part. Here's the top-level conceptual
gist:
1. When a connection is accepted, all connection-related logic for
asynchronous request processing is done at the connection level
(nothing new here).
2. The connection will then schedule the handler function call in a
thread pool that is passed to it by reference from the HTTP server.
This function will take a request object (without a body) and a shared
pointer to the connection that invoked it.
3. The handler can then schedule its own asynchronous calls like
asynchronous reads, and perform asynchronous writes -- the reads will
be handled in the io_service thread running the HTTP server, but the
handler is invoked in the worker thread pool. Asynchronous writes will
be queued by the connection -- a call to 'write' will require a Range,
which will be linearized into a buffer (Boost.Array or a streambuf),
then schedules an asynchronous write to the socket associated with the
connection.
This will change the requirement on the Handler to be passed by
reference to the HTTP server. The signature of the handler function
will take a `basic_request<http::tags::http_async_server> const &` and
a `async_connection<http::tags::http_async_server, Handler> &`.
There's an example of the new handler signature here: http://goo.gl/W9Rp
HTH
--
Dean Michael Berris
deanberris.com
|