Is it possible to achieve org-based request processing and concurrency control in Temporal?

Hello Temporal Community,

I’m currently exploring different job scheduling/orchestration engines for my project and came across Temporal. After going through the documentation, I was able to find most of the answers regarding what Temporal is capable of. However, there is one specific requirement that I’m not sure if it’s possible without overcomplicating the solution.

Here’s what I’m trying to achieve:

  • We have multiple organizations (N number of orgs).
  • Each request comes from these orgs and triggers a workflow.
  • The entry workflow can trigger subworkflows and activities.
  • For requests coming from the same organization, we need to hold the second request (delay the entry workflow) until the first one is completed.
  • Concurrent requests from non-unique orgs should be processed simultaneously.
  • Requests should be processed in a FIFO queue manner.

Each request contains all necessary information about which organization it belongs to.

My question is: Can this kind of org-based request processing and concurrency control be achieved using Temporal? If so, could you please guide me on how to implement this or provide any relevant examples?

Thank you in advance for your help!

It depends on the maximum request rate per organization. If it is not too high (less then 10 per second at peak) then you can use a workflow with workflowID equal to orgID as to maintain the FIFO queue.

Thanks for the reply @maxim. Is the 10-second coming from default timeout?

No, I’m talking about the request rate of 10 per second. It is not related to any timeouts.