SocketCluster is an open source real-time framework for Node.js.
Integrating SocketCluster with Lisk Core will help improve connection reliability and allow the application to run multiple processes at the same time which will lay the foundation for future Lisk clusterization.
Most importantly, the solution will aid Lisk in serving more transactions in the same time frame as before. The protocol provides a simultaneous, two-way communication channel between a client and a server. This, in turn, increases network overview control and streamlines chain management.
By changing from the stateless HTTP protocol to persistent socket connections, we aim to improve block/transaction propagations times, and the general efficiency of peer to peer communications.”
SocketCluster provides a much-needed customization on the connection layer. Every delegate will be able to tailor their own server to their needs by specifying the number of parallel processes responsible for receiving the connections and updating network data.
In order to standardize the way peers are communicating, the new plugin, wamp-socket-cluster, has been introduced by the Lisk team. It is fully open-sourced and maintained by Lisk. Every network member is now compliant with WAMP protocol, which means that the P2P communication layer can be used in two ways: publish/subscribe or RPC (Remote Procedure Call) manner.
RPC is notably helpful in making sure that a proper response from the right peer has been received. This is not required when subscribing for the resources (transactions, signatures, blocks). RPC is already a proven approach used by other projects such as Bitcoin and Ethereum.
The Lisk Core 1.0.0 release will introduce WAMP protocol in the internal P2P layer, and be adapted within the public API as well.
“At Lisk, we’re determined to support and promote progressive technologies and forward-looking entrepreneurs. During the development process, we worked closely with Jonathan Gros-Dubois, SocketCluster creator, often relying on his technical expertise to ensure a smooth transition from one protocol to another. We have also decided to back his endeavor financially to make sure that it grows in scope and reach.”