tinyplex / tinybase

The reactive data store for local‑first apps.
https://tinybase.org
MIT License
3.85k stars 85 forks source link

WebRTC Synchronizer #158

Open fenicento opened 4 months ago

fenicento commented 4 months ago

Is your feature request related to a problem? Please describe. Currently to synchronize remote clients the only way is through websockets. This requires a WS server, which can be non trivial to maintain

Describe the solution you'd like It would be great to have a synchronizer working with webRTC in order to enable peer to peer data update. A signaling server is still required, but it's lighter and data would be exchanged directly between clients

Describe alternatives you've considered y-webrtc works just fine, it would be great to ingreate it in the project.

jamesgpearce commented 4 months ago

ok! this sounds fun...

mjn298 commented 2 months ago

@jamesgpearce I've been eager to learn about WebRTC for a while - I'd like to take a crack at this though I'll need to get up to speed

mjn298 commented 1 month ago

Architecture question after reading about WebRTC:

I am assuming there's no desire nor intent for a signalling server to be built in to Tinybase - therefore my focus is on providing a WebRTC layer and interface to a(ny) signaling server - similar to what's asked for here: https://github.com/yjs/y-webrtc/issues/55.

Is that correct?

jamesgpearce commented 1 month ago

I think that would be the best. I don't want to carry heavy dependencies - assuming you can find a way to pass in the server you need as an argument. (That's the pattern I try to use everywhere else there are integrations with TinyBase)