COMPARISON 6.4 KB

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