4 ms·
as someone who likes working in a coffeeshop full of sf strivers, i love the vibe of these co-presence ideas. I have a technical question though... Has anyone
by rgbrgb 3y ago
as someone who likes working in a coffeeshop full of sf strivers, i love the vibe of these co-presence ideas. I have a technical question though...
Has anyone figured out a nice way to do the partykit-like cursor stuff [0] that doesn't need a database/intermediary? It would be so nice to be able to ship a p2p presence-enabled static site without a dedicated server. Looks like partykit has a generous free tier but we all know those only last so long.
Oh and while I'm here I'll plug my friend's project that this reminded me of! StreetPass is a browser extension that helps you find your people on Mastodon by checking for social metadata tags on the sites you visit [1].
[0]: https://blog.partykit.io/posts/cursor-party https://blog.partykit.io/posts/cursor-party
[1]: https://streetpass.social https://streetpass.social
- esafak 3y agoUse Websockets if it's just two people. edit: This is server-mediated. For true P2P you could use WebRTC.
- rgbrgb 3y agohow do you get websockets to work p2p? afaik websockets needs a dedicated server to relay messages.
- jcelerier 3y agoWebRTC will also require having TURN servers to relay messages if you want to be compatible with everyone on internet. True P2P is pretty much impossible in a way that works in 100% of the networks.
- gfodor 3y agoYou can use my project p2pcf [1] to do WebRTC signalling and then sync the cursors by just blasting datachannel messages to all your connected peers. For a project I made that uses this to do far more than cursor syncing, but syncs an entire 3d world with voip, checkout https://webspaces.space https://webspaces.space [1] https://github.com/gfodor/p2pcf https://github.com/gfodor/p2pcf
- rgbrgb 3y agoawesome, thank you