SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
Loading...
Searching...
No Matches
SmartSpectra OnPrem Architecture

This document explains the current architecture and confusing component/endpoint naming, its historical motivation, and (somewhat) the intended future restructuring plans.

The entire Physiology OnPrem system consists of three major components: Core, Edge, and Physiology Server. Core and Edge are always interconnected. Physiology Server, i.e., the physiology_server binary, wraps both Edge and Core these into a single executable: it provides a gRPC API to control them and access their outputs.

Core

Core is everything that runs on the remote server, made available via a REST API. This used to contain the bulk of the signal analysis needed to produce vitals, and is still the only source of pulse data. The Core service is required for Edge application graph to be able to run.

gRPC Core Server

gRPC Core Server, or grpc_core_server.py, replaces REST web server in the OnPrem solution, making Core available to Edge via a direct gRPC link. We provide it separately for installation, although there are plans to integrate it into the Core wheel in the future, so that the user does not need to worry about its relative path to physiology_server.

In the OnPrem gRPC API, StartCore and StopCore endpoints are provided to start and stop the gRPC Core server, respectively.

Edge

Physiology Edge holds everything in Physiology that runs on-device in the standard (not on-prem) layout of the system. StartEdgeGraph and StopEdgeGraph endpoints provide the Edge functionality via the SmartSpectra C++ SDK.

Preprocessing

Preprocessing is the component of Edge which provides inputs to Core and on-edge metrics computation (i.e. "Edge Metrics").

NOTE: the deprecated API endpoints of Physiology Server named StartPreprocessing and StopPreprocessing are used to start and stop the entirety of the Edge application, for historical and backwards-compatibility reasons.

Edge Metrics

These are newer components within the system which perform the complete analysis of preprocessed data directly on the device. Edge already provides the real-time upper/chest breathing signals, handles the bulk of the blood pressure signal computation, and will soon provide micromotion signals.

Physiology Server

The physiology_server executable is its own gRPC server written in C++, which uses SmartSpectra C++ SDK to wrap around Physiology Edge.

Upon calls to its endpoints, it starts up the Core gRPC server as a separate Python process and starts Physiology Edge / preprocessing directly via the C++ SDK.

Edge/preprocessing, in turn, links up with Core via a separate gRPC link for the metrics that it requires from Core.