How buraksezer/olric works
Main Components
a) Core Services Layer:
• DMap Service (distributed map implementation)
• PubSub Service (publish/subscribe messaging)
• Storage Engine (in-memory storage with GC-friendly design)
• Lock Service (distributed locking mechanism)
b) Cluster Management Layer:
• Membership Management (using hashicorp/memberlist)
• Partition Management
• Rebalancer Component
• Routing Table Management
c) Network Layer:
• Redis Protocol Server
• Member Communication Server
• Client Interface
Key Relationships
a) Data Flow:
• Client requests → Redis Protocol Server → DMap/PubSub Services
• Inter-node communication paths
• Replication flows between primary and backup nodes
b) Control Flow:
• Cluster membership changes
• Partition rebalancing operations
• Lock acquisition/release paths
Architectural Patterns to Highlight
• Primary-Backup Replication Model
• Consistent Hashing for Partition Distribution
• Optimistic Replication Strategy
• Read-Repair Mechanism
Key Elements to Label
• Partition IDs
• Primary/Backup relationships
• Protocol endpoints
• Service discovery interfaces
• Eviction policy handlers
Technical Details
• TCP ports (3320 for client, 3322 for memberlist)
• Partition count
• Replication factors
• Quorum configurations
Deployment Scenarios
• Embedded mode deployment
• Client-server mode deployment
• Multi-node cluster configuration
• Partition distribution
• Data replication
• Failure detection
• Split-brain protection
• Read/Write quorum implementation
This system design should reflect Olric's architecture as a distributed, in-memory key/value store with strong focus on scalability and availability while maintaining eventual consistency guarantees.