local-first-web / state

A Redux-based state container for local-first software, offering seamless synchronization using Automerge CRDTs. (Formerly known as 🐟 Cevitxe).
189 stars 10 forks source link

Implement signal server swarm #27

Open HerbCaudill opened 5 years ago

HerbCaudill commented 5 years ago

randomly select a URL if more than one is provided? select best based on ping?

https://github.com/DevResults/cevitxe/blob/c8f9e8c6676987c5fed42131fd7115a22c9fd12e/packages/core/src/Client.ts#L23-L28


This comment was generated by todo based on a TODO comment in c8f9e8c6676987c5fed42131fd7115a22c9fd12e in #26. cc @DevResults.

Originally posted by @todo in https://github.com/DevResults/cevitxe/pull/26#issuecomment-541784149

HerbCaudill commented 5 years ago

Currently if we see a configuration with more than one URL for signal servers, we just pick the first one.

That's because we don't currently support having more than one signal server per discovery key. (If Alice talks to signal server X and Bob talks to signal server B, they'll never be introduced even if they have the same discovery key.) That's because servers don't know anything about each other.

To support multiple signal servers, I'd like to implement a swarm along these lines: