Hacker News new | ask | show | jobs
by shireboy 1366 days ago
Looks interesting but a few questions I don’t see answered in the docs: How do permissions work? Ie if I had a notes app, and wanted users to only be able to upset and query _their_ notes, how do I make that happen?

Why no LAN for web browser mode? A pwa with offline support should be able to sync with other resolvable ips on the same pan, no? Hopefully WebBluetooth will be available soon too?

1 comments

Looks like LAN depends on multicast for discovery, which isn't available in browsers as far as I can tell: https://docs.ditto.live/javascript/common/mesh-network/suppo...

Regardless you definitely wouldn't be able to do browser-to-browser discovery and connection via HTTP or WebSockets, since you can't create a web server in browser, but I imagine you could do P2P via WebRTC if you can just find a way to discover the other peer's details in the first place.

Perhaps the Web Share API [1]? Once you've got the share prompt up, the end user could use AirDrop or similar?

1: https://developer.mozilla.org/en-US/docs/Web/API/Web_Share_A...

Webrtc allows getting the local IP address. maybe these could be distributed manually or when a discovery service is available, and then tried when it's not?