EC2Ensemble: Multi-Regional EC2 Instance Launcher

Project phases

Published: November 17, 2021

Last Updated: 2 years ago.

View All Projects

The UBC Cloud Innovation Centre, in collaboration with the Pacific Chamber Music Academy (PCMA), has developed EC2Ensemble, a multi-regional EC2 instance launcher to facilitate JackTrip, an open-source music technology that enables low-latency, full-duplex audio transmission across the internet.

While JackTrip is the standard in real-time musical conferencing, it requires strong technical skills to deploy, which leaves many potential users out of reach of this practical technology. With this problem in mind, a novel solution emerged--to expand access by hosting JackTrip hubs within AWS regions. For users, this streamlines the pathway to the lowest latency network based on their unique location. For PCMA, this means the ability to deliver JackTrip simply and effectively to anybody by way of their Alla Breve Music App. In a twist of innovation, this architectural solution can be applied to a range of latency-sensitive applications that would benefit from multi-regional functionality.

Approach

There are many factors that impact audio latency over the internet, such as connection speed, use of wifi or ethernet, and computer processing power. As these variables are outside the control of the application, the solution had to be designed to achieve the lowest latency possible depending on the user’s location. To realize this, the solution had to be able to launch EC2 instances across multiple AWS regions, as well as recommend the best AWS region to the user.

Supporting Artifacts

Architecture Diagram

Project's architecture diagram. The technical infrastructure for the central region is represented in one big box with icons representing AWS services connected by arrows. The 'Other Regions' infrastructure is in a smaller, separate box in the bottom right of the diagram.

Technical Details

To use the solution, users are required to log in. AWS Amplify and AWS Cognito authenticate users via user pool identities that govern access to the AWS services employed in the solution. Once authenticated, users can access the web application to initiate server actions.

From the user interface, messages are sent through API Gateway to a Lambda function. This Lambda function triggers a Step Function that manages the workflow of messages to create, restart or terminate a server. In the case of server creation, the Lambda function initiates server deployment in the selected AWS region, resulting in a JackTrip hub hosted within an EC2 instance. 

AWS WebSockets are applied in the solution to enable two-way communication between the front end and back end. Any changes to room configurations such as the IP address or server settings, are automatically updated in a DynamoDB table and reflected in the user interface. 

Active server IP addresses are visible on the home page. From here, users can either copy the IP address or copy a URL link to share the room with others. An externally hosted JackTrip server can also be used by manually inputting the IP address during server setup.  

Link to the solution on github: https://github.com/UBC-CIC/EC2Ensemble

Photo by Larisa Birta on unsplash

About the University of British Columbia Cloud Innovation Centre (UBC CIC)

UBC’s CIC is a public-private collaboration between UBC and Amazon. A CIC identifies digital transformation challenges, the problems or opportunities that matter to the community, and provides subject matter expertise and CIC leadership.

Using Amazon’s innovation methodology, dedicated UBC and Amazon CIC staff will work with students, staff and faculty, as well as community, government or not-for-profit organizations to define challenges, to engage with subject matter experts, to identify a solution, and to build a Proof of Concept (PoC). Through co-op and work-integrated learning, students also have an opportunity to learn new skills which they will later be able to apply in the workforce.

UBC’s CIC focuses on Community Health and Wellbeing.