Hi,

Felix and Carsten made some comments in SLING-490 that are probably
worth discussing here.

Here's how I view this service, comments are welcome.

1. The goal is to return a 503 status until the system is ready to
process requests.

2. Defining readyness is hard due to the dynamic nature of OSGi and
especially Declarative Services. My idea is to use scripts found under
/system/sling/status in the JCR repository to let programmers define
what they require for their system to be ready.

3. If it finds an *.foo script there, the default SystemStatus service
will complain if no script engine is found to execute *.foo scripts.
This avoids problems with requests coming in while the required script
engines are not started yet.

4. Currently, a SystemStatus service is required for the
SlingMainServlet to operate. I'm not sure how to avoid this coupling -
if the SystemStatus service is made optional and a request comes in
before it is started, the SlingMainServlet might erroneously think the
system is ready.

5. As the default SystemStatus implementation uses scripts, it is not
practical to make it a part of the engine bundle, which has no
dependency to script engines at the moment. Hence the separate bundle.

I'm happy to rediscuss this if needed, but I think giving a
customizable server-side way for people to "compute" the readyness of
their Sling system is a must.

-Bertrand

Reply via email to