How codevector/blynk-server works
• Mobile Clients (Blynk mobile apps on iOS/Android)
• End-users using a web-based Administration UI (accessed via HTTPS)
• Hardware Devices (Arduino, Raspberry Pi, ESP8266, etc.)
2. Inside the system, clearly separate the application’s “layers” or modules based on the directory structure:
• Client Module
– Although the “client” directory (with its own pom.xml and source code) is present, it likely contains client utilities used by the mobile app or for testing the protocol. If it becomes part of integration testing then you may represent it as a client‐SDK block.
• Core Server and Protocol Handler Modules (located in “server/core”)
– This is the heart of message management. Represent components for:
• Netty pipelines (encoders, decoders, and protocol message handlers)
• Session management (state holders, token management, and user profile processing)
• DAO/Database access (for storing user data, dashboards, raw data, etc.)
• Reporting components (aggregation, raw data processing, CSV generators)
• TCP & SSL Layers
– Display separate blocks (or processes) for the different “server” modules:
• “tcp-app-server” (for mobile application connections)
• “tcp-hardware-server” (for hardware device connections, including SSL and non‑SSL handling)
• HTTP/S Components
– “http-api” and “http-core” modules that expose RESTful endpoints. These serve requests from mobile browsers or for server-to-server communication.
– “http-admin” for the web-based administration user interface (with static assets, handlers, and logic for IP filtering and admin authentication).
• Notification Modules
• Launcher and Tools
– “server/launcher”: this module ties together all the components and starts the worker threads, sets up the pipelines and signals the service to bootstrap.
– “server/tools” and “server/utils”: group these as supporting libraries that provide helper functions (logging, token generators, file utilities, etc.).
• Integration Tests
Relationships, dependencies, and data flow
• That the Core Server modules (messaging, authentication, session management, widget handling, etc.) interact with the Database (and optionally PostgreSQL when raw data storage is enabled) using DAOs.
• In parallel, show that the HTTP/S modules (REST API and admin UI) allow external systems or user administrators to query or change data.
• Separate flows from the core to the Notification Modules. For example, when a push or email is triggered by user action or system alerts, the core “invokes” a notification process which then may use external SMTP, SMS gateway (e.g., Nexmo), or other providers.
• Optionally, annotate that the file tree is built with Maven (pom.xml exists in each module) and therefore the build is modular.
Major technical design principles
• Modularity: Clearly show how the “server” project is broken into separate modules (core, tcp-app, tcp-hardware, http, launcher, notifications, tools, etc.) which are built and integrated together.
• Non-blocking IO: Emphasize that Netty is used to handle asynchronous and non‑blocking network I/O.
• Integration and Testing: Note that there is an “integration-tests” component which validates the protocol across hardware, mobile app, and HTTP components.