How rivet-gg/rivet works
Main Components
a. Core Infrastructure Layer:
• FoundationDB (Actor state storage)
• CockroachDB (OLTP database)
• ClickHouse (Monitoring/analytics)
• NATS (Pub/sub messaging)
• Valkey (Caching layer)
b. Runtime Layer:
• V8 & Deno (Actor isolate runtime)
• Container Runtime (For non-isolate workloads)
c. Networking Layer:
• Traefik (Load balancing & tunneling)
• Edge Network Components
• Game Guard (TCP/UDP handling)
d. Service Layer:
• Actor Service
• Authentication Service
• Matchmaker Service
• CDN Service
• Analytics Service
• Job Service
Component Relationships
Key interactions:
a. Data Flow:
• Client → Edge Network → Actor Runtime
• Actor Runtime ↔ FoundationDB (state)
• Services ↔ CockroachDB (operational data)
• Monitoring Data → ClickHouse
b. Control Flow:
• Actor Creation/Scheduling
• RPC Routing
• Event Distribution
• State Management
Regional Distribution
Illustrate:
• Global Edge Locations
• Regional Actor Distribution
• Data Locality Zones
Design Elements
Use these visual elements:
• Blue: Core Infrastructure
• Green: Runtime Components
• Orange: Networking Layer
• Purple: Service Layer
• Gray: External Systems
• Rectangles: Services
• Hexagons: Actor Instances
• Clouds: Network Components
c. Lines:
• Solid: Synchronous Communication
Create multiple layers showing
• Infrastructure Layer (bottom)
• Service Layer (middle)
• Client/Edge Layer (top)
Subsystems
• Actor Management
• State Management
• Event Distribution
• Authentication & Authorization
• Monitoring & Logging
Scaling components
• Load Balancers
• Actor Distribution
• State Replication