Upstart 1.0 Design discussion

Casey Dahlin cdahlin at redhat.com
Sun Sep 13 00:03:46 BST 2009


On 09/12/2009 12:31 PM, Scott James Remnant wrote:
> Another interesting thing abouts events is that they too have a
> lifecycle and different states.
>
> They're not just fired and forgotten: the event is kept "open" all the
> time that jobs that it changed are in transition between levels.  Only
> once the jobs are all back at a rest level again is the event finished.
>

My earlier email on Triggers proposes doing away with this internally. 
Events are now fire-and-forget.

Previously the logic was:
1) A job changes goal, and fires a "starting" event.
2) The job waits for the starting event to unblock.
3) The job continues.

The new logic is:
1) A job changes goal and fires a starting event.
2) The job stops in place.
3) The fired event sets up a series of handlers that will cause the job 
to begin moving again when all of the responders have answered.

Is this a good idea? My code will be the proof :) Outwardly scary as the 
idea of these "fire, tell someone else, and forget" events is, it has 
drastically simplified the code it has touched (EventOperator itself 
will soon entirely evaporate from my branch).

--CJD



More information about the upstart-devel mailing list