You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides context for AI coding assistants (Claude Code, GitHub Copilot, Cursor, Cline, Aider, etc.)
⚠️ Critical Rules (Read First)
1. DO NOT edit generated files in target/
2. DO NOT delete backward-compatible code without discussion
3. DO NOT add new dependencies without review
4. DO NOT swallow exceptions silently
5. DO NOT create threads directly - use thread pools
6. DO NOT hardcode sensitive data
7. DO NOT skip tests with @Ignore without explanation
Project Overview
SOFARegistry is a production-grade service registry for microservices, developed by Ant Group. It features:
AP architecture with millisecond-level push notifications
Multi-tier architecture for horizontal scalability
Support for massive connections and large-scale datasets
┌─────────────────────────────────────────────────────────┐
│ Clients │
└─────────────────────┬───────────────────────────────────┘
│ SOFABolt
┌─────────────────────▼───────────────────────────────────┐
│ Session Server │
│ (Client connections, Pub/Sub routing) │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ Data Server │
│ (Data storage, Slot-based sharding) │
└─────────────────────┬───────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────┐
│ Meta Server │
│ (Cluster coordination, Leader election) │
└─────────────────────────────────────────────────────────┘
Development Commands
# Build (skip tests)
mvn clean install -DskipTests
# Run unit tests
mvn test# Run integration tests
mvn verify -Pintegration-test
# Run single test class
mvn test -Dtest=ClassName
# Generate protobuf
make proto
# Build Docker image
make image_build