# Distribution

Simplygon process distribution works using pipelines. Any pipeline can be distributed directly through the API by using the run mode parameter in the run scene API call.

# Running a distribution node

To start a client node run the SimplygonGridAgent.exe tool on the machine. There is no coordinator or network setup needed, the pipeline execution locates available processing nodes using mDNS/DNS-SD.

# Distributed pipeline execution

Distribution is enabled by passing the appropriate run mode to the pipeline run scene API

    # Paths

    By default the batch tool is located using the SIMPLYGON_9_PATH environment variable. If you wish to place the executable in a custom location, use the SetSimplygonBatchPath setting on the pipeline to the path where the batch tool executable is located.

    # How it works

    The pipeline execution usees the batch tool (SimplygonBatch.exe) to do the distribution. The batch tool find a suitable node using mDNS/DNS-SD (multicast UDP port 5353), picks the node with the lowest overall load and sends/recieves files using TCP/IP (by default using an ephemeral port). Progress and errors are propagated back to the originating host.

    # Cascaded distribution

    If a pipeline execution is distributed, and the pipeline is cascaded with multiple child pipelines, the execution of the child pipeline will be re-distributed to parallellize work as much as possible. This is handled internally by the pipeline execution.

    # Fallback

    If the pipeline execution is unable to locate a suitable node for distributed execution it will fall back to local processing