ShadowJonathan / eduP2P

An authenticated peer-to-peer network overlay
MIT License
3 stars 1 forks source link

Control Server #45

Open ShadowJonathan opened 3 months ago

ShadowJonathan commented 3 months ago
ShadowJonathan commented 3 months ago

We should also have the Control server do health checks on relay servers, and possibly even automatically restart them (?) if they're unhealthy.

Maybe also send "advice" commands to nodes to use different relays, if it cant recover the unhealthy relay? (Maybe this can be done with an extra flag in relay information, "avoid", which then gets pushed by control to on or off, where the client can then find a new home relay, or use that one relay if there is no other. it can then provide a warning to the user if there is no other non-avoid relay, to say that the connection might be unstable.)

ShadowJonathan commented 3 months ago

Currently handling the protocol to control as BSON, since JSON can be a bit too much, and I'm not sure if I'd want to implement the protocol with framing all over again.

The overhead shouldn't be too much for Control, though i'm not sure if i'd want to also do this for the relay protocol as well, since I'm not sure how it handles sheer binary frames and the likes, which the current relay framing protocol is very good at.

ShadowJonathan commented 3 months ago

Nevermind about BSON: the mongodb driver ignores most golang conventions, and is happy to zero-fill structures if it doesn't marshal or unmarshal values properly.

Back to JSON