[ 
https://issues.apache.org/jira/browse/SLING-3278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13852634#comment-13852634
 ] 

Carsten Ziegeler commented on SLING-3278:
-----------------------------------------

Thanks for the updated patch. I think we're making good progress!
Now, some comments:
- run(ServiceReference) looks convenient but creates an API that is tied to 
OSGi API - we should avoid that. Getting a service is fairly easy - and with 
passing in the service object we ensure that the client is allowed/able to get 
the service.
- Result must be immutable - that's the contract we had before and we have to 
keep it. So no setter methods - if the constructor approach gets ugly I suggest 
a builder passed approach, like createResult(log).name("bla")...build();
- I don't think we need the health check descriptor - so far I don't see a need 
for client code for this information. And if, why not simply copy the 
information from the service reference into an immutable data object? But I 
would go without this


> Provide a HealthCheckExecutor service
> -------------------------------------
>
>                 Key: SLING-3278
>                 URL: https://issues.apache.org/jira/browse/SLING-3278
>             Project: Sling
>          Issue Type: New Feature
>          Components: Health Check
>            Reporter: Georg Henzler
>            Assignee: Georg Henzler
>         Attachments: SLING-3278-bertrand.patch, 
> SLING-3278-hc.core-HealthCheckExecutorService-2013-12-19.patch, 
> SLING-3278-hc.webconsole-2013-12-19.patch, hc-it.patch
>
>
> Goals:
> * Be able to get an overall (aggregated) result as quickly as possible 
> (ideally <2sec)
> * Whenever possible, return most current results (e.g. for a memory check)
> * Provide a declarative way for async checks (async checks should be the 
> exception though) 
> Approach
> * Run checks in parallel
> * Make sure long running (or even stuck) checks are timed out
> * If a health check must run asynchronously (because its execution time 
> cannot be optimized), it should be enough to just specify a service property 
> (e.g. "hc.async").
> See also
> http://apache-sling.73963.n3.nabble.com/Health-Check-Improvements-td4029330.html#a4029402
> http://apache-sling.73963.n3.nabble.com/Health-checks-execution-service-td4028477.html



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to