Breadcrumbs

Analytics module: architecture and functionality

1.1 (1) (1).png
Architecture of the Analytics module

The key components of the Analytics module architecture and their functionality are listed below:

Analytics Orchestrator

Analytics Orchestrator – a software module that routes tasks and video streams from the VSaaS platform to workers. It is composed of two parts: a server component and a client component.

The server-side component performs the following functions:

  • Processing incoming video stream requests from the platform.

  • Distributing video streams among analytics workers

  • Managing video streams.

  • Vectorizing images and storing vectors in the Tarantool vector database.

On the client side, the component collects server resource usage data and manages worker lifecycle, including starting and stopping.

Main processes of the Orchestrator:

  • Handling and routing video streams to Analytics workers.

  • Updating a previously launched video stream on the Analytics worker.

  • Removing a previously launched video stream from the Analytics worker.

  • Redistributing streams in case of worker failure or insufficient resources.

  • Processing images received from the platform.

  • Processing server load statistics obtained from Analytics workers.

  • Enriching analytics events, storing them in ClickHouse, and providing these data to the client component.

Analytics Worker

Analytics worker is a service that receives and processes audio and video streams, followed by the generation of analytics events. It is an Analytics component that handles requests for audio and video stream processing, sends analytics events, manages analytics processes, and provides these processes with the necessary resources, including an interface for interaction with AI models.

An Analytics worker is a combination of the model server and client applications (preprocessors). Preprocessors perform the following functions:

  • Capture and process video streams.

  • Prepare artifacts for neural network processing.

  • Interact with the model server using artifacts and events that define processing parameters.

  • Receive result events from the model server

1.2 (1).png
Interaction of Orchestrator and Worker

Vectorizator

Vectorizator is an Analytics component that converts object images into vector representations via a service API. The generated vectors are stored and processed in the Tarantool vector database and the Orchestrator’s MySQL database, and then further processed by the Matcher.

Push server/Broker

Push Server/Broker is a component in the Analytics architecture that acts as a message broker. Its main task is to ensure reliable and efficient communication between the Orchestrator and the Analytics workers.

Interaction process of the Analytics worker with the Push server:

  1. Analytics Worker startup process:

  • The worker registers with the Orchestrator. In the Orchestrator, a worker entity is created and assigned a unique UID.

  • The worker registers a public channel on the Push server. The name of this channel is generated according to a unified template: analytics_type.UID. For example, a channel for the face recognition service may be named face-recognition.5141239e-faaa-11eb-ac62-1e00da0e0552.

  1. Video stream transmission: once registration is complete, the Orchestrator can use the Push server API to deliver video streams to Analytics workers.

  2. As a result, the Analytics worker connects to the stats и raw-events channels.

  • stats channel: through this channel, the worker transmits statistics on resource consumption and the status of the video streams it is processing.

  • raw‑events channel: this channel is used by the Analytics worker to send the generated events.

Matcher

Matcher is a component in the Analytics module that serves as a data processor and intermediary. It receives raw events via the raw‑events channel from Analytics workers through the Push server. In this way, the Matcher is a key node in the architecture, providing centralized collection of the results of primary data processing.

The core functions of the Matcher are:

  • Data matching. Upon receiving events related to Face or License plate recognition, the Matcher compares them against reference samples stored in the Tarantool database. It then computes a confidence score or match accuracy, which is essential for assessing recognition quality.

  • Event enrichment. The Matcher is responsible for enriching events with additional data. This applies to all events without exception, not only those related to recognition. The process may include adding metadata, location information, timestamps, or other parameters that make the event more informative and useful for further analysis.

  • Data transformation and forwarding. Once an event is processed and enriched, the Matcher converts it into a new format and forwards it to the events channel, where it is collected by the VSaaS platform and the events-collectorcomponent.

Events Collector event storage database

The Events Collector handles events from the Push server’s events channel and loads them into ClickHouse. ClickHouse serves as the event repository and ensures data availability for the VSaaS platform. Events are immutable and stored in batches. For more information, see the ClickHouse documentation.