How isndev/qb works
Main Components
a) Core Runtime Layer:
• Actor Management System
• Event Processing System
• Core Set Manager (for CPU core management)
• Virtual Core Implementation
• Lock-free Communication Channels (MPSC/SPSC queues)
b) Network Layer:
• TCP/UDP Components
• IP Management
• Network Helpers
• Epoll System (for Linux)
c) System Layer:
• Memory Allocator
• CPU Management
• Lock-free Data Structures
• Timestamp Management
┌─────────────────────── Application Layer ───────────────────────┐
• Actor Instances Event Handlers Services │
• Framework Layer ────────────────────────┤
• ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
• Actor Core │ │Event System │ │ Virtual Cores │ │
• ┘ └─────────────┘ └─────────────────┘ │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
• Network Layer│ │ Core Set │ │ Memory System │ │
• ┘ └─────────────┘ └─────────────────┘ │
• System Layer ──────────────────────────────┤
• Lock-free Queues CPU Management Memory Allocators │
• ┘
Key Elements to Highlight
a) Actor Communication:
• Event flow through the system
b) Core Management:
• How actors are distributed across CPU cores
• Relationship between Virtual Cores and physical CPU cores
• CoreSet management structure
c) Memory Management:
• Custom allocator system
• Lock-free data structure locations
• Demonstrate memory flow between components
Specific Implementation Details
• Rectangles for core components
• Circles for actors
• Hexagons for event handlers
• Diamonds for system services
Performance-Critical Paths
Following with bold lines:
• Event propagation paths
• Inter-actor communication channels
• Core-to-core message passing
• Network I/O paths
• Lock-free communication
• CPU cache-friendly design
• Actor isolation and independence
• Event-driven architecture
• Core affinity and scheduling