<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/apache/httpd.git/include/http_request.h, branch apreq-integration</title>
<subtitle>github.com: apache/httpd.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/'/>
<entry>
<title>Introduce Suspendable Requests to the Event MPM.</title>
<updated>2008-09-20T11:58:08+00:00</updated>
<author>
<name>Paul Querna</name>
<email>pquerna@apache.org</email>
</author>
<published>2008-09-20T11:58:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=767cc30c029cabba2796303f705bf6e8595083a5'/>
<id>767cc30c029cabba2796303f705bf6e8595083a5</id>
<content type='text'>
Using this basic framework, you can return SUSPENDED from an HTTP Handler,
and then register a callback that is invoked by the MPM at a later time.

This initial version only supports _timers_ as callbacks, but in the future I
would like to add things like wait for socket activity, on a socket specified by
the handler.

Once in a callback, It is then the responsibility of the callback fucntion 
to finish the HTTP Request handling, but this alows you to do cool things like 
a fully async proxy, COMET support, or even rate limiting.

To prove I'm not insane, I've inlcuded an example module, mod_dialup.

You can configure it like this:
&lt;Location "/docs"&gt;
  ModemStandard "V.32"
&lt;/Location&gt;

And for static files inside that path, you will be rate limited to V.32 speeds, 
aka 9.6 kilobits/second.

Does anyone besides RÃ¼diger read commit emails :-) ?

I know there are likely huge problems with this, but I would like to see how far
we can push the Event MPM, figure out what to do better, if there is anything, 
and then really dive into the 3.0 development before ApacheCon.

* server/mpm/experimental/event/fdqueue.h:
    (timer_event_t): New structure to hold timer events and callback functions.
    
* server/mpm/experimental/event/fdqueue.c
    (ap_queue_empty): Modify to also look at Timer Ring.

    (ap_queue_init): Initialize Timer Ring.

    (ap_queue_push_timer): New function, pushes a timer event into the queue.

    (ap_queue_pop_something): Renamed function, returns a timer event or
        a socket/pool for a worker thread to run.


* server/mpm/experimental/event/event.c
    (process_socket): If the connection is in SUSPENDED state, don't force it
        into linger mode yet, the callback will have to take care of that.

    (push_timer2worker): New shortcut function, pushes timer event into queue
        for a worker to run.

    (timer_free_ring): New global data structure to recycle memory used by 
        timer events.

    (timer_ring): New global data structure to hold active timer events.

    (g_timer_ring_mtx): Thread mutex to protect timer event data structures.

    (ap_mpm_register_timed_callback): New Function, registers a callback to be
        invoked by the MPM at a later time.

    (listener_thread): Calculate our wakeup time based on the upcoming Event 
        Queue, and after pollset_poll runs, push any Timers that have passed
        onto worker threads to run.
    
    (worker_thread): Call new queue pop method, and if the Timer Event is 
        non-null, invoke the callback.  Once the callback is done, push the
        structure onto the timer_free_ring, to be recycled.

    (child_main): Initialize new mutex and ring structures.


* server/config.c
    (ap_invoke_handler): Allow SUSPENDED aa valid return code from handlers.


* modules/http/http_core.c
    (ap_process_http_async_connection): Don't close the connection when in 
        SUSPENDED state.


* modules/http/http_request.c
    (ap_process_request_after_handler): New function, body pulled from the old,
        ap_process_async_request.  Split to let handlers invoke this so they 
        don't need to know all of the details of finishing a request.

    (ap_process_async_request): If the handler returns SUSPENDED, don't do
        anything but return.


* include/ap_mmn.h: Bump MMN.


* include/ap_mpm.h
    (ap_mpm_register_timed_callback): New function.


* include/httpd.h:
    (SUSPENDED): New return code for handlers.
    (request_rec::invoke_mtx): New mutex to protect callback invokcations
        from being run before the original handler finishes running.
    (conn_state_e): Add a suspended state.


* include/http_request.h
    (ap_process_request_after_handler): New function to make it easier for 
        handlers to finish the HTTP Request.


* modules/test/config.m4: Add mod_dialup to build.


* modules/test/mod_dialup.c: New rate limiting module, requires the Event MPM 
    to work.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697357 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using this basic framework, you can return SUSPENDED from an HTTP Handler,
and then register a callback that is invoked by the MPM at a later time.

This initial version only supports _timers_ as callbacks, but in the future I
would like to add things like wait for socket activity, on a socket specified by
the handler.

Once in a callback, It is then the responsibility of the callback fucntion 
to finish the HTTP Request handling, but this alows you to do cool things like 
a fully async proxy, COMET support, or even rate limiting.

To prove I'm not insane, I've inlcuded an example module, mod_dialup.

