123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- Comparison of Dinit with other supervision / init systems
- =========================================================
- This is intended to be an objective description of the differences between Dinit
- and several other similar software packages. I started writing this with the
- intention of justifying Dinit's existence, but don't know feel that this
- document achieves that goal. It does, however, serve as a short survey of
- service supervision and init systems.
- Systems without dependency management
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- A variety of init/supervision packages do not perform proper dependency management
- of supervisions. By this I mean that:
- - starting a service should automatically start any services that the former
- requires (and wait, if appropriate, until they have started)
- - likewise, stopping a service should automatically stop any dependent services.
- Dinit (and various other packages) perform dependency management. The following
- packages do not:
- * Daemontools (http://cr.yp.to/daemontools.html)
- * Epoch (http://universe2.us/epoch.html)
- * Finit (http://github.com/troglobit/finit)
- * Minit (http://www.fefe.de/minit)
- * Perp (http://b0llix.net/perp/)
- * Runit (http://smarden.org/runit/)
- Cinit (http://www.nico.schottelius.org/software/cinit)
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- An obscure init system which apparently offers portability and dependency
- management, just as Dinit does.
- InitNG (http://initng.org/trac)
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- A highly modular init system which apparently offers dependency management
- (as Dinit does). Portability status is unclear; may be Linux-only (Dinit
- strives for portability).
- Nosh (http://homepage.ntlworld.com/jonathan.deboynepollard/Softwares/nosh.html)
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Another seeminly modular init system offering dependency management and socket
- activation, with BSD licensing. Service configuration is expressed through
- directory structure (symbolic links represent service dependencies, etc). It
- provides a simple shell-like scripting language with a fast interpreter, avoiding
- the need for standard shell scripts. It was originally designed for BSD systems but
- works on Linux too (i.e. is portable). It does not provide a D-Bus interface.
- Seemingly, this package addresses most of the various complaints that have been
- levelled against SystemD. Compared to Dinit, it favors chain-loading of smaller
- utilities to provide even more basic functionality. By comparison Dinit tends to
- avoid starting additional processes by design, expresses configuration in files
- and tracks state internally.
- OpenRC (Gentoo)
- -=-=-=-=-=-=-=-
- The OpenRC system used in Gentoo Linux is a dependency-managing service supervision
- system with funcionality similar in some respects to Dinit. It provides parallel
- startup of services (like Dinit). Compared to Dinit:
- - OpenRC is configured using, and relies largely on, shell scripts
- - OpenRC cannot be used as a direct replacement for /sbin/init; instead it is
- intended that OpenRC be started by init.
- - Although the build system seems to have some support for BSD OSes, it did not
- build successfully on OpenBSD when tested (revision 33d3f33).
- S6-RC (http://skarnet.org/software/s6-rc/s6-rc.html)
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- S6-RC provides a dependency-management system over the top of the S6 supervision
- system. Apparently it maintains most state on disk. S6-RC requires compiling the
- complete set of service descriptions into a database. New services apparently
- cannot be added once the system is in operation.
- S6 in general follows a philosophy of breaking up functionality into smaller
- parts and implementing these smaller parts as separate programs, wherever
- practical. Thus, process supervision, log file management, and service management
- are all separate programs.
- In contrast, Dinit does not requires compiling service definitions, and allows
- new services to be added after the system starts. Also, Dinit houses a much larger
- body of functionality in a single executable program.
- Systemd
- -=-=-=-
- Systemd is probably the most widely used init system on Linux as of the last year
- or two. Compared to Dinit:
- - Systemd provides a range of functionality not provided by Dinit, such as:
- - setting UID, priority, and other attributes of the service process. Dinit does
- not support this yet.
- - seat/session management
- - syslogd replacement (or at least, partial replacement)
- - ability to run tasks at certain times
- - inetd replacement (lazily launch services to handle connection to IP ports)
- - asynchronous filesystem check/mount
- - control group (cgroup) / container management
- - system time management
- Some of this functionality can be found in other daemons/packages which can be
- be used to supplement the functionality of Dinit.
- - Systemd running in "system" mode does not properly support running with a PID
- other than 1 [1]. That is, it must replace /sbin/init. Systemd can however be run in
- "user" mode where it (most likely) provides the same or greater level of functionality
- as Dinit, though in a more complex package.
- - Systemd exposes a D-Bus API. Dinit eschews D-Bus in favor of a compact custom protocol.
- - Systemd makes no attempt to be portable to operating system kernels other than
- Linux. The maintainers consider it infeasible to port to non-Linux-based OSes
- and will refuse patches designed to do so [2]. Dinit, by comparison, strives to be
- portable.
- [1] http://freedesktop.org/software/systemd/man/systemd.html as at 18/11/2015
- [2] http://freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/
- as at 18/11/2015
- Upstart (Ubuntu; http://upstart.ubuntu.com)
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Upstart does not provide real dependency management; instead "events" (including services
- starting or stopping) can be specified to trigger start/stop of other services. This is
- backwards from the Dinit approach (and that taken by most dependency-managing supervision
- systems) which allow the dependencies of a service to be specified declaratively. That is,
- if service A depends on service B, Upstart is configured so as to start B whenever A starts
- (and it's not possible, or at least not trival, to start A without also starting B).
- Upstart apparently offers a D-Bus interface. Dinit eschews D-Bus in favour of a simple
- custom control protocol.
|