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 Obstacles They Faced
LearnCube came with a functional necessity to re-architect their video processing solution to eliminate bottleneck issues resulting from the usage of a single on-demand cloud compute instance (Amazon EC2) for all the video-converting purposes.
How We Helped
We developed and built the decoupled architecture of the application that facilitates further scalability, elasticity, and cost-efficiency of the system.
The key issue of the application’s architecture lies in the way the platform video recording option was designed and built:
- During online lessons, that are conducted on the platform, small chunks of streamed videos are stored in S3 buckets in the *.ts format.
- Playlists of these chunks are described in *.m3u8 files.
- 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.
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 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.
Amazon Web Services Utilized
- AWS EC2
- AWS SQS
- AWS S3
Decoupled Architecture for EdTech SaaS
What We Achieved Together
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.
Romexsoft is an AWS-certified Consulting Partner, trusted Software Development Company and Managed Service Provider, founded in 2004. We help customer-centric companies build, run, and optimize their cloud systems on AWS with creative, elegant, and cost-efficient solutions.
Our key values
- Delivery of quality solutions
- Customer satisfaction
- Long-term partnership
We have successfully delivered 100+ projects and have a proven track record in FinTech, HealthCare, AdTech, and Media industries.
Romexsoft possesses a 5-star rating on Clutch due to its strong expertise, responsiveness, and commitment. 60% of our clients have been working with us for over 4 years.
Let’s Talk about Your Business Needs!
Recent Success Stories
Infrastructure Automation | Customer Case Study | E-Commerce
Full-Cycle Software Development | Customer Case Study | AdTech
Application Monitoring System | Customer Case Study | BioTech
Decoupling Application’s 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.
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.
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.
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.