Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Gossip to CONN #354

Open
11 tasks
staltz opened this issue Jul 18, 2019 · 3 comments
Open
11 tasks

Migrate from Gossip to CONN #354

staltz opened this issue Jul 18, 2019 · 3 comments

Comments

@staltz
Copy link
Member

staltz commented Jul 18, 2019

Here's a big issue that covers a lot of TODOs in order to move away from ssb-gossip and adopt ssb-conn. Feel free to edit this list if you come across some other task related to gossip.

  • Patchcore REQUIRED
    • patchcore/sbot.js should replace sbot.gossip.peers (a sync api) with ssb.conn.peers (a source api), should pull.drain that and update localPeers and connectedPeers
  • Patchcore REQUIRED
    • patchcore/sbot.js should expose a new api called stagedPeers, similar to localPeers and connectedPeers, based on ssb.conn.stagedPeers (a source api)
  • Patchcore OPTIONAL
    • patchcore/sbot.js should replace gossipConnect with connConnect, replace sbot.gossip.connect with sbot.conn.connect
  • Patchbay REQUIRED
    • patchbay's Network page should also observe stagedPeers, display them, and allow the user to "approve" a staged peer, which should call patchcore.connConnect and then publish a new follow message
  • Patchbay REQUIRED
    • patchbay should use ssb-lan instead of ssb-local
  • ssb-ahoy OPTIONAL
    • ssb-ahoy/views/replication should replace server.gossip.connect with server.conn.connect
  • ssb-invite OPTIONAL
    • ssb-invite should replace server.gossip.add with server.gossip.remember
  • ssb-replicate OPTIONAL
    • ssb-replicate should replace ssbServer.gossip.peers (a sync api) with ssbServer.conn.peers (a source api), pull.filter that to have only type==='lan' and truthy .key, pull.drain that, and request() replication
  • ssb-ebt OPTIONAL
    • ssb-ebt/index.js should remove the sbot.gossip.disconnect call because ssb-conn's scheduler automatically makes sure that blocked peers will never be connected to
  • ssb-device-address OPTIONAL
    • ssb-device-address/index.js should replace sbot.gossip.add/remove with sbot.conn.remember/forget, notice the TODO comment in ssb-device-address, ssb-conn supports multiserver addresses
  • ssb-friend-pub OPTIONAL
    • ssb-friend-pub/index.js should replace sbot.gossip.add/remove with sbot.conn.remember/forget

Note: gossip's add() is equivalent to CONN's remember() + connect(), so in some cases where we had gossip.add, we might want to do only conn.remember, and in other cases, we might want to do conn.remember plus conn.connect. "Remember" means "store in the persistent db", and "Connect" means "connect to them right now".

@mixmix
Copy link
Member

mixmix commented Jul 29, 2019

wow this is comprehensive @staltz !
Look forward to chipping away at this and getting your great work mainstream

@stale
Copy link

stale bot commented Oct 27, 2019

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the stale label Oct 27, 2019
@staltz
Copy link
Member Author

staltz commented Oct 28, 2019

Stap it bot

@stale stale bot removed the stale label Oct 28, 2019
@staltz staltz removed their assignment Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants