Hi Florian, The documentation for this is at http://uima.apache.org/d/uima-as-2.10.3/uima_async_scaleout.html#ugr.ref.async.api.usage_targetservice
There is a test case at https://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java?revision=1826882&view=markup#l2238 Regards, Eddie On Mon, May 6, 2019 at 10:13 AM Florian <[email protected]> wrote: > Hi, > > is there eventual an example or demo for sending request to individual > service instances? I couldn't find an example in the repository. > > Best regards, > Florian > > On Mi, Mai 1, 2019 at 12:13 AM, Eddie Epstein <[email protected]> > wrote: > > 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 <[email protected] > > <mailto:[email protected]>> 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 > >> > >> > >> > >> > >
