I’m thinking to use temporal in my product and wanted to check with you how yo think I can use it for my product multi-tenancy requirements:
- I have a list of tenants that changes dynamically during the system runtime and I want the all the activities and workflows in the system to always apply to all of the tenants
- I want to make sure that even if one tenant starts many workflows it will never starve other tenant workflows and that each tenant get equivalent chance to get workers computation
- I will want some dashboard so I can easily view workflow per tenant
- More awesome but optional features - authentication per tenant & different configuration per tenant for how it processes workflows
From learning the concepts in temporal it seems I can do the following: domain serves as the tenant (and then I get 3+4) and different task queue for each domain to get (2) (is it needed or the domain already partitions the task queue for me ?).
My problem is with request (1) which should support dynamic configuration of domains. Right now each worker needs to register the activity to handle in a specific domain and there is no global registration. What’s the idea behind this ? Maybe I miss something with the architecture of temporal
The best solution I could find was to to register new domains in my system with the temporal client once I find about it and make all the worker clients poll once in few seconds for client.ListDomains
and register activities in the new domains if they find some.
What do you think about this approach ? Is there a better way ?