1.4.2 The Node Software
The point of the node software is to enforce the rules of the protocol and allow a computer to contribute and use the monochain, therefore the features of this software can be split into two categories: communication between computers and enforcing the protocol rules.
Communication
The communication layer needs to allow both the worker and leader nodes to communicate such that the same software can be used by either type and only require a configuration change rather than a seperate piece of software.
One possible way to do this is through the use of seperate websocket and http servers built into the software. This could be done through other methods but it is the simplist and most commonly used solutions so that will be what is used for this project.
This then means that a 'leader' node will need to host a http server to communicate with other leader nodes and a websocket server to allow 'worker' nodes to connect to it. The benefit of this is that the worker node does then not have to host any form of server itself and can instead just connect to a leader node through the websockets module of the software, meaning that the node can also be ran from anywhere regardless of if the computer it is being ran on is publicly or privately accessible.
This then means that in order for communication to work properly across the network there will need to be a solid and robust 'communication layer' which acts to communicate between protocols across the entire network and as such this will be almost all of the initial development since the protocol stage cannot be built until this is finished. It is expected that the communication layer will be approximately half of the development of the entire project.
The Protocol
Once the communication layer is implemented and sufficient, the protocol can be implemented within the software. This will be done by taking the rules defined in the documents relating to the protocol and any new rules planned in further development cycles and implementing these rules to the data structure of the communication and storage of data for the blockchain.
This means that it will be important to write the node software in a language where the types of the data can be clearly defined, such as typescript, so as to prevent any errors in accidental definitions of incorrect data types that do not perfectly follow these rules.
Last updated