Efficient and fast distribution of video clips on the Web is crucial to achieve the desired visibility of an organization. This is especially true for companies that produce various multimedia content for users. Before publishing, videos need to be edited and then converted into the appropriate format for playback on the Web. The problem with existing solutions is that they are built with the classic monolithic architectural pattern, which makes it difficult to upgrade, install, maintain, efficiently use hardware and integrate into existing applications and video delivery platforms.
Better than monolithic applications are applications running in the cloud, which has become de facto standard for developing a wide variety of solutions, such as web applications, Internet of Things, and chat robots. Applications running in the cloud are distributed, adaptable, horizontally scalable, fault-tolerant, highly available, configurable, and most often consist of stand-alone units specializing in a specific task called microservices. Microservices are usually weakly coupled and created on demand. To ensure their proper functioning, microservices need to be monitored by collecting various values of telemetry metrics, log records and distributed requests tracing. In order for microservices to run on different cloud platforms, it is necessary to separate their execution from the specifics of the used programming languages, libraries, architectural patterns, hardware and software on different servers. This is achieved through a variety of virtualization techniques. The most appropriate is the container based lightweight virtualization. Due to the large number of containers in which microservices are executed and their complex topologies, the containers need to be managed by container orchestration platforms and ensure reliable communication with service meshes. In order to facilitate the management of a usually large number of microservices, it is recommended to perform their compiling, installation, testing and monitoring automatically.
Due to all the mentioned advantages, we followed the principles of cloud computing in the creation of an application for editing and delivering videos. More efficient preparation of the video clips for republishing was achieved by direct manipulation of individual video chunks already prepared for the Web. Such cutting and editing of new videos is fast, as in most cases only the metadata of the video clip and their chunks change. When the system detects the need to actually change a particular video chunk (e.g., the first or last in a video clip), such operation is usually quick, as the video chunks are usually only a few seconds long. After editing a new video, publishing it to other sites is easy, as only the indexes and status records in the databases change. With this way of editing, video clips don’t have to be converted again into the appropriate format for playback on the Web.
The application was divided into a frontend and backend. The backend is developed with a microservice architecture, with each microservice responsible for a specific task, such as uploading, cutting, creating, playing and storing video clips, video chunks and their metadata. In most cases, the microservices use the protocol gRPC to communicate with each other, and in individual cases microservices also use query language GraphQL and communication interface REST. Microservices implementation details are abstracted with container based lightweight virtualisation technology Docker. Docker containers runs on different public clouds. Containers in public clouds are managed by the orchestration platform Kubernetes. Reliable communication in a complex microservice topology is ensured by the service mesh Istio. We also used tool Prometheus for collecting application data and tool Jaeger for distributed requests tracking. We concealed the complexity of the backend from the clients using the application gateway Istio Ingress. The application can be used via web graphical user interface, which was developed as as single page web application. The web-application run as a serverless service in the public cloud.
|