Hi, I have a question regarding how to use temporal in a microservice environment. Given that I have a backend with 3 microservices (calendar, notifications, users) and each of the microservices has its own database. If I want to implement for instance the user deletion process as a workflow (let’s say this process requires us to alter data in all three services), where should my workflow, actions and workers live?
As far as I’ve understood, there are several possibilities.
- I could first implement rest interfaces in each service that trigger the necessary steps and then implement activities that call these endpoints at some central place. I would then create a workflow calling these actions and register it with a worker, running in a separate service.
- I could implement actions and workflows for each of the services, while each of the workflows would only do what has to be done on this very service. The workers would also run within the services and therefore I would be able to directly access the database within the actions (??). I this scenario, one of the workflows would be the parent workflow that is called first and that would trigger the other workflows as child workflows.
- Similar to scenario 2 but with a central parent workflow that has a worker that is running at some central place (like in scenario 1)
Is one of the scenarios even feasible? Thanks for any help!