typeintandem / tandem

Typing in Tandem. Decentralized, cross-editor, collaborative text-editing!
Apache License 2.0
695 stars 20 forks source link

NAT traversal using hole punching #61

Open geoffxy opened 6 years ago

geoffxy commented 6 years ago
rageandqq commented 6 years ago

@geoffxy Do we have to use UDP? I read through the abstract + intro of the paper you linked in Slack. It seems that although the % of networks that allow hole punching through TCP is lower, it is still possible. TCP guarantees reliability so we won't have to worry too much about network issues afterwards.

geoffxy commented 6 years ago

We'd need to test out TCP hole punching to see how reliable it is. It seems like UDP hole punching is what works most frequently, which would be more useful to us in establishing the connections. Though if we can get TCP hole punching working reliably it would probably be less work on the agent's side in terms of not having to switch the transport and not having to think too much about message size.

From this, it looks like UDP's reliability isn't that bad though. http://openmymind.net/How-Unreliable-Is-UDP/ The CRDT should be resilient to reordering. The only problem will be inconsistencies due to lost messages.

rageandqq commented 6 years ago

@typeintandem/lightly I think we can close this and move the keep-alive messages to a non-launch blocking issue.

rageandqq commented 6 years ago

Moving everything in here over to Milestone 5 for housekeeping, closing down Milestone 3.