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
if you connect to multiple peers at once, it's possible that they send the same messages. Especially in the case of the initial sync, this could result in transmitting many more messages than expected.
The most obvious solution would be to subscribe to activate transmit on only the first peer, but the others in lazy mode. however, then if the first peer just sends messages very slowly (including possibly so slowly it looks like not sending anything) you may get stalled, because currently you only switch peers when you receive a note from another peer.
so if A has {a: 5, b:5} and B has {a:5, b:5} and we are connected to both and have A sending a,b to us, but it pauses at a:3 and b:3, then we are just stuck, even though we could just ask B for those feeds.
I think the solution is to track the latest time we received a message from a peer, and if this is greater than some threashold, switch peers (randomly?) if there is some other peer more up to date than us.
It might also be a good idea when connected to peers to request from each peer randomly too.
The text was updated successfully, but these errors were encountered:
if you connect to multiple peers at once, it's possible that they send the same messages. Especially in the case of the initial sync, this could result in transmitting many more messages than expected.
The most obvious solution would be to subscribe to activate transmit on only the first peer, but the others in lazy mode. however, then if the first peer just sends messages very slowly (including possibly so slowly it looks like not sending anything) you may get stalled, because currently you only switch peers when you receive a note from another peer.
so if A has {a: 5, b:5} and B has {a:5, b:5} and we are connected to both and have A sending a,b to us, but it pauses at a:3 and b:3, then we are just stuck, even though we could just ask B for those feeds.
I think the solution is to track the latest time we received a message from a peer, and if this is greater than some threashold, switch peers (randomly?) if there is some other peer more up to date than us.
It might also be a good idea when connected to peers to request from each peer randomly too.
The text was updated successfully, but these errors were encountered: