Syncthing is a continuous peer-to-peer file synchronization application written in Go. It runs as a daemon, monitors local folders, hashes files into blocks, exchanges metadata with other devices via the Block Exchange Protocol (BEP) over TLS, and transfers blocks as needed. The architecture is a monolithic core with separate infrastructure server binaries for discovery, relay, upgrades, and usage reporting. The main binary includes the sync engine, REST API, web GUI (AngularJS), and CLI. It uses a suture-based service tree for managing goroutine lifecycles. Key data flows involve file scanning, hashing, index exchange, block request/response, and file writing, with events propagated to the API via an event system. The codebase demonstrates high craftsmanship with clean abstractions (filesystem layer, database abstraction, version vectors), extensive testing, and cross-platform support. It is actively maintained with a large community.
Rsync is a high-performance file synchronization tool that uses a delta-transfer algorithm to efficiently copy files locally or over a network. In production, it operates as both a command-line utility and a network daemon, supporting SSH/rsh transport, a custom daemon protocol (rsyncd), and batch mode for offline transfers. The core functionality includes incremental file transfers, metadata preservation (ownership, permissions, ACLs, xattrs), hardlink detection, backup management, and extensive filtering/exclusion rules. Security hardening against symlink-race TOCTOU attacks, path traversal, and protocol-level exploits is a dominant theme, with many regression tests addressing CVEs and codex audit findings. The architecture is a C application with a client-server model. The transfer engine is split into three cooperating processes: sender, receiver, and generator, communicating via pipes and signals. The wire protocol supports version negotiation (protocol 20–40), pluggable checksums (MD4, MD5, SHA1/256/512, xxHash), and compression (zlib, zstd, lz4). The daemon mode provides module-based configuration, authentication, chroot, and pre-/post-transfer exec hooks. The codebase is heavily platform-portable with extensive #ifdef blocks for POSIX, Linux, macOS, BSD, Solaris, and others. Key entry points include main.c (client/server dispatch), clientserver.c (daemon startup and protocol handshake), sender.c/receiver.c/generator.c (transfer loop), match.c (delta algorithm with rolling checksum and hash table), and rsync.c (file attribute application). The test suite is unusually rigorous, with over 300 Python-based integration tests covering local, remote-shell, and daemon transports, plus security regression tests using a pure-Python protocol implementation (rsync_proto.py) and instrumented rsync builds. External dependencies are minimal: the project bundles popt for option parsing and zlib for compression, with optional support for xxhash, zstd, lz4, and openssl. Remote transport relies on SSH or rsh. The build system uses autotools with custom wrappers. The project is actively maintained with frequent security patches, CI across multiple platforms (Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris, Cygwin, Android), and a fleet testing framework for cross-version compatibility.
The system is a Home Assistant addon that enables backup creation and synchronization with OneDrive. Built with ASP.NET Core and Blazor Server, it provides a web UI for configuration and monitoring, scheduled backups with retention policies, file synchronization, and exposes Home Assistant sensor entities for status monitoring. The architecture follows a layered design with separate services for backup management, file synchronization, and external API integrations (Home Assistant and Microsoft Graph). Key entry points include Program.cs for application startup and the Orchestrator for coordinating scheduled tasks. Data flows involve creating backups via the Home Assistant API, uploading to OneDrive via GraphHelper, and synchronizing file changes bidirectionally.