How simplex-chat/simplexmq works
Main Components Structure
a. Client Layer:
• SMP Client Library
• SMP Agent
• Applications (e.g., SimpleX Chat)
• Remote Control Components
b. Server Layer:
• SMP Server
• XFTP Server
• Notification Server
c. Infrastructure Layer:
• Message Store
• Queue Store
• Transport Layer (TLS/WebSocket)
• File System Storage
Core Components Relationships
a. Transport Protocols:
• HTTP/2 and WebSocket connections between clients and servers
• TLS encryption layer
• TCP port 5223 for SMP server
• TCP port 443 for XFTP server
b. Queue Management:
• Unidirectional message queues
• Queue rotation mechanisms
• Store log persistence
• Message delivery paths
Security Components
Security features:
• Certificate Authority chain
• TLS handshake process
• Server fingerprint verification
• Optional password protection
• Encryption layers
Specific Implementation Details
Specialized components:
• STM (Software Transactional Memory) queues
• Journal-based persistence
• In-memory message storage
• Queue rotation mechanism
• Push notification system
Component Interactions
Specific flows:
• Message creation and delivery
• Queue initialization
• File transfer operations
• Push notification delivery
• Agent-server communication
Technical Details
Annotations for:
• Protocol versions
• Port numbers
• Storage paths
• Configuration locations
• Certificate locations
Storage and persistence mechanisms
This system design should reflect the project's focus on privacy, security, and reliable message delivery while showing the clear separation of concerns between different components of the system.