Building Databases, Queues, Git Systems, and Distributed Applications on S3-Compatible Storage
Introduction
Chapter 1: The Object Storage Primitive
- What Object Storage Is and Is Not
- The S3 API Surface: Objects, Keys, Prefixes, Metadata
- Core Operations: PUT, GET, HEAD, DELETE, LIST, Multipart Upload
- Consistency Guarantees and Their Evolution
- Durability, Availability, and Replication Strategies
- Authentication, Authorization, and Security Primitives
- Object Storage Versus Block File Database and Queue Abstractions
Chapter 2: Designing Around Constraints
- Latency Throughput and Cost Realities
- Immutable Objects and Update Semantics
- Expensive Listing Operations and Namespace Design
- Conditional Writes and Optimistic Concurrency
- Metadata Layers and Indexing Strategies
- Handling Partial Failures and Network Partitions
- The Compute Separation Principle
Chapter 3: S3-Compatible Implementations and Ecosystem
- AWS S3 Architecture and Behavior
- Open Source Implementations: MinIO Ceph RGW
- Cloud Provider Variants: GCS Azure Blob DigitalOcean Spaces
- On-Premise and Air-Gapped Deployments
- API Compatibility Gaps and Gotchas
- Choosing and Evaluating an Implementation
Chapter 4: Content-Addressable Storage and Immutable Data Structures
- Hash-Based Object Identification
- Deduplication and Size Savings
- Object Layout and Key Design
- Implementation: A Content-Addressable Blob Store in Go
- Testing and Verification
- Performance Characteristics and Tuning
Chapter 5: Append-Only Event Logs on Object Storage
- Log Semantics and Ordering Guarantees
- Segment Design and Batching
- Sequence Numbers and Fencing
- Implementation: A Partitioned Event Log in Go
- Compaction and Retention
- Recovery from Partial Writes and Corruption
Chapter 6: Durable Queues and Message Streams on Object Storage
- Queue Semantics and Delivery Guarantees
- Visibility Tokens and Acknowledgement Patterns
- Implementation: A Durable Queue on Object Storage
- Partitioned Streams and Consumer Groups
- Exactly-Once Considerations and Idempotency
- Performance Comparison with Kafka and Traditional Brokers
Chapter 7: Key-Value Stores and Metadata Databases on Object Storage
- Key-Value Semantics on Immutable Objects
- SSTable-Inspired Layout and LSM Concepts
- Indexes and Bloom Filters for Efficient Lookup
- Implementation: A Lightweight KV Store in Go
- Read Path Optimization and Caching Strategies
- Compaction Snapshots and Garbage Collection
Chapter 8: Analytical Data Stores and Query Execution on Object Storage
- Columnar Formats and Parquet on Object Storage
- Partitioning Strategies for Query Performance
- Predicate Pushdown and Filter Semantics
- Implementation: A Simple Analytical Query Engine in Go
- Schema Evolution and Compatibility
- Metadata Catalogs and Table Management
Chapter 9: Git-Compatible Storage Backends on Object Storage
- Git Objects References and the DAG
- Immutable Storage and Deduplication in Git
- Packfiles and Delta Compression
- Designing an S3-Compatible Git Backend
- Ref Consistency and Concurrent Updates
- Implementation: A Git Service with Object Storage Backend
Chapter 10: Distributed Coordination on Object Storage
- Leases and Leader Election Patterns
- Distributed Locking with Conditional Writes
- Fencing Tokens and Session Management
- Configuration Stores and Feature Flags
- When to Use Object Storage Versus Dedicated Coordination Services
- Implementation: A Lease-Based Coordinator in Go
Chapter 11: Performance Engineering at Scale
- Measuring What Matters: RPS Throughput Tail Latency Cost
- Request Batching and Parallel Upload Strategies
- Connection Management and Asynchronous I/O
- Caching Architectures: Memory Local Disk CDN Layers
- Compression Serialization and Object Sizing
- Benchmarking Methodology and Realistic Tests
Chapter 12: Reliability Failure Handling and Recovery
- Taxonomy of Failures in Object Storage Systems
- Idempotent Operations and Safe Retries
- Handling Corrupted Objects and Integrity Verification
- Recovery Procedures for Each Component Type
- Fault Injection and Property-Based Testing
- Disaster Recovery and Multi-Region Architectures
Chapter 13: Security Access Control and Compliance
- Identity and Access Management Patterns
- Temporary Credentials and Workload Identity
- Encryption in Transit and at Rest
- Object Locking and Immutability Controls
- Tenant Isolation in Multi-Tenant Systems
- Security Auditing and Common Misconfigurations
Chapter 14: Observability Operations and Production Deployment
- Structured Logging and Request Tracing
- Metrics SLIs and SLOs for Object Storage Systems
- Capacity Planning and Lifecycle Management
- Backup Restore and Migration Procedures
- Incident Response and Operational Runbooks
Chapter 15: Case Studies from the Field
- Cloud-Native Databases Built on Object Storage
- Open-Source Projects Using S3 as Primary Storage
- Streaming and Queue Systems with Object Backends
- Git Hosting Platforms and Large-Scale Repositories
- Lessons Learned and Common Pitfalls
- What These Architectures Teach Us
Chapter 16: A Production Reference Architecture
- Architecture Overview and Component Interactions
- Storage Layout Across Services
- Implementation: A Multi-Service System in Go
- Deployment Configuration and Infrastructure Setup
- Operational Procedures and Monitoring
- Scaling Upgrading and Evolving the System