Why we chose a plugin architecture for device integration
IP cameras do not speak one language. ONVIF, VAPIX, and ISAPI are each different, so we separated image acquisition from analysis. Adding a new brand no longer touches the core.
When we started integrating cameras for the SOAI monitoring system, we ran into an inconvenient fact immediately: every camera vendor has its own protocol. Open-standard IP cameras use ONVIF Profile S and RTSP. Axis uses VAPIX alongside ONVIF. Hikvision uses ISAPI and its own SDK. There is no single API that talks to every camera in existence, and there never will be.
If device-reading logic for each brand were mixed into the AI analysis logic, every new vendor added would mean touching the core, risking breakage of something already running reliably just to add something new. So we built two separate abstraction layers: `DeviceProvider`, whose only job is to fetch images or video from a device regardless of the protocol underneath, and `AnalysisEngine`, whose only job is to analyze a frame or a video without caring where it came from.
The practical result: adding support for a new camera line means writing a new `DeviceProvider` plugin that follows the defined interface, leaving the analysis engine and the already-accepted modules untouched (SKU counting, packing video analysis, live view, and so on). Likewise, adding a new AI check means writing a new `AnalysisEngine`, and the device layer stays untouched.
This is also why we can pursue technical partnership conversations with Axis and Hikvision without rewriting the system. Even though each vendor has a different SDK and documentation, we only need one plugin conforming to the same interface contract.