[MTOS-dev] Background Task Change
Hirotaka Ogawa
hirotaka.ogawa at gmail.com
Sun Feb 10 06:22:43 PST 2008
On Feb 9, 2008 5:02 AM, Reed A. Cartwright <reed at scit.us> wrote:
> With the discussion on pronet about background tasks I have a proposal
> to make to change the background task system.
>
> Instead of forking to do background tasks, MT should process them after
> the page is finished being served. This is the technique that I use in
> MT-Dispatch to run the the Schwartz (publishing queue) in the worker
> threads.
>
> The basic pseudo code is as follows:
>
> 1. open connection
> 2. run app, queuing any bg tasks
> 3. send page to user
> 4. close connection (streams)
> 5. go through bg queues
> 6. terminate if cgi; server next request if fcgi
>
> I think this would improve task processing and even become more portable
> since MTOS wouldn't need to use fork.
I'm a user of your mt-dispatch, but basically I can't approve of
making runtime sequence so complex and unreliable.
Why don't you employ post_run or take_down callbacks for MT::App so as
to process background tasks?
>
> --
> *********************************************************
> 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
> _______________________________________________
> MTOS-dev mailing list
> MTOS-dev at sixapart.com
> http://www.sixapart.com/mailman/listinfo/mtos-dev
>
--
Hirotaka Ogawa makes no sense.
http://as-is.net/blog/
More information about the MTOS-dev
mailing list