-
Notifications
You must be signed in to change notification settings - Fork 457
Share WS connection between Peers #3342
Comments
@MaciejBaj If we need to store Two peers on the network can do |
I found that there are 2 developers working on this issue https://github.com/LiskHQ/lisk/tree/1935-reuse_socket Why not joining effort? |
@pcdinh branches are relying on each other. The issue scheduled do to eventually after 1.0.0 release. |
The issue is suspended until the following improvements on the P2P layer will be elaborated. |
Shared WS connection will be considered to be introduced as part of https://github.com/LiskHQ/lisk-elements/milestone/14 on Lisk Elements. |
…_peers Share a single ws connection between peers - Closes #3342
Parent #1882
Expected behavior
2 Peers will always share the same WS connection. Both for client and server calls.
https://github.com/LiskHQ/lisk/blob/development/api/ws/rpc/connect.js
Contains logic responsible for establishing Client WS connection. It should be moved and merged with establishing Server WS connection - https://github.com/LiskHQ/lisk/blob/development/api/ws/workers/peers_update_rules.js.
Remaining logic of
connect.js
-registerRPC
should redirect allpeer.rpc
client calls to the corresponding worker which will handle the request and return the results. A corresponding worker will be identified by storingworkerId
field - worker process which is responsible for P2P communication with selected Peer.Advantages:
Actual behavior
peer
object on Master process. Server Connections are stored on worker process. Data integrity between processes needs to be kept which seems to be a problem currently.Which version(s) does this affect? (Environment, OS, etc...)
1.0.0
The text was updated successfully, but these errors were encountered: