You are reading content from Scuttlebutt
@mix %1XL44R+T1f8HWhCnE+QIuuRw81LunX1y93YfzP3EngE=.sha256
Re: %HJTzjmTcr

TOO LATE

thoughts so far :

  1. Prioritisation of peers
    • how about numeric values? (Low) 1,2,3, ... 9? (High), -1 === 'BLOCK'
    • avoids magic strings ... mind you redux is all about that magic!
  2. Where does this fit in the stack?
    • I'm new to this, so am surprised when init takes some connectToPeer? is this for testing
    • does this manage things automatically for me? The text "that manages making connections to other sbots" makes me think it foes, but the features suggest this is a providing accessible methods for managing connections myself ???
  3. Does this follow the 'instantiation pattern?
    • start and instance var manager = require('sbot-connection-manager')(opts)
    • use the instance: manager.startInitialSync()
  4. I've become a real big fan of methods nest in 'domains', as I think this makes it easier to clearly group concerns, and provide shorter and more legible names e.g. :
    • manager.initialSync.start(), manager.initialSync.stop()
    • manager.peers.setPriority, manager.peers.add, manager.peers.obs
    • manager.connections.start(), manager.connections.seLifetime, manager.connections.peerConnected
Join Scuttlebutt now