lizadaly / windrift

A JS framework for writing mutable stories
https://windrift.app
MIT License
230 stars 16 forks source link

Consider peer-to-peer WebRTC notifications #70

Closed lizadaly closed 2 years ago

lizadaly commented 3 years ago

WebRTC is not a good option for the actual choice communication, but could be a good model to enable less frequent heavy polling, and to support "presence" functionality.

lizadaly commented 2 years ago

I'd like to use Peer.js but it still requires a server, isn't that actively maintained, and has a lot of weird dependency issues.

lizadaly commented 2 years ago

Re-opening this for consideration; maybe look into rolling my own?

lizadaly commented 2 years ago

It doesn't seem practical to DIY this, but maybe an interface to plug in to either Pusher or Ably to let the clients know to poll is the best of all worlds. PeerJS with its built-in server is still an option too though I'm guessing the team responsible has lost interest in maintaining it. Probably good for example code though.

lizadaly commented 2 years ago

Pusher code for reference:

https://github.com/lizadaly/windrift/commit/eb77ce0451c5762646deaa2a820dc072979547a3 (client endpoints) https://github.com/lizadaly/windrift/commit/38496587a24f1e484bfcebdde5beedcaa1788369 (server auth)

lizadaly commented 2 years ago

This is in a good place now.