From dec2223ae5e214b79594700c496fc58ad2f40a68 Mon Sep 17 00:00:00 2001 From: Ksenia Vazhdaeva Date: Fri, 23 Aug 2024 14:48:06 +0700 Subject: [PATCH] Update README --- README.md | 94 +++++++------------------------------------------------ 1 file changed, 12 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index c64ab21..2da24c4 100644 --- a/README.md +++ b/README.md @@ -1,91 +1,21 @@ # Media Gateway -The media gateway provides a functionality to forward messages from one [ZeroMQ](https://zeromq.org/) instance to -another. The media gateway consists of two applications - a server and client. The client reads messages from the source -ZeroMQ instance and sends them to the server via HTTP/HTTPS. The server writes received messages to the target ZeroMQ -instance. +Media Gateway is a service that provides a secure bridge (with encryption and authentication) between Savant edge and +cloud components by forwarding messages from one ZeroMQ socket to another. The media gateway consists of two parts - a +server and client. The client reads messages from the source ZeroMQ socket and sends them to the server via HTTP/HTTPS. +The server writes received messages to the target ZeroMQ socket. -Following optional features are supported: +![](docs/source/_static/media-gateway.png) -* basic authentication -* HTTPS (including a self-signed PEM encoded certificate) -* client certificate authentication (for the server - [X509_LOOKUP_hash_dir method](https://www.openssl.org/docs/man1.1.1/man3/X509_LOOKUP_hash_dir.html) is used to load - certificates and CRLs) -* FPS statistics logging (by frame or timestamp period) +## Documentation -To read from and to write to ZeroMQ [savant_core](https://github.com/insight-platform/savant-rs) crate is used. +The documentation is available at [GitHub Pages](https://insight-platform.github.io/MediaGateway/). -Both server and client applications are configured via JSON files. `in_stream` in the client configuration corresponds -to [ReaderConfig](https://github.com/insight-platform/savant-rs/blob/main/savant_core/src/transport/zeromq/reader_config.rs) -and `out_stream` in the server configuration corresponds to -[WriterConfig](https://github.com/insight-platform/savant-rs/blob/main/savant_core/src/transport/zeromq/writer_config.rs). -Examples of configuration files can be found in [samples](samples) directory. +## License -Both server and client have a health endpoint. +Media Gateway is licensed under the BSL-1.1 license. See [LICENSE](LICENSE) for more information. -``` - GET /health HTTP/1.1 - Host: - ``` +### Obtaining Production-Use License -If the server/client is healthy an HTTP response with 200 OK status code and the body as below will be returned. - - ```json - { - "status": "healthy" -} - ``` - -## Docker - -Both server and client can be run as Docker containers. - -### Server - -To run the server with [the default configuration](samples/configuration/server/default_config.json) and to mount `/tmp` -directory and publish the port from the default configuration - -```bash -docker run \ - -v /tmp:/tmp \ - -p 8080:8080 \ - ghcr.io/insight-platform/media-gateway-server:latest -``` - -To run the server with another configuration (`/home/user/server_config.json`) - -```bash -docker run \ - -v /home/user/server_config.json:/opt/etc/custom_config.json \ - -p HOST_PORT:CONFIG_PORT \ - ghcr.io/insight-platform/media-gateway-server:latest \ - /opt/etc/custom_config.json -``` - -### Client - -To run the client with [the default configuration](samples/configuration/client/default_config.json), to mount `/tmp` -directory and publish the port from the default configuration - -```bash -docker run \ - -v /tmp:/tmp \ - -p 8081:8081 \ - -e "GATEWAY_URL=" \ - ghcr.io/insight-platform/media-gateway-client:latest -``` - -where `` is the server URL, e.g. `http://192.168.0.100:8080` - -To run the server with another configuration (`/home/user/client_config.json`) - -```bash -docker run \ - -v /home/user/client_config.json:/opt/etc/custom_config.json \ - -p : \ - ghcr.io/insight-platform/media-gateway-client:latest \ - /opt/etc/custom_config.json -``` - -where `` is the port specified in the configuration file and `` is the port on the host machine. +To obtain a production-use license, please fill out the form +at [In-Sight Licensing](https://forms.gle/kstX7BrgzqrSLCJ18).