Peer to peer network migration
Migrate network from client/server to a peer-to-peer architecture.
The peer to peer network migration did not start as such. Instead it started when I needed to find a system that would automatically backup a server so that there could be a spare in the event of a crash. Originally the plan was to keep a client/server network layout and have the spare server automatically boot, sync and power down regularly. The idea was to use a tool called FreeFileSync to maintain up to date copies of the files. I chose this software as it was present in some of my previous projects and worked satisfactorily as multi platform compatible and it synchronized changes accurately. However, I decided to research just a bit more as this was for a critical system. I found an even more viable alternative, Syncthing.
Syncthing was even more streamlined and dynamic than FreeFileSync as it could dynamically find linked peers from around the internet and behind most NAT/firewall setups without having to rely on static IP addresses or host names. With Syncthing, I had the Idea to switch to a peer-to-peer file distribution to further improve reliability. A copy of all of the critical files (that usually resided on the server) were to be duplicated on each peer. This drastically increased the file redundancy and reduced file access times. It also had an unforeseen consequence, the server was no longer required after each computer had a copy of all of the files. Finally, the time came to demonstrate that the server could be powered off and all operations could continue as normal. Everything went smoothly and the office celebrated as the server that had been unreliable in the past could be completely powered down and repurposed.
Another bonus of using Syncthing was that employees could use computers off site while maintaining a secure and encrypted connection to the office. This allowed their changes to appear in almost real-time on all of the other peers.
After the network had been in place for some time, an issue started to arise. They were mostly on the side of the Syncthing auto updater. Sometimes the Syncthing auto updater corrupted the Syncthing installation and caused the peer to become out of sync with the network. This was troublesome as Syncthing released updates relative frequently and this caused a fear that automatic updates would trash the network every time there was an update. My solution was to create a tool that would automatically fix the Syncthing installation, hence the Syncthing Emergency Reset Button was born. This custom tool automatically reset all Syncthing components and scheduled tasks (auto start) on the peer that it was executed.
After the reset button was created, no new issues arose, besides connecting new peers to the network. My clients were highly satisfied with the reliability and the new features. Based on this feedback, I concluded that the mesh network migration project was a big success.