Upstart 1.0 Design discussion

Casey Dahlin cdahlin at
Fri Sep 11 22:03:40 BST 2009

I've had some suggestions for the Upstart 1.0 design which came up when I spoke to Scott on IRC the other day. I would like to post them here, but for continuity's sake, I figured I'd simply post the 1.0 design as Scott described it (and I understood it), and then work from there.

Upstart retains, as it has for some time now, two primitives: states and events. States reflect a condition which is either True or False, whereas events mark a particular occurance time.

By default a state is always true. It can be made explicitly false by user interaction, or it can be given certain conditions which preclude it from being true except at certain times. There are two basic types of these conditions:

- while conditions: These prevent a state from being true unless another state is true.
- on statements: These make a state false by default. It does not become true unless the while conditions are met /and/ a particular event occurs during that time.

In the job definition files themselves, while statements look like this:

while foo

Foo must be the name of another state.

On statements look like this:

on bar

Now, the meaning of bar is interesting. It can be the name of an event, OR the name of a state. If it is the name of a state, the on statement matches the event of the state /becoming true/.

This'll do for part one. I'll let Scott look it over before I keep going :)


More information about the upstart-devel mailing list