The architecture of the TVIP TMS platform
TMS is a server-based microservice application.
The basic package of TVIP TMS allows you to install all microservices on a single server. If necessary, the platform can be divided into several servers, horizontally scaling the necessary services to handle more clients.
Microservice architecture allows redundancy of critical subsystems on multiple physical servers or locations.
Configurations that differ from the basic package delivery are supplied individually for each customer, based on his needs and tasks.
Note
In the examples below, access-token-secret and refresh-token-secret need to be changed to their unique values. If the platform is installed via the tvip-tms-standalone package, no additional settings are required.
Microservices configuration
/opt/tvip-tms/manager - manager microservices directory, /opt/tvip-tms/gateway - gateway microservices directory
Each microservice has a internal configuration that may be partially or completely changed via external configuration. The external configuration needs to be defined in application-prod.yml file that can be found in the particular microservice settings directory.
Common gateway configuration
application:
jwt:
access-token-secret: 'access-token-secret'
refresh-token-secret: 'refresh-token-secret'
network:
trusted-proxies:
- 127.0.0.1
Specific options for gateway-tvip-tms-tvip-api
application:
features:
vod: true
wowza:
app:
secret:
key: yourverysecretkey
ttl: 87000
features.vod includes support for VoD in client applications.
The wowza section defines the key (key) and token lifetime (ttl) for securing Wowza streams.
Specific options for gateway-tvip-tms-provider-api
application:
provider:
device_limit_visible: true
network:
access-networks:
enabled: true
restriction-type: blocked
networks:
- X.X.X.X/24
- Y.Y.Y.Y/32
The device_limit_visible option gives TMS subprovider administrators using Provider Portal access to manage the user device limit.
The network subsection defines the networking options for the gateway. The access-networks option is defined within it, which is responsible for restricting access to the gateway and has the following properties:
enabled - controls whether the access restriction option is enabled, can be set to true or false;
restriction-type - controls whether this option allows or denies access for selected networks, can take the value allowed or blocked;
networks - defines the networks to which this option applies.
Specific options for gateway-tvip-tms-admin-api
application:
network:
access-networks:
enabled: true
restriction-type: blocked
networks:
- X.X.X.X/24
- Y.Y.Y.Y/32
The network subsection defines the networking options for the gateway. The access-networks option is defined within it, which is responsible for restricting access to the gateway and has the following properties:
enabled - controls whether the access restriction option is enabled, can be set to true or false;
restriction-type - controls whether this option allows or denies access for selected networks, can take the value allowed or blocked;
networks - defines the networks to which this option applies.
Common manager configuration
spring:
datasource:
url: jdbc:postgresql://127.0.0.1:5432/tvip-tms
username: tvip-tms
password:
application:
jwt:
access-token-secret: 'access-token-secret'
refresh-token-secret: 'refresh-token-secret'
Specific options for manager-tvip-tms-file
spring:
liquibase:
url: jdbc:postgresql://127.0.0.1:5432/tvip-tms
user: tvip-tms
password:
r2dbc:
host: 127.0.0.1
port: 5432
database: tvip-tms
username: tvip-tms
password:
datasource:
url: jdbc:postgresql://127.0.0.1:5432/tvip-tms
username: tvip-tms
password:
Specific options for manager-tvip-tms-vod
tmdb:
api-key: 'your_tmdb_api_key'
vod-rating-sort: true
Connecting to the TMDB database using the API key passed in the api-key property of the tmdb block enables the ability to automatically import information about movies and TV series in the VoD section.
The vod-rating-sort property is used to select the sorting mode for VOD content within the genre. If true is set, VOD content is sorted by IMDB rating (this sorting method is used by default), if false is set, it is sorted by date of addition to TMS.
Specific options for manager-tvip-tms-vod-viju
The viju theater integration package is not included as standard and can be installed manually if necessary.
Read about customizing the viju library in the corresponding article.
Specific options for manager-tvip-tms-search
Note
The search service is disabled by default, requiring additional setup and activation:
systemctl enable manager-tvip-tms-search
systemctl start manager-tvip-tms-search
elasticsearch:
host: 127.0.0.1
port: 9200
scheme: http
username: tms
password: your_password
refresh-interval: 60s
number-of-shards: 1
Microservice management
Microservices are controlled through system.d services, and microservices load their configurations only at startup and restart.
systemctl start <name> - start the microservice
systemctl stop <name> - stop the microservice
systemctl restart <name> - restart the microservice
At startup manager-type micrservices will check if database structures must be updated and migrations be applied. Data migrations may take a long time in some cases.
Updating the platform restarts all updated services, which can lead to a sequential database update by each microservice.
There are three SQL TMS databases: tvip-tms, tvip-tms-audit, tvip-tms-vod that are controlled by Postgresql RDBMS. The tvip-tms database will be divided into domain zones later.
If several microservices will update the same database, the procedure will be carried out sequentially, which also increases the start time.
Microservices log files
Warning
Logging is disabled by default.
Logs can be activated by editing the application-prod.yml configuration of the particular microservice:
You must restart the microservice to apply the changes.
All log files are stored in the directories /var/log/tvip-tms/.
The files are separated by name and purpose:
application.log- main log fileframework.log- service log fileaccess.log- information about interactions with external systems as well as other TVIP TMS microservicesaudit.log- extended information about interactions with external systems as well as other TVIP TMS microservices
Below you may find the example of TMS dependencies of tvip-tms-standalone package:
openjdk-21-jremongodb-org(>=4.2)rabbitmq-server(>=3.6)postgresql(>=10.0)nginx(>=1.14)manager-tvip-tms-finite-statemanager-tvip-tms-weather- disabled, not usedmanager-tvip-tms-vodmanager-tvip-tms-vncmanager-tvip-tms-tvip-apimanager-tvip-tms-reportmanager-tvip-tms-profilemanager-tvip-tms-mediamanager-tvip-tms-filemanager-tvip-tms-epgmanager-tvip-tms-commandmanager-tvip-tms-casmanager-tvip-tms-admin-apimanager-tvip-authmanager-tvip-tms-statsmanager-tvip-tms-auditgateway-tvip-tms-tvip-apigateway-tvip-tms-provider-apigateway-tvip-tms-admin-apigateway-tvip-tms-activation-apigateway-tvip-file-apigateway-tvip-cas-apigateway-tvip-tms-websocketgateway-tvip-tms-vncgateway-tvip-tms-stats-apigateway-tvip-tms-commandmanager-tvip-tms-searchmanager-tvip-tms-metrics