Missing: Outgoing connection sheduler
Opened this issue ยท 3 comments
I totally punted on this for now, mostly because go-sbot was intended as a pub for the most time where gossiping happens naturally with the incoming connections.
My other fear is that I saw how messy this can get on the JS side. One rewrite of ssb-gossip went no-where and the 2nd rewrite (ssb-conn) seems to offer more readable code but still lacks behind in features and reliability.
For local client experiments I have been using this as a stop gap:
cat > /tmp/connect.hosts << EOF
net:cryptbox.mindeco.de:8008~shs:xxZeuBUKIXYZZ7y+CIHUuy0NOFXz2MhUBkHemr86S3M=
net:cryptoscope.co:8008~shs:G20wv2IZkB7BA/LKe7WMuByop3++J0u9+Y32OoEVOj8=
net:one.butt.nz:8008~shs:VJM7w1W19ZsKmG2KnfaoKIM66BRoreEkzaVm/J//wl8=
net:pub.t4l3.net:8008~shs:WndnBREUvtFVF14XYEq01icpt91753bA+nVycEJIAX4=
EOF
cat /tmp/connect.hosts | while read maddr
do
sbotcli connect $maddr
sleep 600
done
My third hesitation came from the fact that it's very hard to gauge network errors on mobile clients. Is a connection failing because you just went into a tunnel or because the pub server is unreliable?
For this reason planetary also schedules it's connections just by calling sbot.Network.Connect(...)
without any internal helper code from go-ssb.
I still think it would be good to have a variation of that bash script as an included module that can be switched out, similar to the ssb.ConnTracker
interface. A very simple first draft would offer adding favorite pubs like my bash script and then dial them in random once it doesn't have enough connections.
i was wondering about this, since i noticed the lack of connections to my wee pub, thanks for posting this!
(ssb-conn) seems to offer more readable code but still lacks behind in features and reliability.
I'm curious what you think is lacking because I'm not aware of any ๐
lacks behind in features
I wish I would have spelled those out when I wrote this... ๐
one thing I remember was weird: scheduling of new connections, where it just tried to remain at two but creating new ones all the time from local peers and killing "older" ones. This might be fixed by now.