Node

class mosaic.runtime.node.Node(**kwargs)[source]

Bases: Runtime

A node represents a physically independent portion of the network, such as a separate cluster node. Nodes contain one or more workers, which they initialise and manage.

async heart(sender_id=None)[source]
async init(**kwargs)[source]

Asynchronous counterpart of __init__.

Parameters:

kwargs

async init_workers(**kwargs)[source]

Init workers in the node.

Parameters:

kwargs

is_node = True
resource_monitor()[source]

Monitor reseources available for workers, and worker state.

set_logger()[source]

Set up logging.

set_profiler()[source]

Set up profiling.

async stop(sender_id=None)[source]

Stop runtime.

Parameters:

sender_id (str) –

async update_monitored_node()[source]

Send status update to monitor.