Building a Decoupled Architecture for EdTech SaaS

Discover how we decoupled the architecture of the application, facilitating further scalability, elasticity, and cost-efficiency of the system.

  • Application Modernization
  • EdTech
  • UK
Building a Decoupled Architecture for EdTech SaaS

Our Customer

Virtual Classroom Platform

LearnCube is a purpose-built SaaS for live online education. The platform provides multiple e-learning solutions for teaching, tutoring & training of all kinds. The main platform features include virtual classrooms, class scheduling, inbuilt payment gateways, eCourses, on-line tests and a management system that streamlines administration.

The Challenge

Architectural Flaws in Building Scalable Video Recording

The key issue of the application’s architecture lies in the way the platform video recording option was designed and built:

  1. During online lessons, that are conducted on the platform, small chunks of streamed videos are stored in S3 buckets in the *.ts format.
  2. Playlists of these chunks are described in *.m3u8 files.
  3. When a lesson ends a dedicated cloud compute instance (Amazon EC2) with installed Agora SDK performs assembling and video converting of *.ts files into *.mp4 format files that are available for end users.

This led to sporadic unpredictable reloading of the compute instance, so we can say that it was a single point of failure of the platform’s architecture.

Since the entire video processing on the platform was ensured by a single EC2 instance, it demanded substantial resources as well as their 24/7 utilization. This constant high workload caused high final costs of the application’s cloud computing resources.

Also, another important client’s requirement was to keep using Agora SDK. It’s real-time engagement platform which provides an ecosystem for embed voice, video, real-time messaging and recording solutions quickly and cost-effectively.

The Solution

Optimizing Video Processing with Decoupled Architecture

To accomplish the abovementioned client’s requirements we suggested building a new decoupled architecture of the application using Amazon Simple Queue Service (SQS) and Amazon Elastic Compute Cloud (EC2).

In general, by using the decoupling we can run separate cloud computing instances for each video processing. When the instance has done the job, we terminate it.

Also, decoupling allows to use Spot Instances – it’s up to 75% cheaper than the On-Demand option. So we managed to achieve significant cloud cost optimization in such a way.

The solution we designed and delivered works in the following way:

1. When an online lesson ends application stores *.txt files with metadata in a corresponding bucket.

2. Then an event is triggered and it sends a message to SQS (Simple Queue Service).

3. EC2 consumption with installed Agora SDK scales based on the amount of messages in SQS and then EC2 processes video converting tasks using file’s metadata from the message.

4. When no new messages appear in the queue, consumption of EC2 is scaled down to zero.

Decoupled architecture on AWS for EdTech SaaS

Decoupled architecture on AWS

Implemented AWS Services
Amazon EC2
Elastic Compute Cloud (EC2)
Amazon Simple Storage Service icon
Simple Storage Service (S3)
Amazon SQS icon
Simple Queue Service (SQS)

The Results

Cost-Effective Cloud Scalability and Application Performance

The implementation of the decoupled architecture allows to achieve excellent scalability of the application and the performance of video processing tasks. From now on, video processing on the platform runs in parallel (using the needed amount of cloud compute instances for fast processing) so end users are able to get their recordings within the forecasted time period.

What these improvements mean to the client’s business:

  • Higher customer satisfaction and lower churn rate due to improved user experience
  • Reduction of cost spent on the utilized cloud compute resources for the same workflow and capacity.

Why Romexsoft

Modernize Software with Decoupled Architecture

As an AWS Advanced Tier Services Partner with proven experience in the Public Sector, we specialize in building scalable, reliable, and cost-efficient Ed-Tech solutions with decoupled architecture. This approach ensures possible fault isolation, more efficient resource usage, and easier maintenance of your software over time.

We drive flexibility and agility for your SaaS through decoupled architecture, delivering:

  • Well-thought-out software architecture with no high-cost bottlenecks
  • Improved infrastructure scalability with independently scaling services
  • Reduced compute costs of your app by up to 75%
  • Minimum system downtime during application modernization.

Decoupling AWS Architecture for the App FAQ

What does AWS decoupling mean in application architecture?

Decoupling AWS refers to the process of separating different components of an application's architecture to ensure they operate independently. In the case of LearnCube, the decoupling was essential to address bottleneck issues they faced due to the usage of a single on-demand cloud compute instance (Amazon EC2) for all video-converting purposes. By decoupling, they were able to achieve scalability, elasticity, and cost-efficiency in their system.

How can decoupling application layers enhance scalability and reduce costs?

Application decoupling allows different parts of an application to function independently, reducing dependencies and potential bottlenecks. In the case study, by using application decoupling, separate cloud computing instances were run for each video processing task. This not only optimized performance but also allowed the use of Spot Instances, which are up to 75% cheaper than the On-Demand option. As a result, significant cost optimization was achieved without compromising on performance.

Why is decoupling applications crucial for platforms that rely heavily on video processing like EdTech SaaS platforms?

Decoupling applications is vital for platforms with heavy video processing because it ensures that the video processing tasks are distributed and not reliant on a single point of failure. The entire video processing on the platform was initially ensured by a single EC2 instance, leading to high costs and potential system failures. By decoupling, video processing tasks could run in parallel, ensuring timely delivery to end users and optimizing costs.

How does AWS decoupling utilize services like Amazon Simple Queue Service (SQS) and Amazon Elastic Compute Cloud (EC2)?

AWS decoupling leverages Amazon SQS and EC2 to optimize and streamline various tasks. When a specific event or trigger occurs, it sends a message to SQS. EC2 instances, equipped with the necessary tools or SDKs, then scale based on the number of messages in SQS to process these tasks. This approach ensures efficient resource utilization, allowing for dynamic scaling based on demand, leading to cost optimization and enhanced performance.

Related Success Stories

Unveil how we transformed the application with a multi-tenant architecture, thereby enhancing its scalability, security, and deployment.
  • Application Modernization
  • BioTech
  • USA
Redesigning web application architecture and implementing advanced features for managing 100k daily users.
  • Cloud Development
  • Media
  • Ukraine

Craft Your Vision – Make the First Step.
Book a Consultation With Our Experts.

    Contact Romexsoft
    Get in touch with AWS certified experts!