Commit Graph

2 Commits

Author SHA1 Message Date
c9b430fc0d Implement gossip protocol and cluster synchronization
Features added:
- Gossip protocol for member discovery and failure detection
- Random peer selection with 1-3 peers per round (1-2 minute intervals)
- Member health tracking (5-minute timeout, 10-minute cleanup)
- Regular 5-minute data synchronization between peers
- Gradual bootstrapping for new nodes joining cluster
- Background sync routines with proper context cancellation
- Conflict detection for timestamp collisions (resolution pending)
- Full peer-to-peer communication via HTTP endpoints
- Automatic stale member cleanup and failure detection

Endpoints added:
- POST /members/gossip - for peer member list exchange

The cluster now supports:
- Decentralized membership management
- Automatic node discovery through gossip
- Data replication with eventual consistency
- Bootstrap process via seed nodes
- Operational mode transitions (syncing -> normal)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 07:27:52 +03:00
83ad9eea8c Initial KVS implementation with core functionality
- Go module setup with BadgerDB, Gorilla Mux, Logrus, UUID, and YAML
- Core data structures for distributed key-value store
- HTTP REST API with /kv/ endpoints (GET, PUT, DELETE)
- Member management endpoints (/members/)
- Timestamp indexing for efficient time-based queries
- YAML configuration with auto-generation
- Structured JSON logging with configurable levels
- Operational modes (normal, read-only, syncing)
- Basic health check endpoint
- Graceful shutdown handling

Tested basic functionality - all core endpoints working correctly.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 07:20:12 +03:00