Open staltz opened 5 years ago
wow this is comprehensive @staltz ! Look forward to chipping away at this and getting your great work mainstream
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
Stap it bot
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/sbot.js
should replacesbot.gossip.peers
(async
api) withssb.conn.peers
(asource
api), should pull.drain that and updatelocalPeers
andconnectedPeers
patchcore/sbot.js
should expose a new api calledstagedPeers
, similar tolocalPeers
andconnectedPeers
, based onssb.conn.stagedPeers
(asource
api)patchcore/sbot.js
should replacegossipConnect
withconnConnect
, replacesbot.gossip.connect
withsbot.conn.connect
stagedPeers
, display them, and allow the user to "approve" a staged peer, which should callpatchcore.connConnect
and then publish a new follow messagessb-ahoy/views/replication
should replaceserver.gossip.connect
withserver.conn.connect
ssb-invite
should replaceserver.gossip.add
withserver.gossip.remember
ssb-replicate
should replacessbServer.gossip.peers
(async
api) withssbServer.conn.peers
(asource
api), pull.filter that to have onlytype==='lan'
and truthy.key
, pull.drain that, andrequest()
replicationssb-ebt/index.js
should remove thesbot.gossip.disconnect
call because ssb-conn's scheduler automatically makes sure that blocked peers will never be connected tossb-device-address/index.js
should replacesbot.gossip.add/remove
withsbot.conn.remember/forget
, notice the TODO comment in ssb-device-address, ssb-conn supports multiserver addressesssb-friend-pub/index.js
should replacesbot.gossip.add/remove
withsbot.conn.remember/forget
Note: gossip's
add()
is equivalent to CONN'sremember()
+connect()
, so in some cases where we hadgossip.add
, we might want to do onlyconn.remember
, and in other cases, we might want to doconn.remember
plusconn.connect
. "Remember" means "store in the persistent db", and "Connect" means "connect to them right now".