How dhcgn/iot-ephemeral-value-store works
Main Components
a) Core Components:
• HTTP Server Layer (Main Entry Point)
• HTTP Handlers Layer
• Storage Layer
• Domain Layer
• Statistics Tracking
• Middleware Components
b) External Components:
• IoT Devices (Clients)
• Web Browsers (Clients)
• File System (for persistence)
┌─────────────────────────────────────────────────────────────┐
• External Clients │
• ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
• IoT Device │ │ Web Browser │ │ HTTP Client │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┬─────────────┬────────────────┬─────────────┘
• ▼ ▼ ▼
┌─────────────────────────────────────────────────────────────┐
• Middleware Layer │
• ┌──────────┐ ┌───────────┐ ┌────────────────┐ │
• CORS │ │Rate Limit │ │Request Size Limit│ │
• ┘ └───────────┘ └────────────────┘ │
• ┬───────────────────────────────┘
┌──────────────────────────▼──────────────────────────────┐
• HTTP Handler Layer │
• ┌─────────┐ ┌────────┐ ┌───────┐ ┌────────┐ ┌───────┐ │
• Upload │ │Download│ │KeyPair│ │ Delete │ │ Patch │ │
• ┘ └────────┘ └───────┘ └────────┘ └───────┘ │
• ┬──────────────────────────────┘
┌─────────────────────────▼──────────────────────────────┐
• Domain Layer │
• (Business Logic & Data Structures) │
• ┬──────────────────────────────┘
┌─────────────────────────▼──────────────────────────────┐
• Storage Layer │
• ┌────────────────┐ ┌─────────────┐ │
• Ephemeral Store │ │ Stats │ │
• ┘ └─────────────┘ │
• ┬──────────────────────────────┘
┌─────────────────────────▼──────────────────────────────┐
• File System │
• (Persistent Storage) │
• ┘
Important Implementation Details to Highlight
• Key pair generation and verification mechanism
• Data merging for patch operations
• Ephemeral storage duration
• Rate limiting configuration
• Request size limitations
• CORS settings