Currently thinking about inter-communication options when neither device knows where the other is.
- Assumption the notification repo is malicious
- Easy for anyone to set up and hack on
- Very high reliability
- Self-hosted FLOSS-only software
Needing a server
There seems to be no escape from needing a server on a known IP as even P2P solutions need somewhere to negotiate a connection.
An alternative could be using dynamic DNS so the home is on a static IP port forwarding to an edge device that’ll collect and serve the notifications. I’m a little wary of recommend this as a failure in security could produce a beachhead into the home network where-as a cloud solution keeps things off-site so it’s almost certainly going to be a cloud solution build unless someone shows me a P2P miracle.
Hypothetically Matrix may be a good solution but that depends on how much of a pain it’d be to implement.
socat would be pretty lightweight but they’re not exactly well tested edge solutions and many users may already have a routing software.
nginx is one of the most popular routers for serving web requests so i’ll likely go with that and the implementation can be friendly with working alongside other services.
nginx can also communicate with POSIX Shell and BASH directly which eliminates the need for a bloated AF Web stack and needing to know an additional language. You could even write a Website in pure POSIX if you wanted to (don’t tempt me).
Removing Internet dependency
The idea that the Internet has to work for my calendar software to alert me or to be able to share my clipboard with the computer next to me is not great.
There’s some pretty complicated ways this could be made decentralized but I think the most simple and elegant way would be to just have duplicate systems. An example set up would be deploying this server on both a Digital Ocean droplet and a LAN based Raspberry Pi.
Outbound messages will be given a provable collision free UID and sent to every server in the user’s configuration file if they’re accessible (both droplet and LAN Pi).
Inbound messages will be read from both servers and ones with duplicate UID’s will be ignored.
This would provide LAN based speeds while preserving remote capability without needing to expose a home server as an edge device.