pikers / piker

(e2e) foss trading for non-tinas
GNU Affero General Public License v3.0
103 stars 17 forks source link

Roaming support, general real-time network measurements #330

Open goodboy opened 2 years ago

goodboy commented 2 years ago

This issue demands a networking tool-set driven by 2 sets of requirements:


Breakdown per bullet:

RE: Roaming

More or less the ideal UX is when a user reconnects a live running pikerd session, we are able to detect this and fire requests to reconnect the gateway with a faster timeout then the default :joy:.

Some brief web searching says start digging in these on linux:


RE: connectivity metrics

A set of trio native network probe tools would be most ideal to be able to (dynamically) spawn tasks which record measurements using the same subsystems as FSP and data feeds. Likely we'll have to compromise to start with some kinda asyncio lib wrapping...

goodboy commented 2 years ago

found a small script that seems to work with iproute2 pretty well, slightly modified from this one:

'''
Simplest example to monitor Netlink events with a Python script.
'''

from pyroute2 import IPRSocket
from pprint import pprint

ip = IPRSocket()
ip.bind()

while True:
    pprint(ip.get())

ip.close()