def orchestrate (self, framework):
        framework.send_ring_rest("shard/init", {})
        framework.send_ring_rest("data/load", { "file": self._container.file_name })

        self._container.data_load(self._container.file_name)
        framework.phase_barrier()

        while len(self._container.param_space) > 0:
            for shard_id, shard_uri in framework.get_worker_list():
                if len(self._container.param_space) > 0:
                    params = self._container.param_space.pop(0)
                    framework.send_worker_rest(shard_id, shard_uri, "calc/run", { "params": params })

        framework.phase_barrier()

        # report the results
        needs_header = True

        for shard_msg in framework.send_ring_rest("shard/dump", {}):
            payload = loads(shard_msg)

            if needs_header:
                print "\t".join(payload["fields"])
                needs_header = False

            for result in payload["results"]:
                print "\t".join(map(lambda x: str(x), result))
initialize shards, then iterate until all percentiles are trained
dataset/ETHPy150Open ceteri/exelixi/src/contain.py/ContainerUOW.orchestrate