[MTOS-dev] New Dispatcher On the Way
Reed A. Cartwright
reed at scit.us
Thu Mar 6 20:53:20 PST 2008
Byrne Reese wrote:
> If creating a new call back will facilitate the integration of this code -
> then let's start in one of our next dev cycles to integrate that callback
> for you. Then we can do some additional testing and optimization.
>
> Thoughts?
>
> Can you submit a patch for the new callback in the core?
I'm a bit swamped with real life right now, and probably don't have the
time soon to figure out how to add the right call backs. (Unlike many
of y'all I'm only a hobbiest when it comes to MT hacking/development. I
get paid to be an academic.) I've never used callbacks. However, I can
explain what I think needs to be done, in case someone with more time
can patch the system. I guess I can propose something if SA doesn't
mind if I submit an untested patch.
1. Establish pre_accept and post_finish callbacks. Pre_accept happens
before a connection is established and post_finish after it terminates.
2. Update the standard bootstraper to call those routines where
appropriate. Pre_accept should be called before 'new cgi' or 'new
cgi::fast'. Post_finish should be called after the connection is
closed. On FCGI this can be done with a call to the Finish command.
Forking can be used for CGI support. (I can then modify MT-Dispatch to
be consistent.)
3. While your at it, modularize MT::Bootstrap based on what I use in
MT-Dispatch, therefore I don't have to copy code anymore, I can just
call MT::Bootstrap functions. I can probably quickly propose such
changes, and if someone gives me the 411 for creating a new callback
types, I can add those as at the same time.
--
*********************************************************
Reed A. Cartwright, PhD http://scit.us/
Postdoctoral Researcher http://www.dererumnatura.us/
Department of Genetics http://www.pandasthumb.org/
Bioinformatics Research Center
North Carolina State University
Campus Box 7566
Raleigh, NC 27695-7566
Cuiusvis hominis est errare, nullius nisi
insipientis in errore perserverare. --Cicero
More information about the MTOS-dev
mailing list