Introduce external job activation API #11706
Labels
component/broker
component/engine
component/stream-platform
kind/toil
Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc.
version:8.2.0
Marks an issue as being completely or in parts released in 8.2.0
Description
In order for both the ZPA and ZDP teams to be able to work independently on the job push epic, we should introduce the API for job activation/pushing between the engine and the broker as soon as possible.
Job activation is predicated on workers/streams being available to receive jobs. Since processing in the engine is synchronous, the API should be blocking/synchronous as well.
The engine should be able to query the API for a worker by job type. If there is none, then the job is not activated. If there is one, then the API must return all the properties required to activate the job, and a consumer for activated job.
The engine should activate the job with the given properties (e.g. deadline, worker, etc.). Once activated, it will collect the variables for that job (based on the worker's properties), and pass the job to the consumer. After that, the job should be guaranteed to be activated and locked (based on the deadline).
In the prototype, I didn't differentiate between workers, so I was ignoring all the activation properties. That said, here's what it looked like:
We would need to adapt it such that it returns a type which can supply activation properties and the handler/consumer.
Activation properties as far as I can tell are:
Initially, this interface can replace the existing
LongPollingJobNotification
and the consumer for job types. The initial implementation can however still do the exact same thing:Activating the job, collecting the variables, and pushing the job can be done in one or more follow up issues by the ZPA team once this is done.
Regarding observability, I don't think we need any special metrics here just yet.
The text was updated successfully, but these errors were encountered: