Does Temporal run your code

From Temporal 101
“but it’s important to understand that Temporal neither runs your code nor even has access to your code”

“Worker is responsible for executing your code”

Are the above statements not contradicting?

Thank you for the question. No, I do not believe that these statements do not contradict one another.

The Worker always runs on infrastructure that you manage and control, which is separate from the Temporal Cluster or Temporal Cloud service that manages the state of the execution. Although both the Worker and Cluster are running on the same machine during the hands-on exercises in Temporal 101, in a production deployment, the Workers and Temporal Cluster are typically deployed to separate machines. In fact, the machines where your Workers run can even be in a different data center from where your Temporal Cluster runs.

Although the point I wanted to convey here was that the Temporal Cluster (or Cloud) does not execute or even have access to your code, I suppose that one could argue that the Worker implementation is provided by the Temporal SDK. While that is true, it’s just a library that you use in your application and your code remains on the machines or containers where the Workers runs, which are systems that you manage and control. With that in mind, I’ll consider rewording the first statement for clarity.

1 Like