Hey, I’m totally new to Temporal and I’m doing a proof-of-concept to find out if temporal would be a solution for our use case. I followed the example project in the documentation of temporal (the ip-address lookup flow) and got everything running. So far so good.
But then I was thinking…. what would this look like in our use case? Therefore I drew two images. You can find them below. It boils down to this:
- We have a couple of services (A,B and C). All have an API.
- We have a workflow that requires changes in all these services.
- The changes differ per service, but are in-general very small and only happen inside the services themselves.
My questions
What is recommended here? How should I proceed / make this decision?
Solution 1
The services are unaware of temporal, I create an “orchestration” service that takes care of the workflow code, but also of triggering the workflow AND running the worker(s). Advantages here is the fact that all “temporal stuff” stays in one place.
Solution 2
Each service gets it’s own “worker” that is configured to run exactly the tasks that should run on the different services. Advantages here are that I don’t have to extend the service’ APIs and that the logic stays close to the services.
