How z-hub/z-push works
Main Components Identification
The system should be represented with these key components:
a) Core Components:
• ActiveSync Protocol Handler (src/lib/core)
• Request Processor (src/lib/request)
• WBXML Parser/Encoder (src/lib/wbxml)
• State Management System (src/lib/core/statemanager.php)
• Device Management (src/lib/core/devicemanager.php)
b) Backend Systems:
Multiple backend implementations including:
• Kopano
• IMAP
• CalDAV
• CardDAV
• LDAP
• Combined
• SQL State Machine
c) Interface Layer:
• IBackend
• IChanges
• IExportChanges
• IImportChanges
• IStateManager
┌─────────────────────────────────────────────┐
• Client Devices │
• (Mobile Phones, Tablets, Outlook) │
• ┘
• ↕ ActiveSync
┌─────────────────────────────────────────────┐
• Web Server Layer │
• (Apache/Nginx/Lighttpd) │
• ┘
• ↕ PHP
┌─────────────────────────────────────────────┐
• Z-Push Core Layer │
• ┤
• Request Processor │
• WBXML Handler │
• State Management │
• Device Management │
• ┘
• ↕ Backend Interfaces
┌─────────────────────────────────────────────┐
• Backend Connectors │
• ┬───────────┬──────────┬─────────┤
• Kopano │ IMAP │ CalDAV │ CardDAV │
• ┴───────────┴──────────┴─────────┘
• ↕
┌─────────────────────────────────────────────┐
• Storage Systems │
• (Email Servers, Calendar, Contacts, etc.) │
• ┘
Important Details
a) Protocol Handling:
• ActiveSync protocol handling at the top level
• WBXML encoding/decoding process
• Request/response flow
b) Backend Integration:
• Demonstrate the plugin architecture for backends
• How different backends can be used simultaneously
• State management flow
c) IPC and State Management:
• Different state storage options (File/SQL/Memory)
• Inter-process communication mechanisms
• Caching systems
Implementation Details
• The modular backend system
• The request processing pipeline
• State management across different storage options
• Device provisioning and management
• Synchronization mechanisms
Optimization Notes
• Use consistent naming with the codebase
• Version information
• Notes about deployment configurations
This system design should be created using a professional diagramming tool that supports:
• Layered architecture representation
• Export to common formats (PNG, SVG, PDF)
• Easy updates and modifications