Serverless Functions
Queues
Using Beam’s distributed Queue to coordinate between tasks
Beam includes a concurrency-safe distributed queue, accessible both locally and within remote containers.
Serialization is done using cloudpickle, so any object that supported by that should work here. The interface is that of a standard python queue.
Because this is backed by a distributed queue, it will persist between runs.
In the example below, we run one function remotely on Beam and another locally. The remote function puts a value in the queue, and the local function pops it out and prints it. The output will be beam me up
.
Simple Queue
Was this page helpful?