Monitor
- class mosaic.runtime.monitor.Monitor(**kwargs)[source]
Bases:
Runtime
The monitor takes care of keeping track of the state of the network and collects statistics about it.
It also handles the allocation of tesserae to certain workers.
- async barrier(sender_id, timeout=None)[source]
Wait until all pending tasks are done. If no timeout is provided, the barrier will wait indefinitely.
- Parameters:
timeout (float, optional)
- is_monitor = True
Strategies
- class mosaic.runtime.strategies.MonitorStrategy(monitor)[source]
Bases:
object
Base class for the strategies used to allocate tesserae to workers.
- update_node(updated)[source]
Update inner record of node state.
- Parameters:
updated (MonitoredNode)
- class mosaic.runtime.strategies.RoundRobin(monitor)[source]
Bases:
MonitorStrategy
Round robin strategy for allocating tesserae.