News for hackers. Stuff that matters.
Re:Serverless collaborative editor using CRDT by EGreg on Sunday March 03, 2019 @09:10PM (#19298276)
“Wait, did you just connect a couple WebRTC browsers without a STUN server?”

“Yeah, so?”

“That’s against the rules, isn’t it?”

“Screw the rules, I’ve got CRDT!”

Seriously, though, how do the two browsers find each other without a STUN server?

Re:Serverless collaborative editor using CRDT by kaoD on Monday March 04, 2019 @04:22AM (#19299898)
> Seriously, though, how do the two browsers find each other without a STUN server?

SDP offers and answers include local IPs, so if you relay them manually they can connect to each other if they're on the same local network.

Unfortunately, last time I checked, Firefox's answers time out before you have a chance to relay them through a second channel (about 5 secs after offer has been accepted IIRC) so you still need a relay server for real scenarios :/

Re:Serverless collaborative editor using CRDT by thisacctforreal on Monday March 04, 2019 @01:40AM (#19299263)
Re:Serverless collaborative editor using CRDT by dboreham on Monday March 04, 2019 @11:29AM (#19302449)
>Seriously, though, how do the two browsers find each other without a STUN server?

In the general case+ they can't.

+Defined as: not on the same LAN, not on the typical carrier/corporate network.

Re:Serverless collaborative editor using CRDT by aruggirello on Monday March 04, 2019 @03:47AM (#19299752)
What if you're behind a firewall BTW? Would CRDT require forwarding ports?
Re:Serverless collaborative editor using CRDT by dboreham on Monday March 04, 2019 @11:35AM (#19302506)
You're talking about two quite different layers. CRDT deals with "how could we replicate complex data with multiple writers and achieve eventual consistency in a distributed system?" (Problem #1)

Forwarding ports and so in is dealing with "how can we get people's devices and computers to use the Internet like it was intended to be used, where nodes can make arbitrary connections to each other, even though that Internet was long ago broken by NAT and firewalling?" (Problem #2)

The two only appear together because if you were interested in solving Problem #2 then you probably also have Problem #1.

Re:Serverless collaborative editor using CRDT by kreetx on Monday March 04, 2019 @01:38AM (#19299255)
My question too.
Re:Serverless collaborative editor using CRDT by EGreg on Monday March 04, 2019 @02:13AM (#19299391)
Anyone remember OPENPEER?
Re:Serverless collaborative editor using CRDT by kreetx on Tuesday March 05, 2019 @04:03AM (#19309210)
Are there any good resources to read up on this?

I don't really recognize the name. The only thing I remember related to something similar was some windows program which somehow made peer-to-peer connections possible, supposedly through starting out using an external server first, and then somehow continuing in peer-to-peer mode.

Never did find out how it worked. But since with any connection involving a public server and a PC behind a NAT the packets reach the PC from the NAT because the NAT kept state, so I theorized that this program set this state up in a way that two machines behind NATs could continue this conversation.