coast-team / netflux

JavaScript client and server side transport API based on WebRTC & WebSocket
https://coast-team.github.io/netflux
GNU Affero General Public License v3.0
213 stars 14 forks source link

Consider an attribute of Peer to show which peers in a channel have closer network distance #13

Open cjdelisle opened 8 years ago

cjdelisle commented 8 years ago

In order for the realtime engine (e.g. ChainPad) to build the document, it needs to access the history of the channel to which it has joined. Since every ChainPad instance has the history, it is ok for us to alter ChainPad so that it can ask a peer for the history and then provide that history. However in order to ensure that peers with good network latency are selected, there should be an attribute which indicates how preferable a peer is for communicating with, this way the peers to ask can be selected from the peers in the channel.

cjdelisle commented 8 years ago

consider perhaps peer.linkQuality = <integer 0 to 0x8fffffff> (largest signed 32 bit integer) where higher value is better.

kalitine commented 8 years ago

Interesting remark, thanks. I'll add it.