The this service orchestrates a scenario execution in a blockchain network. It provides a framework for the different blockchains where they can supply different implementations for a proxy to their slaves.
Import and use orchestrate(port: int, slave_class: Type[AbstractSlave], setup=AbstractSetup()):
to run the service. You need to pass a Slave class which
encapsulates
the communication with the slaves. You can pass a setup class that sets up things on the
blockchain or prepares slaves if necessary. Slave nodes can send an arbitrary json formatted
dictionary via http to the master-node at Port 60.000
This service only needs to run on the master node.
The orchestrator is comprised of five major files. run_threads
contains the orchestrate
function which starts the service.
meta_scenario
contains the logic to run the scenario. http_server
accepts
the connection details from the slaves, creates a new Slave
object, and passes it to the orchestration thread via a Queue. The
ControllerInterface
provides an Interface for
the private-chain-controller
where
the controller can pass new scenario settings to the orchestrator. It also syncs these settings
to the orchestration thread via a Queue.
To install run: pip install git+https://github.com/BPChain/scenario-orchestration-service.git