I wrote upstart a while ago, and I've got some text taken from emails describing it below. However, I now think it's a bad idea.
Now, I take the more radical position that there should be no dependencies... no service should depend on another. By this, I mean that if one service needs to use another service, it should be able to wait for that service to become "live", and also be able to suspend operation (not crash!) when a service it uses dies. Obviously, it should be possible to interrogate the state of a service (is it waiting for another service to come alive? which ones?) This way, all services will be resilient to temporary failures.
In this system, you can just start all services simultaneously. I guess deadlocks might (in theory) be a problem, but I can't think of any practical examples of deadlocks.
So, to implement this vision, there will need to be some changes:
It's LOTS (order of magnitude) faster, because it parallelizes everything. It's much more elegant, IMHO :-) I'm not pushing it for general use (yet), because it should use XML, have a nice configuration front-end, and be able to replace init(1), so it can daemonize things, but I don't have time to do this right now.
Anyway, the basic idea is:
l0:0:wait:/usr/local/sbin/upstart -u 0 l1:1:wait:/usr/local/sbin/upstart -u 1 l2:2:wait:/usr/local/sbin/upstart -u 2 l3:3:wait:/usr/local/sbin/upstart -u 3 l4:4:wait:/usr/local/sbin/upstart -u 4 l5:5:wait:/usr/local/sbin/upstart -u 5 l6:6:wait:/usr/local/sbin/upstart -u 6
satisfactory:~/upstart-0.0.0$ upstart --help
Usage: upstart [-dhlruv] [--help] [--version] [--down SERVICE]
[--up SERVICE] [--restart SERVICE] [--status SERVICE]
-d, --down SERVICE Shut down SERVICE
-h, --help Display a summary of options
-l, --list List all services and their state
-r, --restart SERVICE Restart SERVICE
-s, --status SERVICE Display the status of SERVICE
-u, --up SERVICE Start up SERVICE
-v, --version Display version and licence information
eg:
# upstart --up network
Back to my ideas page