Hi Florian,

Interesting questions. First, yes the intended behavior is to leave 1
instance running. Services are either started by having autostart=true, or
by a job or another service having a dependency on the service. Logically
it could be possible to let a pinger stop all instances and have the
service still be in some kind of "running" state so that the pinger would
continue running and be able to restart instances when it detected a need;
all that is needed is a bit of programming :)

A hacky approach would be not to use autostart, rather to start service-A
by using a dummy service-B with a dependency on A. When service A pinger
wants to stop A, it could issue a command to stop B which would allow
service A to be stopped. Restarting A would require an external program
requesting B to be started again.

For the second question, the answer is yes for UIMA-AS services. The latest
version of UIMA-AS supports sending process requests to specific service
instances. A pinger could send such requests, and when an instance fails to
reply the pinger can direct that instance to be stopped and another
instance started. The answer is also yes for custom services for which the
pinger knows how to address each instance.

Regards,
Eddie

On Tue, Apr 30, 2019 at 1:43 PM Florian <f.allgoe...@web.de> wrote:

> Hello everyone,
>
> I have two questions about the given sample pinger example of Uima.
>
> It is possible to set the minimal numbers of instances of a service to
> zero? If I set the min-variable to zero uima is always starting a new
> instance, when the last one is shutdown. Is this behavior intended or
> is there a way to prevent the start of a new instance, when there is no
> calls to the service? As we have some services that a rarely used, we
> would only like to start instances on demand.
>
> Secondly is there also a option to call specific instances of a service
> and restart them? We would like to do health checks for individual
> instances and restart them if needed.
>
> Best Regards
>
> Florian
>
>
>
>

Reply via email to