replicate(self, futures, n=None, workers=None, branching_factor=2, **kwargs)
Copy data onto many workers. This helps to broadcast frequently accessed data and it helps to improve resilience.
This performs a tree copy of the data throughout the network individually on each piece of data. This operation blocks until complete. It does not guarantee replication of data to future workers.
Futures we wish to replicate
Number of processes on the cluster on which to replicate the data. Defaults to all.
Workers on which we want to restrict the replication. Defaults to all.
The number of workers that can copy data in each generation
Set replication of futures within network
>>> x = c.submit(func, *args) # doctest: +SKIPSee :
... c.replicate([x]) # send to all workers # doctest: +SKIP
... c.replicate([x], n=3) # send to three workers # doctest: +SKIP
... c.replicate([x], workers=['alice', 'bob']) # send to specific # doctest: +SKIP
... c.replicate([x], n=1, workers=['alice', 'bob']) # send to one of specific workers # doctest: +SKIP
... c.replicate([x], n=1) # reduce replications # doctest: +SKIP
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them