Multi Tenant Validation Engine Implementation using Temporal - Need help

Hello,

I have a requirement to implement a validation engine. Below are considered as the main functionalities for the engine.

  1. Validation engine support multi-tenant approach where different teams can run a set of validation rules.
  2. Input data payload received from an external user (via Rest API) and gateway route the payload to validation engine. Current consideration is the establish an API layer to accept the data.
  3. After data is accepted, validation engine will run list of validation rules registered by tenants (irrespective of the sequence, can run parallel as well)
  4. After validation rules are executed, result will be returned to the caller.
  5. Each validation rules or set of rules, as an action configured by the tenant. If any validation failed, engine is responsible of execution an action. For example, tenant-1 failed a particular validation rule and failure is published to a kafka topic setup by tenant.

Below diagram illustrate the high level flow of the validation engine.

Below are my questions related to Temporal usage;

  1. I understand, validation engine requires some sort of an orchestration to execute different validation rules registered by tenants, how can temporal help to register different validation rules per tenant?
  2. If we establish a workflow for execution different validation rules. For example workflow 1, would run against set of validations (tenant 1 rules, tenant 2 rules) how can we configure the execution of the workflow in Temporal?
  3. Choose which validation rules to execute at runtime per workflow - Based on workflow type, if we choose what validation rules to run, how can Temporal help to group validation rules per workflow?

Are all requests to the validation engine synchronous?

Yes, it is going to be sync

Why do you need temporal then? It sound like read only request that doesn’t require guarantee of execution or compensations.

1 Like

Hello - Maxim

Thanks for reviewing my question. I understand it is not really a use-case to use Temporal.