How 648540858/wvp-gb28181-pro works
Main Components
• Frontend Web UI: Represented by the “web_src” folder. This layer is responsible for providing the user interface (web pages, dashboards, and interactive components such as live view, playback, and device configuration).
– GB28181 protocol implementation (handling SIP signaling, device registration, heartbeat, command control, etc.)
– Other protocol support (such as JT1078 for video and custom handlers)
– Media and streaming logic (integrating with ZLMediaKit for transmission, recording, and real‑time streaming)
– Security, API endpoints, and Redis-based messaging (note the “conf/security” and “conf/redis” packages)
– Data persistence via relational databases (MySQL, PostgreSQL, KingBase) as reflected by the numerous database scripts and DAO layers in “storager”
– Session management and event bus/message listeners for push notifications and command responses.
• Media/Streaming Server Integration: Although the actual media server is provided by ZLMediaKit (an external dependency integrated via REST hooks and configuration), include a dedicated “Media Server” component that interacts with the backend (using RESTful APIs, event hooks, etc.). Indicate that the backend can also deploy its own media nodes for load balancing.
• Third-party Libraries/Dependencies: Optionally add smaller components for JDBC libraries (in “libs”) and external front‑end components such as the Jessibuca player and MediaServerUI.
Relationships and Interactions
• The backend communicates with the Media Server (and may automatically configure and manage it, as mentioned) for media processing and stream distribution.
• The Frontend (web client) consumes RESTful APIs (and may also use WebSockets for live stream notifications) provided by the backend.
• Internal messaging: Show interactions with Redis, which is used both for caching and for RPC-style messaging between components (as seen in the “conf/redis” and “service/redisMsg” packages).
Architectural Patterns and Principles
• Modular design with clear separation between protocol handling (GB28181, JT1078), business service logic, media processing, and user interface.
• Use a layered (or MVC-like) structure for the backend: presentation (API/web controllers), business service layer, data access layer (DAO and storager).
• Use of asynchronous event handling and messaging (e.g., the event, task, session, and transmit packages) which are critical for handling real‑time video, SIP sessions, and server push notifications.
• Support for containerized deployment via Docker and the multi‑architecture (x86 and ARM) support.