Microservices

Microservices

STANAG On Demand Server comprises the following microservices:

Reverse proxy

service name: nginx-reverse-proxy

A reverse proxy is a server that sits between a client and a web server, forwarding client requests to the web server and returning the server's response to the client. One of the main benefits of using a reverse proxy is that it can hide the underlying server's identity and details, providing an extra layer of security. This can help prevent attackers from directly accessing the server and attempting to exploit vulnerabilities. In addition, a reverse proxy can improve performance by caching frequently requested content, serving as a load balancer to distribute traffic across multiple servers, and performing SSL/TLS termination to offload cryptographic processing from the server. Overall, a reverse proxy is a powerful tool that can enhance the security, performance, and scalability of web applications, making it a valuable addition to any network infrastructure.

MQTT broker

service name: broker

MQTT broker for interservices communication. In a system with microservices, the MQTT broker plays a crucial role in enabling communication between different components. The MQTT protocol is a lightweight, publish-subscribe messaging protocol that is ideal for use in a distributed system. The broker acts as an intermediary between different microservices, allowing them to publish and subscribe to messages that contain important data and information. The publisher microservice sends messages to the broker, which then delivers them to the appropriate subscribers based on the topic of the message. This enables the microservices to communicate with each other in real-time, even when they are running on different servers or in different locations. Overall, the MQTT broker helps ensure that the different components of the system are connected and can communicate with each other efficiently, which is essential for the overall functionality and success of the system.

StServer

service name: stserver

STANAG On Demand Server backend.
This service is responsible for all the backend operations. It also hosts and serves the frontend. If no dedicated video server is available, it will also serve the video.

NOSQL DB

service name: mongodb

MongoDB is a popular document-oriented NoSQL database that provides a flexible and scalable solution for handling structured and semi-structured data. Unlike traditional SQL databases, MongoDB stores data in flexible, JSON-like documents that can have varying fields and structures, making it a great choice for handling complex and dynamic data models. MongoDB also provides powerful querying and indexing capabilities, enabling developers to easily retrieve and manipulate data using a simple yet powerful query language. In addition, MongoDB has excellent support for scaling out horizontally, allowing developers to easily distribute data across multiple servers and handle high levels of traffic and data volume. Overall, MongoDB is a highly flexible, scalable, and versatile database solution that can be used in a wide range of applications and industries. STANAG On Demand Server uses MongoDB as its backend DB.

StSupervisor

service name: stsupervisor

Live streams supervisor, UDP to websocket Live stream recaster. The StSupervisor microservice is an important component of a system that is used for monitoring and managing STANAG 4609 multicast video streams. It is responsible for detecting stream parameters, generating live video previews, and reporting events such as Timeout, Bitrate, Stream errors, as well as Klv metadata processing.This microservice communicates with other system microservices using MQTT messages. One of the key features of the StSupervisor microservice is its ability to generate live video previews. This feature allows operators to view the multicast video streams in real-time, making it easier to detect any issues or problems that may arise. Additionally, the microservice is able to detect stream parameters, such as bitrate and Klv rate, which can be used to optimize the performance of the system. In the event that an issue is detected with a multicast video stream, the StSupervisor microservice is able to report the issue to other microservices in the system. This reporting allows the system to quickly respond to any issues, minimizing downtime and ensuring that the system is able to operate at peak efficiency.

WebRtc streamerr

service name: webrtc-streamer

The WebRTC Streamer microservice is responsible for receiving MPEG-TS video streams over multicast UDP and sending them out over WebRTC, either as a h264 passthrough payload or transcoded to VP8. WebRTC Streamer sends Klv metadata over data channel.

Video server

service name: stvideo-server

While the StanagOnDemand server is capable of serving video content by itself, the process can be resource-intensive and may impact its ability to handle other critical tasks. By using a proxy to serve video content, the external video server can handle the task of streaming the video to the end-user, taking the load off of the StanagOnDemand server. This not only ensures a smoother video playback experience for the end-user but also frees up resources on the StanagOnDemand server to focus on other critical tasks. Furthermore, a reverse proxy can cache the video content, enabling faster delivery to subsequent requests for the same content. Overall, using a dedicated video server can greatly improve the performance, scalability, and reliability of a system.
Stvideo-server uses JWT tokens to secure access to resources, including video content and other resources that belong to missions or sensors. With JWTs, access to these resources is restricted to only authorized users, and unauthorized access is denied. The JWT contains a digitally signed payload, which includes information about the user's identity and their access privileges. Only users with a valid JWT that includes the necessary authorization claims will be able to access the content. However, it is important to note that if the stserver does not have the secret key in the confg file, the stvideo server will allow unauthorized access to the content.

Optional services

WebRtc Streamer

service name: webrtc-streamer

UDP to WebRtc stream recaster. The WebRTC Streamer microservice is responsible for receiving MPEG-TS video streams over multicast UDP and sending them out over WebRTC, either as a h264 passthrough payload or transcoded to VP8. WebRTC Streamer sends Klv metadata over data channel.

RTSP-HLS server

service name: rtsp-hls

UDP to Live HLS and RTSP stream recaster

Stream recaster

service name: stream-recaster

UDP unicast to udp multicast Live stream recaster