I’m looking into the possibility of using a mutex in order to lock/unlock a shared resource in a namespace.
In particular considering the code here https://github.com/temporalio/go-samples/blob/master/mutex/mutex_workflow.go
I have some doubts:
- What do you mean for namespace? It seems a simple label
- The “MutexWorkflow”, that should be able to synchronize requests, receives the parameter “namespace” but does not use it.
- As I understand, the Workflow “MutexWorkflow” run in single instance (we have a single worker) but what happens if the application is scaled and we have multiple worker? In this case the “MutexWorkflow” will be registered on multiple nodes.
- there is a particular reason for using SignalWithStartMutexWorkflowActivity as LocalActivity? What if it is a simple Activity?