You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of connection maintenance in Blend protocol is cumbersome.
We actually don't need to handle the connection monitoring result of 'all' connected peers in bulk. It's hard to deal with bulk results and the code is not readable. Each peer can be monitored individually in the ConnectionHandler level (not Behaviour level as the current), and the result can be reported to the Behaviour individually.
We shouldn't close connections proactively by the Behaviour, because the connections are shared by all Behaviours that share a Swarm (though we have only one Behaviour in the blend service). Instead, the ConnectionHandler drops a stream from memory if necessary. Then, the Swarm will close the connection eventually if there is no active stream. It makes more sense because we planned to move the connection monitoring into the ConnectionHandler as I mentioned at the first bullet point above. The ConnectionHandler can make a right decision to drop the stream if the peer is detected as malicious.
The Behaviour doesn't need to hold a Membership. Instead, it can just notify the Backend how many new connections it needs. Then, the Backend can choose random peers and request the Swarm to dial them. Since we don't clearly know how to handle membership updates in the future, it would be better to keep membership inside the Backend where we have more control.
The text was updated successfully, but these errors were encountered:
The current implementation of connection maintenance in Blend protocol is cumbersome.
ConnectionHandler
level (notBehaviour
level as the current), and the result can be reported to theBehaviour
individually.Behaviour
, because the connections are shared by allBehaviour
s that share aSwarm
(though we have only oneBehaviour
in the blend service). Instead, theConnectionHandler
drops a stream from memory if necessary. Then, theSwarm
will close the connection eventually if there is no active stream. It makes more sense because we planned to move the connection monitoring into theConnectionHandler
as I mentioned at the first bullet point above. TheConnectionHandler
can make a right decision to drop the stream if the peer is detected as malicious.Behaviour
doesn't need to hold aMembership
. Instead, it can just notify theBackend
how many new connections it needs. Then, theBackend
can choose random peers and request theSwarm
to dial them. Since we don't clearly know how to handle membership updates in the future, it would be better to keep membership inside theBackend
where we have more control.The text was updated successfully, but these errors were encountered: