joshua mclellan
08/06/2021, 6:25 PMemre
08/06/2021, 7:10 PMKevin Kho
joshua mclellan
08/06/2021, 8:58 PMKevin Kho
joshua mclellan
08/06/2021, 9:01 PMKevin Kho
joshua mclellan
08/06/2021, 9:09 PMjoshua mclellan
08/06/2021, 9:10 PMKevin Kho
joshua mclellan
08/06/2021, 9:15 PMKevin Kho
joshua mclellan
08/06/2021, 9:42 PMKevin Kho
backends
. Cloud is the one you use at <http://cloud.prefect.io|cloud.prefect.io>
, Server is when you spin it up on your own infrastructure. The backend is the API you use so whatever Flow runs uses the backend to hit the API and record the states of execution. Agents also ping the backend API to pick up flows.
The LocalExecutor is an Executor
. Executors are there to determine how the Flow is run by the Agent once it’s retrieved. The LocalExecutor just means a sequential single-threaded executor environment. It is called local because it does not make any external connections to run the Flow. Similarly, the LocalDaskExecutor uses a local Dask multiprocessing pool to execute the Flow. This parallelizes task execution. Again local means they don’t interact with other machines to execute. On the other hand, the DaskExecutor is a distributed
executor and executes the Flow over a cluster of machines. That’s why it’s not confined to a local machine.
So whatever Executor you use is agnostic to the backend. The executor is already at the point where the flow was obtained, and as far as they are concerned, they just update the states of the tasks by hitting the Prefect API of your backend
.
The LocalExecutor is still capable of making outside connections. You can hit other APIs. You can hit AWS resources. The local just means compute is running on that machine. So you can still use it to interact with Prefect Cloud and retrieve values from the KV Store because it’s pretty much the same as hitting an API. You just need to be authenticated on the Client.
In fact, you can hit the Prefect KV Store outside of Prefect flows as well as long as you’re authenticated to the Prefect Client.
Does that clear things up?