Sharing Activity Workers across namespaces

I recently wanted to share an Activity with a colleague, but they are running in a different namespace. The easiest way for me to accomplish this is to run my worker in a different container but configured with their namespace. The downside to this, is that they now also have workflows and activities that they really shouldn’t have / need access to. Of course, I can configure the worker to only have the activities I want to share, which is what I will also do.

I understand the rationale for namespaces being hard boundaries for workers. If a worker were to belong to multiple namespaces, one namespace could get starved for workers by another namespace.

The downside to this multi-namespace setup is that we have to increase the overall number of workers, most of the time these workers are idle and in this case, the task-queue is even configured to limit throughput, so having idle workers seems wasteful. I’m curious how others have approached this problem.

Yes, this is a known limitation of Temporal. We are actively working to provide cross-namespace invocation capabilities through the Nexus project.

Cool project, looking forward to it.

kudos @maxim for finding the bandwidth to answer community questions!