For the Resin 4.0 remote deployment, I wanted some key features: incremental updates, transactional updates, reliable replication, manageability, and solid performance. It’s taken several months of toying with alternate architectures until the current design came together. At the core of the deployment architecture is the .git source code repository.
- atomic updates
- consistent file store - no broken updates
- independent - multiple writers and readers avoid seeing partial updates
- durable store to the filesystem (and replicated)
- incremental updates only of changed files
The key insight in the .git design is using a hash to identify versioned files. The hash design solves the transactional problem by treating files as immortal, immutable, written-in-stone documents.