refactor: Rename Leaf to DeltaSpace for semantic clarity

- Renamed Leaf class to DeltaSpace throughout the codebase
- Updated all imports, method signatures, and variable names
- Updated documentation and comments to reflect the new naming
- DeltaSpace better represents a container for delta-compressed files

The term "DeltaSpace" is more semantically accurate than "Leaf" as it
represents a space/container for managing related files with delta
compression, not a terminal node in a tree structure.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Simone Scarduzio
2025-09-23 08:05:20 +02:00
parent 0613de9a5e
commit fb3ad0e076
14 changed files with 112 additions and 102 deletions

View File

@@ -113,10 +113,10 @@ src/deltaglider/
### Core Concepts
1. **Leaf**: A prefix in S3 where related files are stored. Contains a `reference.bin` file that serves as the base for delta compression.
1. **DeltaSpace**: A prefix in S3 where related files are stored for delta compression. Contains a `reference.bin` file that serves as the base for delta compression.
2. **Delta Compression Flow**:
- First file uploaded to a Leaf becomes the reference (stored as `reference.bin`)
- First file uploaded to a DeltaSpace becomes the reference (stored as `reference.bin`)
- Subsequent files are compared against the reference using xdelta3
- Only the differences (delta) are stored with `.delta` suffix
- Metadata in S3 tags preserves original file info and delta relationships
@@ -199,7 +199,7 @@ Core delta logic is in `src/deltaglider/core/service.py`:
4. **Atomic Operations**: All S3 operations are atomic - no partial states are left if operations fail.
5. **Reference File Updates**: Currently, the first file uploaded to a Leaf becomes the permanent reference. Future versions may implement reference rotation.
5. **Reference File Updates**: Currently, the first file uploaded to a DeltaSpace becomes the permanent reference. Future versions may implement reference rotation.
## Performance Considerations