You can configure it like this:
&lt;Location "/docs"&gt;
  ModemStandard "V.32"
&lt;/Location&gt;

And for static files inside that path, you will be rate limited to V.32 speeds, 
aka 9.6 kilobits/second.

Does anyone besides RÃ¼diger read commit emails :-) ?

I know there are likely huge problems with this, but I would like to see how far
we can push the Event MPM, figure out what to do better, if there is anything, 
and then really dive into the 3.0 development before ApacheCon.

* server/mpm/experimental/event/fdqueue.h:
    (timer_event_t): New structure to hold timer events and callback functions.
    
* server/mpm/experimental/event/fdqueue.c
    (ap_queue_empty): Modify to also look at Timer Ring.

    (ap_queue_init): Initialize Timer Ring.

    (ap_queue_push_timer): New function, pushes a timer event into the queue.

    (ap_queue_pop_something): Renamed function, returns a timer event or
        a socket/pool for a worker thread to run.


* server/mpm/experimental/event/event.c
    (process_socket): If the connection is in SUSPENDED state, don't force it
        into linger mode yet, the callback will have to take care of that.

    (push_timer2worker): New shortcut function, pushes timer event into queue
        for a worker to run.

    (timer_free_ring): New global data structure to recycle memory used by 
        timer events.

    (timer_ring): New global data structure to hold active timer events.

    (g_timer_ring_mtx): Thread mutex to protect timer event data structures.

    (ap_mpm_register_timed_callback): New Function, registers a callback to be
        invoked by the MPM at a later time.

    (listener_thread): Calculate our wakeup time based on the upcoming Event 
        Queue, and after pollset_poll runs, push any Timers that have passed
        onto worker threads to run.
    
    (worker_thread): Call new queue pop method, and if the Timer Event is 
        non-null, invoke the callback.  Once the callback is done, push the
        structure onto the timer_free_ring, to be recycled.

    (child_main): Initialize new mutex and ring structures.


* server/config.c
    (ap_invoke_handler): Allow SUSPENDED aa valid return code from handlers.


* modules/http/http_core.c
    (ap_process_http_async_connection): Don't close the connection when in 
        SUSPENDED state.


* modules/http/http_request.c
    (ap_process_request_after_handler): New function, body pulled from the old,
        ap_process_async_request.  Split to let handlers invoke this so they 
        don't need to know all of the details of finishing a request.

    (ap_process_async_request): If the handler returns SUSPENDED, don't do
        anything but return.


* include/ap_mmn.h: Bump MMN.


* include/ap_mpm.h
    (ap_mpm_register_timed_callback): New function.


* include/httpd.h:
    (SUSPENDED): New return code for handlers.
    (request_rec::invoke_mtx): New mutex to protect callback invokcations
        from being run before the original handler finishes running.
    (conn_state_e): Add a suspended state.


* include/http_request.h
    (ap_process_request_after_handler): New function to make it easier for 
        handlers to finish the HTTP Request.


* modules/test/config.m4: Add mod_dialup to build.


* modules/test/mod_dialup.c: New rate limiting module, requires the Event MPM 
    to work.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697357 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>* include/http_request.h: Fix warning with gcc -Wall.</title>
<updated>2008-04-07T12:09:02+00:00</updated>
<author>
<name>Joe Orton</name>
<email>jorton@apache.org</email>
</author>
<published>2008-04-07T12:09:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=cc34f73c892721590e7a47f1202fd3a10ec57caa'/>
<id>cc34f73c892721590e7a47f1202fd3a10ec57caa</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645472 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645472 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove CORE_PRIVATE.</title>
<updated>2008-04-07T08:44:14+00:00</updated>
<author>
<name>Paul Querna</name>
<email>pquerna@apache.org</email>
</author>
<published>2008-04-07T08:44:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=5e415009f36005803cc9f9054e84c1913c5f5476'/>
<id>5e415009f36005803cc9f9054e84c1913c5f5476</id>
<content type='text'>
This define serves no modern purpose, since every module in the wild, including 
our own define it, for no purpose.

If you have functions which you do not want in the 'public' API, put them
in a private header, that is not installed, just like mod_ssl does.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645412 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This define serves no modern purpose, since every module in the wild, including 
our own define it, for no purpose.

If you have functions which you do not want in the 'public' API, put them
in a private header, that is not installed, just like mod_ssl does.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645412 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid calling access control hooks for internal requests with</title>
<updated>2008-04-03T21:51:07+00:00</updated>
<author>
<name>Chris Darroch</name>
<email>chrisd@apache.org</email>
</author>
<published>2008-04-03T21:51:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=c8ba67fb8353858e536fd40cd9ea314a9dc54da2'/>
<id>c8ba67fb8353858e536fd40cd9ea314a9dc54da2</id>
<content type='text'>
configurations which match those of the initial request.  Revert to
the original behaviour (call access control hooks for internal requests
with URIs different from the initial request) if any access control hooks
or providers are not registered as permitting this optimization.
Introduce wrappers for access control hook and provider registration
which can accept additional mode and flag data.

