In the world of OTT platforms, success hinges on effective Content Management System (CMS) operations. This involves scheduling and monitoring VOD content, managing live schedules, overseeing user rights, and analyzing metrics for insights. These elements are critical for OTT platform success.

In the process of building a powerful, flexible, and efficient CMS, TrackIt decided to use Amazon OpenSearch over ElasticSearch for search and analytics. The sections below discuss the rationale behind this approach, explore the benefits of Amazon OpenSearch, and provide a brief tutorial on its integration into the Strapi.io CMS

About Amazon OpenSearch

Amazon OpenSearch, a managed service offered by Amazon Web Services (AWS), simplifies the deployment, operation, and scalability of the open-source OpenSearch platform clusters on AWS. Offering direct access to Elasticsearch and OpenSearch APIs, this service ensures seamless integration with existing code and applications utilizing Elasticsearch.

Amazon OpenSearch

Source: AWS

Benefits of Amazon OpenSearch

Integration with the AWS Ecosystem

Amazon OpenSearch boasts high compatibility with tools and services in the AWS ecosystem. This integration streamlines configuration, administration, and maintenance processes, leveraging native AWS products and tools.

Security and Compliance Measures

Amazon OpenSearch provides advanced encryption policies for data at rest and in transit. Integration with AWS IAM ensures proper access management, compliance with industry standards, and heightened data security.

Scalability and Performance

Aligned with the dynamic needs of OTT platforms, Amazon OpenSearch’s scalable nature and auto-scaling capability ensure high performance, even during peak usage.

Integrating Amazon OpenSearch into the Trackflix CMS

About the Trackflix CMS

Trackflix CMS is a simple content management system (CMS) designed to simplify operations and enhance user experience. It offers a seamless interface to manage live and video-on-demand (VOD) content distribution.

Key Features of the Trackflix CMS

  • Effortless setup of a live channel. 
  • Seamless upload VOD content. 
  • Genre and category management
  • User permissions customization to align with specific requirements.
  • Comprehensive data analytics covering application and operational metrics. 

Integration of Amazon OpenSearch as a plugin

Strapi.io, an open-source headless CMS solution, was leveraged to facilitate the creation of a user-friendly and customizable content management system. To achieve efficient search and analytics capabilities, Amazon OpenSearch was seamlessly integrated as a plugin within Strapi.io.

Before delving into the specifics of the implementation, it is crucial to grasp the rationale behind the decision to create a Strapi plugin for the Amazon OpenSearch Service. The plugin actively monitors changes in content types and updates OpenSearch correspondingly. By structuring it as a plugin, the integration with OpenSearch is encapsulated, promoting reusability and simplified maintenance. Below are two key considerations favoring the use of a Strapi plugin:

  1. Ease of maintenance: Plugins function as self-contained entities, allowing independent versioning from the main Strapi application. This approach streamlines the process of maintaining and updating the OpenSearch integration as necessary, without jeopardizing the stability of the CMS.
  1. Reusability: Once a Strapi plugin for Amazon OpenSearch is created, it becomes applicable across various Strapi projects or web applications. This not only saves time but also eliminates the need to re-implement the same integration for each project.

Integration Process (Tutorial)

Implementing Amazon OpenSearch within the Strapi.io project requires the following step-by-step process. Before delving into the process, confirm that an AWS account is set up and the necessary credentials are readily available.

  1. Setting up Amazon OpenSearch
  • Navigate to the AWS Management Console and create an OpenSearch cluster.
  • Configure index settings and define mappings for data.
  1. Creating a Strapi Plugin
  • Understand the basics of Strapi plugins and their role in extending functionality.
  • Develop a custom Strapi plugin to seamlessly integrate with Amazon OpenSearch.
  1. Configuring Strapi with OpenSearch
  • Configure Strapi to establish a connection with Amazon OpenSearch

Strapi setup

In order to activate the plugin, add the following settings to PROJECT/config/plugins.ts:

export default {    // …
    ‘opensearch’ : {      enabled : true,      resolve: ‘./src/plugins/opensearch’
    }    // …  }

Additionally, activate the plugin middleware in PROJECT/config/middlewares.ts:

export default [     // …

    “plugin::opensearch.opensearchMiddleware”,
     // …];

Plugin Functionality

Upon the initial run of the project, the plugin generates a config file at PROJECT/config/opensearch.ts. The config file structure is as follows:

export default ({ env }) => ({  connection: {    node: env(‘OPENSEARCH_HOST’, ‘opensearch-domain-name’),    auth: {      username: env(‘OPENSEARCH_USERNAME’,’opensearch-username’),      password: env(‘OPENSEARCH_PASSWORD’,’opensearch-password’),    },},  settings: {    version:1,    validStatus: [200, 201], validMethod: [‘PUT’, ‘POST’, ‘DELETE’], fillByResponse: false, index_prefix: ”, index_postfix: ”,    removeExistIndexForMigration: false,  },  models: [  {    “model”: “category”,    “pk”: “id”,    “plugin”: null,    “enabled”: false,    “index”: “category”,    “relations”: [],    “conditions”: {},    “fillByResponse”: true,    “migration”: false,    “supportAdminPanel”: true,    “urls”: []  }]});

The ‘connection’ section encapsulates configurations relevant to the connection with OpenSearch. The ‘settings’ section contains the initial settings for the OpenSearch plugin. The ‘models’ section defines models within the PROJECT/src/api/** path, allowing for customization of the initial settings.

Usage

For example, to modify the category model and observe changes in OpenSearch:

  1. Set enabled to true in the model’s settings.
  2. Save and restart the plugin to create an index for this model in OpenSearch. The index name can be changed in the model’s settings.
  3. Adjust the model settings as follows:
{    “model”: “category”,    “pk”: “id”,    “content”: “category”,    “enabled”: true,    “index”: “categories”,    “relations”: [],    “conditions”: {},    “fillByResponse”: false,    “migration”: true,    “supportAdminPanel”: true,    “urls”: [“/categories”]  }

Now, changes made in the Strapi admin panel such as creating, deleting, or updating, reflect in OpenSearch.

Features and Functionalities Offered by Amazon OpenSearch

VOD Content Organization and Research

Amazon OpenSearch’s search capabilities and indexing help sort VOD content efficiently. With quick indexing and querying, the CMS retrieves content promptly, tailoring the user experience to individual preferences.

Live Scheduling Management

Real-time listing and search functionality provide improved control over live scheduling, ensuring smooth operations and enhanced user accessibility during live events.

About TrackIt

TrackIt is an Amazon Web Services Advanced Tier Services Partner specializing in cloud management, consulting, and software development solutions based in Marina del Rey, CA.

TrackIt specializes in Modern Software Development, DevOps, Infrastructure-As-Code, Serverless, CI/CD, and Containerization with specialized expertise in Media & Entertainment workflows, High-Performance Computing environments, and data storage. 

In addition to providing cloud management, consulting, and modern software development services, TrackIt also provides an open-source OTT platform including a CMS and an analytics dashboard that allows users to optimize their OTT platforms.