How RubyKaigi built an event site in days with the Amazon Chime SDK and Amazon IVS
This is a guest blog written by Sorah Fukumori, Senior Software Engineer at Cookpad and organizer for RubyKaigi. The content and opinions in this post are those of the third-party author, and AWS is not responsible for the content or accuracy of this post.
RubyKaigi is the world’s largest international conference on the Ruby programming language organized in Japan. Due to the continued COVID-19 pandemic, we had to cancel an in-person conference and move online. In 2020 we held our first virtual conference using a popular online video site without paid registration; it was named RubyKaigi Takeout 2020. This year, for RubyKaigi Takeout 2021, we decided to build a virtual conference solution that suits our needs and require attendees to buy a paid ticket.
Besides allowing us to require attendees to buy a paid ticket, our virtual venue for RubyKaigi Takeout 2021 allowed us to meet other unique requirements. Some examples of the requirements we were able to meet include building an interface that reproduced the unique experience of the in-person RubyKaigi conference, real-time Japanese-to-English interpretation, English transcription, and a shared chat channel among Japanese and English-speaking attendees.
Our time was limited to build the virtual venue as most work in the RubyKaigi organizing team as volunteers during their spare time. It was straightforward to utilize AWS services as much as possible, as I primarily use AWS, have professional experience and knowledge on AWS, and felt AWS services would help us achieve stable performance and cost efficiency.
Overview of solution
Given the requirements we had for RubyKaigi Takeout 2021, we explored a few options, but decided on Amazon Chime SDK messaging, Amazon Interactive Video Service (IVS), AWS Elemental MediaLive, Amazon Transcribe, and Amazon CloudFront.
Amazon Chime SDK messaging was selected because it provided all of the features we needed for chat, it was easy to get started with straightforward concepts. Alternatives were either more complex, too expensive, or didn’t integrate easily. It was a big plus for me that the Amazon Chime SDK is a part of AWS services because I knew I could trust its stability and security even though I didn’t have prior knowledge about the Amazon Chime SDK.
For live video streaming, we choose AWS Elemental MediaLive for ingestion and Amazon IVS for distribution. This combination worked well as AWS Elemental MediaLive is capable of switching between live presentation feed and pre-recorded presentation videos, and Amazon IVS has a bleeding-edge browser SDK that integrates with video.js and simple JWT-based playback authorization. We had 3 live channels to serve 2 session tracks and interpretation (for either track).
And we also integrated Amazon Transcribe with Amazon Chime SDK messaging and AWS Elemental MediaLive to enable English transcriptions. We configured AWS Elemental MediaLive channel to send audio feed as a MPEG2-TS UDP stream to a VPC, and we ran an Amazon Elastic Compute Cloud (EC2) instance to relay the audio feed to the streaming API of Amazon Transcribe and continuously send its result to a dedicated Amazon Chime SDK messaging channel. Our own custom vocabulary file registered to Amazon Transcribe worked well to catch domain-specific terms appropriately.
Also, Amazon IVS’ embedded metadata and messages from a system user on the Amazon Chime SDK messaging are integrated with React useSWR library to push updated page content in real time. This technique reduced requests to our API server, and most remaining requests are properly cached on Amazon CloudFront. This technique to reduce origin load is implemented to serve unpredictable origin load and resulted into cost efficiency and overall system stability.
The API server is built using Ruby on Rails and deployed on Heroku (to consolidate operations with other existing apps maintained by our team).
RubyKaigi Takeout 2021 had just under 1000 attendees from 25 countries and regions and observed no system outages or instability from the virtual venue.
During preparation, we estimated a number of attendees, but it was unclear how a traffic shape would be as we don’t have enough data to estimate attendees’ activity in virtual conferences. Amazon CloudFront, Amazon IVS and Amazon Chime SDK for messaging allowed us to avoid overprovisioning resources so we can run the conference without system outages and instability while achieving cost efficiency.
The source code is publicly available at https://github.com/ruby-no-kai/takeout-app.
RubyKaigi Takeout 2021 was held on the virtual venue, a custom web site that was built with Amazon Chime SDK messaging, Amazon IVS, AWS Elemental MediaLive, Amazon Transcribe and Amazon CloudFront. We built our virtual venue in just 14 days. For me, though I wasn’t used to some AWS services used, common concepts and foundations like AWS Identity and Access Management (IAM) service authorization and AWS SDK helped us to build the virtual venue quickly.
|Sorah is a senior software engineer working for Cookpad Japan Site Reliability team and Cookpad Global Corporate Engineering team. Sorah also organizes a tech conference RubyKaigi, and operates non-commercial BGP AS in her spare time. Rubyist and Rustacean wannabe.|