On Thursday 03 December 2015 11:08:24 Carsten Ziegeler wrote: > Bertrand Delacretaz wrote > > > Hi, > > > > This old and fun topic again ;-) > > > > Quoting an interesting idea suggested by Carsten in SLING-5337 > > > >> ...To find out when the system is ready we could define a service > >> interface > >> with some properties, maybe a name property which holds the name of > >> the application. When that application is started, this service > >> is registered and other parties can listen for this ... > > > > Making our readiness detection more granular can be very useful, and I > > think there's some parallels with the OSGi capabilities model. > > > > How about using a similar model for our readiness detection? > > Capability names like the following come to mind to identify various > > > > stages of readiness: > > osgi.startup.done > > sling.app.example.com.ready > > healtchecks.startup.green > > http.server.ready > > osgi.subsystem.foo.ready > > > > etc... > > > > I don't know if OSGi capabilities are meant to be static or if they > > can come and go - if the latter we might even use them directly for > > this. > > OSGi capabilities are static and can only be defined through headers on > the bundle.
But the capabilities can come and go. If a startup bundle (providing sling.app.example.com.ready) requires a repository capability, the ready capability will be provided only if a repository capability can be resolved, right? O. > Carsten
