Hi,

On Mon, Apr 18, 2016 at 4:04 PM, Ian Boston <[email protected]> wrote:
> ...I am not certain how a Callable will work with a distributed
> implementation,...

Ok, what shape a batch job takes is not very important at this stage,
I get your point.

...
>>     void registerBatchEventListener(BatchEventsListener bleh, JobId
>> ... restrictToSpecificJobIds);
>>  }
>
> IIUC this is a bit on an Anti pattern with OSGi. AFAIK the Whiteboard
> pattern is prefered...

Makes sense. And it makes the API even simpler.

> ...Is there a reason that you think the implementation under SLING-5646 won't
> support the batch use case ?...

I suppose it would work, like this:
1. To submit a job, send it to a Queue that's appropriately configured
2. Subscribe to a Topic to receive events about the job's execution
3. All good if a DONE message is received on that topic
4. If an ERROR message is received, or if timeout, act accordingly

That certainly works but requires some non obvious conventions, as
opposed to an API like the one I suggested which is narrower and more
self-explaining.

But maybe we can leave those kinds of details to users of a job
execution system based on SLING-5646.

-Bertrand

Reply via email to