cabal-club / cabal-core

Core database and replication for cabal.
GNU Affero General Public License v3.0
302 stars 43 forks source link

Replication handshake #40

Closed hackergrrl closed 4 years ago

hackergrrl commented 5 years ago

It would be really nice if both peers, before replicating, could exchange metadata about themselves and decide whether to sync. I wrote something for doing just this for Mapeo called handshake-stream. For now, the payload could just be a cabal protocol version string.

This would let clients potentially show meaningful sync errors, and also avoid showing peers by their pubkey on the sidebar when we aren't even replicating with them.

dwblair commented 5 years ago

I love this idea -- and I'm going to check out handshake-stream!

In my experience of experimenting with cabal with friends: when we don't connect, I then wonder where the fail point is: am I myself unable to reach the outside world? And/or is the 'bootstrapping node' online? Is the other peer online?

There are some nice diagnostics bundled into dat-doctor that feel perhaps relevant ...

... but maybe none of this is within scope of the (already useful) feature you're describing here ...

cblgh commented 5 years ago

ohhh ohhh could we have clients tell others what version of cabal-core they are running in the handshake? that would be great for implementing a feature that let's people know that "hey your peers are using a newer version of cabal-core!"

hackergrrl commented 5 years ago

Yes!

hackergrrl commented 4 years ago

Closing, since we now have hypercore extensions for ephemeral message passing between peers!