@jtr@mastodon.technology @debian @kensanata It's gonna be tough to explain #NNCP in 500 chars but I'll try
So I wrote this article which is an intro to it https://changelog.complete.org/archives/10163-rehabilitating-asynchronous-communication-with-nncp-a-cross-between-tor-ssh-and-uucp Now I will say #Syncthing has some asynchronous properties also, which I explored at https://changelog.complete.org/archives/10219-a-simple-delay-tolerant-offline-capable-mesh-network-with-syncthing-optional-nncp but it doesn't go as far as NNCP. 1/
@jtr@mastodon.technology @debian @kensanata So #NNCP at its core is different because it doesn't require the source and destination to be online simultaneously. With TCP, the origin of a packet is responsible for ensuring it gets delivered, retransmitted if dropped, etc. With NNCP, you send data to the next hop and then that hop takes over responsibility. It may be days before that hop is able to deliver it. That hop may be a computer, or it may be a USB stick or a radio. 2/
@jtr@mastodon.technology @debian @kensanata #NNCP can be used to send files and execute things remotely. Think of it like ssh/scp and authorized_keys. I can say: tar -cpf /usr | nncp-exec dest untar -C /backups
where I defined untar on the dest node as something that runs "tar -xpf -" and then we add a -C telling it where to unpack.
You could run a very similar command with ssh. Difference: dest doesn't have to be online with NNCP. 3/
@jtr@mastodon.technology @debian @kensanata In that nncp-exec example, the data piped to nncp-exec is saved, along with the command line to run, in a data packet that is encrypted using the public key of the destination. Now it can be transported, directly or indirectly (via other nodes), over the network, USB drives, CD-ROMs, tapes, radios, laptops, phones, a combination of these, whatever. It can traverse multiple NNCP hops along the way, and is onion-routed like tor 4/
@jtr@mastodon.technology @debian @kensanata So let's make this practical. Say you have slow Internet at home but fast Internet at a coffee shop. You have 10GB to send out. On your desktop at home, you queue it up to go like this: desktop->laptop->remote_server. Your desktop encrypts the 10GB to remote_server, wrapping that in a packet encrypted to the laptop. The laptop decrypts the outer encryption when it gets the data, but still can't see the actual data. Laptop sends it out when you get to coffee shop. 5/
@jtr@mastodon.technology @debian @kensanata I use #NNCP for backups. I take hourly snapshots with #ZFS. I have a backup system with no Internet. My backups are sent to a staging box, and then I can get those packets over to the backup box with the various methods I've mentioned. On my laptops, NNCP is configured to only automatically send packets to staging when they're on the home LAN, because I may be tethered to 4G otherwise. But I can manually send them off when I'm on fast Internet away from home. 6/
@jtr@mastodon.technology @debian @kensanata #NNCP also has an #asynchronous #multicast feature, which I use to sync my #orgmode #git repo as described here https://changelog.complete.org/archives/10274-distributed-asynchronous-git-syncing-with-nncp I also have more on NNCP here https://www.complete.org/nncp/ 7/
@jtr@mastodon.technology @debian @kensanata So #NNCP can be used to transport #Usenet news and #email because fundamentally those things can be transported by piping data into the rnews and rmail commands, which fits perfectly with nncp-exec. In fact, a predecessor to NNCP, #UUCP, was the way email and news often flowed in the early days, and this support is mostly still there even in modern servers. It takes just a bit of tweaking to make it use NNCP instead. 8/
@jtr@mastodon.technology @debian @kensanata So I hope this helps, feel free to ask followup questions end/