hanzoai/s3 was an AGPL-3.0 MinIO fork whose network-copyleft blocks embedding
and reselling as a managed service. Replace it wholesale with a fork of
SeaweedFS (github.com/seaweedfs/seaweedfs, Apache-2.0, Go) which ships a
built-in S3 gateway + Filer.
- License: AGPL-3.0 -> Apache-2.0 (upstream LICENSE kept verbatim, incl.
"Copyright 2025 Chris Lu"); NOTICE added crediting SeaweedFS. No AGPL/BUSL/
SSPL/GPL or enterprise ("ee") files remain.
- Module: go.mod path set to github.com/hanzoai/s3 with a self-replace
(replace github.com/seaweedfs/seaweedfs => ./) so the ~1800 internal Go files
keep their upstream import paths with zero churn. Internal identifiers and
import paths are intentionally NOT renamed.
- CLI rebrand: the binary is built as `s3` (was `weed`); root usage, per-command
help/usage/flag strings, shell autocomplete program name, and the product name
in CLI output now read "Hanzo S3" / `s3`. Users never see `weed`.
(e.g. `s3 server`, `s3 filer`, `s3 master`, `s3 volume`, `s3 s3`, `s3 mount`.)
- Build: `make` (or `go build -o s3 ./weed`) builds the `s3` binary green;
`cmd/weed-db` and `cmd/weed-sql` also build; `go vet ./weed/command/` clean.
- README/LLM.md rewritten for Hanzo S3; AGENTS.md/CLAUDE.md symlinks preserved.
- Dropped a 33MB prebuilt Mach-O `stress` binary upstream had committed; `.gitignore`
updated to ignore the `s3` build output.
8.9 KiB
SeaweedFS RDMA Sidecar - Future Work TODO
π― Current Status (β COMPLETED)
Phase 1: Architecture & Integration - DONE
- β Complete Go β Rust IPC Pipeline: Unix sockets + MessagePack
- β SeaweedFS Integration: Mount client with RDMA acceleration
- β Docker Orchestration: Multi-service setup with proper networking
- β Error Handling: Robust fallback and recovery mechanisms
- β Performance Optimizations: Zero-copy page cache + connection pooling
- β Code Quality: All GitHub PR review comments addressed
- β Testing Framework: Integration tests and benchmarking tools
Phase 2: Mock Implementation - DONE
- β Mock RDMA Engine: Complete Rust implementation for development
- β Pattern Data Generation: Predictable test data for validation
- β Simulated Performance: Realistic latency and throughput modeling
- β Development Environment: Full testing without hardware requirements
π PHASE 3: REAL RDMA IMPLEMENTATION
3.1 Hardware Abstraction Layer π΄ HIGH PRIORITY
Replace Mock RDMA Context
File: rdma-engine/src/rdma.rs
Current:
RdmaContextImpl::Mock(MockRdmaContext::new(config).await?)
TODO:
// Enable UCX feature and implement
RdmaContextImpl::Ucx(UcxRdmaContext::new(config).await?)
Tasks:
- Implement
UcxRdmaContextstruct - Add UCX FFI bindings for Rust
- Handle UCX initialization and cleanup
- Add feature flag:
real-ucxvsmock
Real Memory Management
File: rdma-engine/src/rdma.rs lines 245-270
Current: Fake memory regions in vector
TODO:
- Integrate with UCX memory registration APIs
- Implement HugePage support for large transfers
- Add memory region caching for performance
- Handle registration/deregistration errors
Actual RDMA Operations
File: rdma-engine/src/rdma.rs lines 273-335
Current: Pattern data + artificial latency
TODO:
- Replace
post_read()with real UCX RDMA operations - Implement
post_write()with actual memory transfers - Add completion polling from hardware queues
- Handle partial transfers and retries
3.2 Data Path Replacement π‘ MEDIUM PRIORITY
Real Data Transfer
File: pkg/rdma/client.go lines 420-442
Current:
// MOCK: Pattern generation
mockData[i] = byte(i % 256)
TODO:
// Get actual data from RDMA buffer
realData := getRdmaBufferContents(startResp.LocalAddr, startResp.TransferSize)
validateDataIntegrity(realData, completeResp.ServerCrc)
Tasks:
- Remove mock data generation
- Access actual RDMA transferred data
- Implement CRC validation:
completeResp.ServerCrc - Add data integrity error handling
Hardware Device Detection
File: rdma-engine/src/rdma.rs lines 222-233
Current: Hardcoded Mellanox device info
TODO:
- Enumerate real RDMA devices using UCX
- Query actual device capabilities
- Handle multiple device scenarios
- Add device selection logic
3.3 Performance Optimization π’ LOW PRIORITY
Memory Registration Caching
TODO:
- Implement MR (Memory Region) cache
- Add LRU eviction for memory pressure
- Optimize for frequently accessed regions
- Monitor cache hit rates
Advanced RDMA Features
TODO:
- Implement RDMA Write operations
- Add Immediate Data support
- Implement RDMA Write with Immediate
- Add Atomic operations (if needed)
Multi-Transport Support
TODO:
- Leverage UCX's automatic transport selection
- Add InfiniBand support
- Add RoCE (RDMA over Converged Ethernet) support
- Implement TCP fallback via UCX
π§ PHASE 4: PRODUCTION HARDENING
4.1 Error Handling & Recovery
- Add RDMA-specific error codes
- Implement connection recovery
- Add retry logic for transient failures
- Handle device hot-plug scenarios
4.2 Monitoring & Observability
- Add RDMA-specific metrics (bandwidth, latency, errors)
- Implement tracing for RDMA operations
- Add health checks for RDMA devices
- Create performance dashboards
4.3 Configuration & Tuning
- Add RDMA-specific configuration options
- Implement auto-tuning based on workload
- Add support for multiple RDMA ports
- Create deployment guides for different hardware
π IMMEDIATE NEXT STEPS
Step 1: UCX Integration Setup
-
Add UCX dependencies to Rust:
[dependencies] ucx-sys = "0.1" # UCX FFI bindings -
Create UCX wrapper module:
touch rdma-engine/src/ucx.rs -
Implement basic UCX context:
pub struct UcxRdmaContext { context: *mut ucx_sys::ucp_context_h, worker: *mut ucx_sys::ucp_worker_h, }
Step 2: Development Environment
-
Install UCX library:
# Ubuntu/Debian sudo apt-get install libucx-dev # CentOS/RHEL sudo yum install ucx-devel -
Update Cargo.toml features:
[features] default = ["mock"] mock = [] real-ucx = ["ucx-sys"]
Step 3: Testing Strategy
- Add hardware detection tests
- Create UCX initialization tests
- Implement gradual feature migration
- Maintain mock fallback for CI/CD
ποΈ ARCHITECTURE NOTES
Current Working Components
- β Go Sidecar: Production-ready HTTP API
- β IPC Layer: Robust Unix socket + MessagePack
- β SeaweedFS Integration: Complete mount client integration
- β Docker Setup: Multi-service orchestration
- β Error Handling: Comprehensive fallback mechanisms
Mock vs Real Boundary
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β SeaweedFS ββββββΆβ Go Sidecar ββββββΆβ Rust Engine β
β (REAL) β β (REAL) β β (MOCK) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β RDMA Hardware β
β (TO IMPLEMENT) β
βββββββββββββββββββ
Performance Expectations
- Current Mock: ~403 ops/sec, 2.48ms latency
- Target Real: ~4000 ops/sec, 250ΞΌs latency (UCX optimized)
- Bandwidth Goal: 25-100 Gbps (depending on hardware)
π REFERENCE MATERIALS
UCX Documentation
- GitHub: https://github.com/openucx/ucx
- API Reference: https://openucx.readthedocs.io/
- Rust Bindings: https://crates.io/crates/ucx-sys
RDMA Programming
- InfiniBand Architecture: Volume 1 Specification
- RoCE Standards: IBTA Annex A17
- Performance Tuning: UCX Performance Guide
SeaweedFS Integration
- File ID Format:
weed/storage/needle/file_id.go - Volume Server:
weed/server/volume_server_handlers_read.go - Mount Client:
weed/mount/filehandle_read.go
β οΈ IMPORTANT NOTES
Breaking Changes to Avoid
- Keep IPC Protocol Stable: Don't change MessagePack format
- Maintain HTTP API: Existing endpoints must remain compatible
- Preserve Configuration: Environment variables should work unchanged
Testing Requirements
- Hardware Tests: Require actual RDMA NICs
- CI/CD Compatibility: Must fallback to mock for automated testing
- Performance Benchmarks: Compare mock vs real performance
Security Considerations
- Memory Protection: Ensure RDMA regions are properly isolated
- Access Control: Validate remote memory access permissions
- Data Validation: Always verify CRC checksums
π― SUCCESS CRITERIA
Phase 3 Complete When:
- Real RDMA data transfers working
- Hardware device detection functional
- Performance exceeds mock implementation
- All integration tests passing with real hardware
Phase 4 Complete When:
- Production deployment successful
- Monitoring and alerting operational
- Performance targets achieved
- Error handling validated under load
π
Last Updated: December 2024
π€ Contact: Resume from seaweedfs-rdma-sidecar/ directory
π·οΈ Version: v1.0 (Mock Implementation Complete)
π Ready to resume: All infrastructure is in place, just need to replace the mock RDMA layer with UCX integration!