Skip to main content

Custom Executor

Overview

Most of the Rill Flow operations are encapsulated in the executor and, in practice, we will use python, java, or go to implement the executor http-interface protocol based on the actual execution function to be performed, receive and process tasks (also other distribution agreements can be extended by dispatcher extensions).

invoke executor

Executor and ResourceName

When defining a task, the task can be bound to different dispatches and executors by the ResourceName field. A typical ResourceName is similar to:

http://sample-service/do_soming

ResourceName's design draws on URI's design specifications. In the example above, http agrees on the name of the dispatcher, sample-service corresponds to the unit deployed, do_somethin corresponds to the specific function and calls the relevant parameters to be passed by body.

If you have implemented your own dispatcher, such as issuing RPC requests based on the motan framework, then ResourceName may become:

motan://group_name/service_name

In practice, ResourceName can also be fully equated with the HTTP agreement, and Executor can be developed and deployed as a HTTP server.

Microservice Executor

In the design of the Rill Flow, the executor is designed, as far as possible, as a common component coupled with the Rill Flow's programming component, which interacts only through the dispatch and callback protocol.Instead of directly introducing the Almighty Executive, we have only agreed on a sender-executor agreement.

In practice, different tasks may involve different languages, frameworks and implementation environments, and we hope that, by introducing generic implementer agreements (rather than executors), the business community will focus more on the operational logic of using appropriate technical stacks, splitting different types of tasks to different implementers and service deployment and discovery through K8S, Service Mesh or Serverless technologies, thereby reducing the complexity growth and flexibility constraints associated with the “monograph executor”.

"Almighty Executor"

If the business scenario is more homogeneous (or favouring monolithic services), all logic can also be packed into an executor, when the overall architecture of Rill Flow is similar to the master-worker model, and tasks can be programmed to allow the same executor to perform different logic by changing the parameters in ResourceName or parameters.