How migorithm/duva works
Main Components
a) Core Services Layer:
• Client Service
• Cluster Service
• Config Service
• Statefuls Service (Cache and Persistence)
b) Actor System:
• Cache Actors
• TTL Actors
• Listening Actors
• Replication Actors
c) Protocol Layer:
• RESP Protocol Handler
• Stream Management
d) Storage Components:
• In-memory Cache
• Persistence (RDB file storage)
• AOF (Append Only File)
┌─ Client Layer ─────────────────────────┐
• RESP Protocol │ Client Connections │
• Service Layer ──────────────────────────────────────┐
• Client Service │ Cluster Service │ Config Service │
• Actor System ───────────────────────────────────────┐
• Cache Actors │ TTL Actors │ Listening │ Replication │
• Storage Layer ─────────────────────────────────────┐
• In-Memory Cache │ RDB Storage │ AOF Storage │
• ┘
Additional Elements
• Client request flow (as shown in client_query.mmd)
• Clustering mechanism (as shown in clustering.mmd)
• Election process (for Raft consensus)
Implementation Details
• src/services/client: Client handling
• src/services/cluster: Clustering functionality
• src/services/statefuls: State management
• src/adapters: I/O and cancellation handling
Key Processes to Highlight
• SET/GET operations flow
• TTL management
• Cluster formation and maintenance
• Data persistence operations
• Peer discovery and heartbeat mechanism