Skip to content

Migrate from Gossip to CONN #354

@staltz

Description

@staltz

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions