Application supervisor: sync point manager
Hello,
I am currently trying to design an application supervisor on top of s6.
The goal is to supervise application software, not to replace init nor
monitor system daemons (that might come later).
The dependency model between applications is quite specific. It is based
on sync points. Each app can reach several sync points, s6 readiness
notification is therefore not enough. Each sync point can require several
apps to reach it. A separate entity keeps track of sync points: the sync
point manager (spm), which I want to be supervised as well. Each app can
report reaching a sync point to the spm, or register to be notified when
a sync point is reached. This means that all applications can be started
in parallel (waiting for a sync point is done inside the app). But there
is one exception: all applications must wait for the spm to be ready
before being started. I see several possibilities:
1. All apps are "down" by default, except the spm. When s6-svscan is
started, only the spm is spawned. When it is ready, the spm can exec
"s6-svc -u" for each application.
2. Readiness notification can be used for the spm itself. Each
application can then do the following in its ./run :
foreground { s6-svwait -U /.../applications/spm }
But I am afraid this can lead to a race condition where s6-svwait is
started before s6-supervise is started for the spm. Is that possible?
3. Have two service directories: one with only the spm, and one with the
other applications. First start s6-svscan (or directly s6-supervise?) on
the spm. Then let the spm start s6-svscan on the application directory.
Do you have any comment or suggestion on what would be the proper way do
things?
Thanks in advance for sharing ideas,
Lionel
Received on Fri Aug 19 2016 - 15:23:45 UTC
This archive was generated by hypermail 2.3.0
: Sun May 09 2021 - 19:44:19 UTC