The Blockmon distributed architecture consists of an overlay made up of Blockmon nodes, which are coordinated by the Blockmon Controller (BC).
The BC is implemented in Python and the communication between the BC and the nodes, as well as the communication between the BC and the outside world takes place by means of JSON-RPC. Furthermore, the BC stores information about nodes and running templates on an internal SQLite database.
The code of the BC, together with instruction on how to run it, are released open source on github at: Blockmon Controller.
The following figure outlines the overall architecture of the Blockmon controller and its interaction with the other components, either external or the Blockmon nodes.
This interaction allows the external components to store template definitions on the BC, to invoke template instances and execute applications distributed across Blockmon nodes. Additionally, the BC makes available functions that allow the other components to retrieve information from the nodes about the available topologies and blocks, as well as the status of a variable of a running application. The BC stores all information about blocks, nodes and templates in a database.
The supported APIs that the BC makes available to accomplish those tasks are the following:
All the above functions return 0 upon success or -1 upon failure.
This interaction allows the Blockmon node to join the Blockmon network and show its availability to run distributed applications. During this process, the node sends information such as hardware and software specs to inform the BC of its capability. Further, the BC will make this information available, where permitted, to advanced users again via a JSON-RPC call. The BC stores information about nodes into a database.
The supported APIs that the BC makes available to accomplish those tasks are the following:
Upon success of the register function, the BC sends back to the node an ID to identify it within the overlay. The ID is an integer number, computed as an hash of the IP address and listening_port of the node. Upon success of the keepalive and register functions, a success code 0 is returned. All the above functions return -1 upon failure.
This interaction allows the BC to control compositions that are running on a given Blockmon node. This includes the ability of the BC to send data files to the node if the composition needs it and reading or overwriting the value of a given variable.
The supported APIs that the Blockmon nodes make available to accomplish those tasks are the following:
All the above functions return -1 upon failure.
Blockmon Controller is able to communicate with other mPlane components, thanks to the interface that makes it mPlane compliant. Please refer to the following GitHub repository for the latest version of the interface:
git clone https://github.com/fp7mplane/components.git COMPONENTS_DIR
Once Blockmon Controller is properly installed, get the latest version of the mPlane protocol RI at the following GitHub repository:
git clone https://github.com/fp7mplane/protocol-ri PROTOCOL_RI_DIR
The following instructions assume you are in the [COMPONENTS_DIR] folder
$ export MPLANE_RI=[PROTOCOL_RI_DIR]
_controller_port = Blockmon Controller port
_controller_address = Blockmon Controller address
$ python3 blockmonController.py --config blockmonController.conf