*  a RabbitMQ message queue, the login details are therefore the RabbitMQ
 *  details)
 *
 *  @var Yothalot\Connect
 */
$connection = new Yothalot\Connection();
/**
 *  Create the merging job
 *  @var Job
 */
$job = new Yothalot\Job($connection, $merger);
/**
 *  Create an instance of the WordCount algorithm
 *  @var WordCount
 */
$linecount1 = new KvChainedLineCount($job->directory() . "/tmp1.out");
$linecount2 = new KvChainedLineCount($job->directory() . "/tmp2.out");
$linecount3 = new KvChainedLineCount($job->directory() . "/tmp3.out");
/**
 *  Start several subjobs
 *  @var Job
 */
$sub1 = new Yothalot\Job($connection, $linecount1);
$sub2 = new Yothalot\Job($connection, $linecount2);
$sub3 = new Yothalot\Job($connection, $linecount3);
/**
 *  Assign a job an input
 */
function assign($job, $path)
{
    $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);