The configuration walk optimizations were originally proposed a while
ago (see http://marc.info/?l=apache-httpd-dev&amp;m=116536713506234&amp;w=2);
they have been used since then in production systems and appear to be
stable and effective.  They permit certain combinations of modules
and clients to function efficiently, especially when a deeply recursive
series of internal requests, such as those generated by certain WebDAV
requests, are all subject to the identical authentication and authorization
directives.

The major change from the original proposal is a cleaner mechanism for
detecting modules which may expect the old behaviour.  This has been
tested successfully with Subversion's mod_authz_svn, which specifically
requires the old behaviour when performing path-based authorization based
against its own private access control configuration files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@644525 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
configurations which match those of the initial request.  Revert to
the original behaviour (call access control hooks for internal requests
with URIs different from the initial request) if any access control hooks
or providers are not registered as permitting this optimization.
Introduce wrappers for access control hook and provider registration
which can accept additional mode and flag data.

The configuration walk optimizations were originally proposed a while
ago (see http://marc.info/?l=apache-httpd-dev&amp;m=116536713506234&amp;w=2);
they have been used since then in production systems and appear to be
stable and effective.  They permit certain combinations of modules
and clients to function efficiently, especially when a deeply recursive
series of internal requests, such as those generated by certain WebDAV
requests, are all subject to the identical authentication and authorization
directives.

The major change from the original proposal is a cleaner mechanism for
detecting modules which may expect the old behaviour.  This has been
tested successfully with Subversion's mod_authz_svn, which specifically
requires the old behaviour when performing path-based authorization based
against its own private access control configuration files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@644525 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>update license header text</title>
<updated>2006-07-11T20:33:53+00:00</updated>
<author>
<name>Roy T. Fielding</name>
<email>fielding@apache.org</email>
</author>
<published>2006-07-11T20:33:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=de659cbed0a2cb0397109fecbf9a2465387a1cfa'/>
<id>de659cbed0a2cb0397109fecbf9a2465387a1cfa</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Update the copyright year in all .c, .h and .xml files</title>
<updated>2006-04-19T12:11:27+00:00</updated>
<author>
<name>Colm MacCarthaigh</name>
<email>colm@apache.org</email>
</author>
<published>2006-04-19T12:11:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=dd95d7c37c2f6dac58fa7ad5420623c3bf753a56'/>
<id>dd95d7c37c2f6dac58fa7ad5420623c3bf753a56</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Redesign of request cleanup and logging to use End-Of-Request bucket</title>
<updated>2005-10-24T02:39:49+00:00</updated>
<author>
<name>Brian Pane</name>
<email>brianp@apache.org</email>
</author>
<published>2005-10-24T02:39:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=158559eacb9ecea465464c7ab6e7c4713731c7e9'/>
<id>158559eacb9ecea465464c7ab6e7c4713731c7e9</id>
<content type='text'>
(backport from async-dev branch to 2.3 trunk)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327925 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(backport from async-dev branch to 2.3 trunk)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327925 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Corrected an out-of-date comment (it's been a while since main.c has</title>
<updated>2005-10-09T03:53:01+00:00</updated>
<author>
<name>Brian Pane</name>
<email>brianp@apache.org</email>
</author>
<published>2005-10-09T03:53:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=6c4c099fb4fe5c231c5e7892b87cbe55d6b777e5'/>
<id>6c4c099fb4fe5c231c5e7892b87cbe55d6b777e5</id>
<content type='text'>
called ap_process_request)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307355 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
called ap_process_request)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307355 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Doxygen fixup / cleanup</title>
<updated>2005-08-28T23:03:59+00:00</updated>
<author>
<name>Ian Holsman</name>
<email>ianh@apache.org</email>
</author>
<published>2005-08-28T23:03:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=8c1e315d3f23dd93529fd9605da571c4af9dfbf6'/>
<id>8c1e315d3f23dd93529fd9605da571c4af9dfbf6</id>
<content type='text'>
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year to 2005 and standardize on current copyright owner line.</title>
<updated>2005-02-04T20:28:49+00:00</updated>
<author>
<name>Justin Erenkrantz</name>
<email>jerenkrantz@apache.org</email>
</author>
<published>2005-02-04T20:28:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/apache/httpd.git/commit/?id=905cdf9f0b330131433f4d8ad2cb3905357dbc58'/>
<id>905cdf9f0b330131433f4d8ad2cb3905357dbc58</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
</feed>
