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.
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'
When the database TMDB is connected, it enables automatical import of information about movies and TV series in the VoD section.
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-17-jre
mongodb-org
(>=4.2)rabbitmq-server
(>=3.6)postgresql
(>=10.0)nginx
(>=1.14)manager-tvip-tms-finite-state
manager-tvip-tms-weather
- disabled, not usedmanager-tvip-tms-vod
manager-tvip-tms-vnc
manager-tvip-tms-tvip-api
manager-tvip-tms-report
manager-tvip-tms-profile
manager-tvip-tms-media
manager-tvip-tms-file
manager-tvip-tms-epg
manager-tvip-tms-command
manager-tvip-tms-cas
manager-tvip-tms-admin-api
manager-tvip-auth
manager-tvip-tms-stats
manager-tvip-tms-audit
gateway-tvip-tms-tvip-api
gateway-tvip-tms-provider-api
gateway-tvip-tms-admin-api
gateway-tvip-tms-activation-api
gateway-tvip-file-api
gateway-tvip-cas-api
gateway-tvip-tms-websocket
gateway-tvip-tms-vnc
gateway-tvip-tms-stats-api
gateway-tvip-tms-command
manager-tvip-tms-search
manager-tvip-tms-metrics