WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
Building & scaling a live streaming mobile platform - Gr8 road to fame
1. The GR8 Road to #fame
Rishabh Jain
To The New Digital
http://www.fame.live
2.
3. LIVE will be the new ‘Selfie’ by 2017
• #fame was launched on 15th April 2015 and was available for
both Android and iOS from day 1.
• Twitter’s Periscope was launched on March 26, 2015 and on
May 26 2015 it was available for Android
• Facebook Live launched in April. (6th April 2016)
4. Some terms that I would be using
• DVR - Digital Video Recorder
• Encoder - Compresses the video to standard format
• Transcoding - converting a given video input into a digital
format that is compatible with most types of Web players and
mobile devices
• RTMP - Real time messaging protocol
• HLS - HTTP Live Streaming
• OTT Platform - Over the Top, delivery of audio and video over
Internet (e.g. Youtube.com)
• Beam - Instead of Stream we call it Beam
• Adaptive Bitrate - Automatically adjusting the video quality
depending on the bandwidth.
6. What is #fame?
A platform that allows users to broadcast themselves
LIVE
How #fame is fairing
MAUs: 3M+
Watch Hours: ~17K / day
Interactions: ~15M / day
Multi-Country presence – India, Indonesia and Thailand
7. Key Milestone
Big Bollywood Events IIFA(Bollywood Awards), Movie Releases
Entertainment Event Streaming Sunburn Goa, NH-7 Weekender
Brand Promotions OLA, Myntra, Bacardi, etc
Celebrity Shows & Movie Promotions Afrojack, Akshay Kumar, S
oha Ali Khan, Kunal Khemu and many more TV and Bollywood ac
tors
9. Product vision
#fame approached TTN Digital to build a
Live Video Platform with an aim to
Disrupt and Democratize Talent Discovery ecosystem
What #fame needed
Mobile first highly interactive and personalized (based on
user behavior and preferences) social platform
User can start beaming live to whole wide world at the
click of button; can watch Videos On Demand as well
International reach yet Hyper-local
10. Challenges- Business and Technical
Small turn around time: MVP < 3 months
Minimal Latency and adaptive quality in Live Streaming
and across low bandwidths
Real time chat Publish Subscribe at large scale and
unpredictability
Diverse ecosystem of mobile devices
Early Movers Dilemma, Extreme Agility
13. The Story So Far
April – May(2015)
• Public Launch (Android,
iOS) with improved
features – Moderation,
Instant Live etc.
• CMS and Admin
Jun – Jul(2015)
• IIFA – Arch. And Prod.
Scale-up
• Landscape Mode
• Stickers
• Hashtags
• Carousal Control
• Sharing across App
Aug – Sep (2015)
• Revamped Go Live
Experience
• Follow Famestars On
Sign-up
• Consumer Learning
Journey
• Comments on Videos
14. The Story So Far
Oct – Nov(2015)
• Revamped UI /
Navigation,
Personalization, Social,
FTL
• Indonesia Launch
Dec – Jan(2016)
• Website Launch
• Mobile Responsive Site
• Revamped Search
• Major Bugs and UI/UX
Fixes
• Thailand Launch
• Regionalisation (S.
India, GPS based)
Feb-Mar(2016)
• Portrait
Beaming(Streaming)
• Re-written chat Micro
Service
• Revamped Chat UX
• Major Bugs and UI/UX
Fixes
• Own OTT Platform
(instead of Youtube
16. Thought Behind Initial Design Decisions
API First Architecture: Mobile First Application
Grails: RAD and good REST support
Wowza Server : Good support for protocols & mature
community
PubNub : Leader in Chat and Instant Messaging
Learning from the Initial Design
Databases can quickly become point of contention
Difficult to move fast with Monolithic architecture
Business wants to move fast but how does Engineering cope
up
Victims of our initial success
19. Thoughts behind the Changes
Smaller chunks of applications should be easier to manage &
scale
Expanding teams will be easier as smaller specialized apps
Database load distribution achieved partially
Micro-services with Spring Boot
20. And We learn some more…
If not done properly, Micro-services can be a dependency
hell
Few time consuming transactions can result in bad UX
Performance tuning starts from requirement understanding:
Think to scale
We needed more database connections
There are better ways to do calculations & aggregations
Hope for the best, prepare for the worst
22. Thoughts Behind the Changes
Existing APIs made AngularJS as obvious choice for Web App
Offloading certain calls to Nginx for Smart response caching
Hazelcast can handle complex queries as well.
Handling things asynchronously can save a lot of precious
resources
Server level optimizations Improves performance from
same H/W
Spark, Kafka, Hadoop-YARN, Cassandra combination good for
real time/batch aggregations & calculations.
Developers needed an integrated consistent environment on
local machines Docker
23. And The Learning Continues…
150+ servers with 5 different environments
MySql or Percona or AWS Aurora or Vitess or …
MongoDB Improvements (Read-Write Separation,
Replication and Sharding)
Grails 3
Spring Boot
Real-time monitoring & pro-active corrections across
multitude of services and 3rd party dependencies
24. And It’s relentless
Faster encoding mechanisms for better live streaming &
viewing experience
Better resilience for surges
Intelligent and self-learning Personalization
More Data Driven decisions
Monetization possibilities and experiments