In this presentation we introduce Nubomedia (http://www.nubomedia.eu), the first open source PaaS platform capable of acting as an “infinite media server”. Most state-of-the-art media servers just provide three types of capabilities: transcoding, group communications and recording. Nubomedia is a research effort funded by the European Commission which, in addition to these, provides flexible media processing features including computer vision, augmented reality, media blending, media filtering and much more. In a world where plain communications are becoming a commodity, business models based on “just calls” are not really profitable. For this reason, these advanced media processing mechanisms open new opportunities given that they might provide differentiation and added value to applications in many specific verticals including e-Health, e-Learning, security, entertainment, games, advertising or CRMs just to cite a few.
1. Nubomedia: the cloud infrastructure for
WebRTC and IMS multimedia real-time
communications
Luis Lopez
lulop@kurento.org
2. WebRTC infrastructures
http://www.kurento.org
2
Peer-to-Peer WebRTC Application (without media infrastructure)
WebRTC video stream
WebRTC Application based on media infrastructure
media infrastructure
3. WebRTC media servers: the simplest
WebRTC infrastructure
• Media server
– Monolithic software
– Based on shared memory
– Scales well vertically
– Can’t scale horizontally
• Media server vendors
– Software vendors
– Hardware vendors
http://www.kurento.org
3
5. Function of WebRTC media servers
http://www.kurento.org
5
Transcoding media server
VP8 H.264
MCU/SFU media server
Recording media server
6. Evolution of media servers
Current media servers
http://www.kurento.org
6
What common WebRTC
Media Servers do:
• Transcoding
• MCU
• Recording
What future Media
Servers will do:
• Flexible processing
• Augmented reality
• Blending
• Mixing
• Analyzing
• Etc.
Media is
here
Media goes
there
Transcoding
MCU/SFU
Recording
Media is
here
Rich Media
goes there
Future media servers
Media
Events
Transcoding,
MCU/SFU,
Recording,
Enrich,
Augment,
Analyze,
Combine,
Transform,
Adapt, …
Context
Content
Commands
7. Kurento Media Server
http://www.kurento.org
7
Sink SRC
Sink
SRC
SRC Sink
Sink
Media Element
• Provides a specific media
functionality
› Send/receive media
› Process media
› Transform media
• Exchange media through
› Sources
› Sinks
Media pipeline
• Chain of media elements
implementing the desired media
logic.
• The Media API provides the
capability of creating media
pipelines by joining media
elements of the toolbox
Media Element
Sink
SRC
8. Creating applications basing on
Kurento Media Server
H pEndpoint
WebRtcEndpoint
Application 2
IPTVConnector Mixer
FaceDetector
PointerTracker
BarCodeReader
HeartRateBlender
ChromaFilter
FaceOverlay
http://www.kurento.org
8
Protocols
& Codecs
Computer
Vision
Augmented
Reality
Mul sensory
Mul media
DataChannelEndpoint
PlayerEndpoint
RecorderEndpoint
Media
Repository
IPTV
Integra on
Group
Communica ons
Sink%
Sink% SRC%
RtpEndpoint
SRC$
Sink% SRC%
Sink%
SRC%
Sink%
Sink%
SRC%
SRC%
Sink%
SRC%
Sink%
Sink%
SRC%
SRC%
Sink%
Sink%
SRC$
CdnUpload
Sink%
Sink SRC
Sink
Sink
SRC
SRC Sink
Sink
Application 3
Sink
SRC
Sink
Sink
SRC Sink
Sink SRC
Application 1
Sink SRC
Sink SRC
Sink SRC
Sink SRC
Toolbox of media elements
9. Beyond media servers: WebRTC
clouds and the problem of scalability
http://www.kurento.org
9
WebRTC Application based on media infrastructure
WebRTC Cloud
10. Cloud models for WebRTC
infrastructures
IaaS SaaS
http://www.kurento.org
10
PaaS
Provider
- Computing resources
Developer
- Installation
- Administration
- Security
- Application logic
Provider
- Development API
Developer
- Application logic
Provider
- Service
Developer
- Nothing to do
11. WebRTC PaaS APIs: Requirements
• Requirements of WebRTC PaaS APIs
– Functional requirements
• Media transport
– Media endpoint
– Media replication
– Media routing
• Media persistence
– Media storage
– Media recovery
• Media processing
– Transcoding
– Analysis
– Augmentation
– Non-functional requirements
• Security
• Dependability
• Scalability
http://www.kurento.org
11
12. WebRTC multimedia session
• RFC 5117
– A multimedia session is an association among a group of participants
engaged in the communication via one or more RTP Sessions.
• Characterized by
– Communication topology
• Graph of multimedia flows
– Multimedia processing
• Function of each edge of the graph of media flows
http://www.kurento.org
12
Transport
Transcode
Record
13. Scalability of RTC multimedia services
“Broadcasting
Non-RTC”
http://www.kurento.org
13
Number of concurrent sessions
Number of users per session
WebRTC PaaS Phone system
TV
Broadcasting
CDNs
Media Server
based Services
“RTC calls”
“Home-made
RTC”
“Beyond RTC calls”
14. Scalability of RTC multimedia services
“Broadcasting
Non-RTC”
http://www.kurento.org
14
Number of concurrent sessions
Number of users per session
WebRTC PaaS Phone system
TV
Broadcasting
CDNs
Media Server
based Services
“RTC calls”
“Home-made
RTC”
“Beyond RTC calls”
15. The scalability problem in “call”
clouds
Call Call Call Call Call Call
Call Call Call Call Call Call
Call Call Call Call Call
16. Anatomy of WebRTC PaaS for call models:
Flat Architecture
Application Server
Broker Function
http://www.kurento.org
16
Load Balancer
Function
Function
IaaS Cloud Manager
Media Server
Function
Cloud Orchestrator
18. Cloud functions: Cloud
Orchestrator
Infrastructure as a Service APIs
Security
Management
http://www.kurento.org
18
IaaS Cloud Manager
Cloud
Orchestrator
• Function
Applica. on%Server%
%Func. on%
Broker%Func. on%
– Lifecycle management of the
Nubomedia platform
• It acquires virtual resources and
allocate them to the specific
services
– Runtime management with
autoscaling
• It instantiates new service
instances in situations of peak load
• It scales in service instances
whenever they are not required
any longer
• Requires
– Autoscaling rules
• Ex. If average load is over 60% add
two new instances
Image
Management
Computing
Management
Storage
Management
Networking
Management
Metrics and
KPIs
Load%Balancer%
Func. on%
IaaS%Cloud%Manager%
Media%Server%
Func. on%
Cloud%Orchestrator%
19. Media Server Function
http://www.kurento.org
19
Application
Server
Instance
Send
Receive
Analyze
Augment
Enrich
Media
Control
Protocol
Transform
Transcode
Record
Process
Replicate
Media Server Instance
• Function
%Func. on%
– Provides media
capabilities
Applica. on%Server%
• WebRTC transport
• Recording
• Transcoding
• Etc.
• Requires
– Control Protocol
– Media Protocols
– Media Codecs
Media
Server
Instance
Load%Balancer%
Func. on%
Broker%Func. on%
IaaS%Cloud%Manager%
Media%Server%
Func. on%
Cloud%Orchestrator%
20. Broker Function
http://www.kurento.org
20
Application
Server
Instance
Broker Function
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
• Function
Applica. on%Server%
%Func. on%
Broker%Func. on%
– Assigns “call” to specific media
server instances
• Give me a media server
instance to take care of this call
– “call” are never split among
media servers
• Requires
– Scheduling policy
• Round robing
• Random
• Less load
• Etc.
– Registration of MSis
• All media server instances need
to be known by the broker
Call Call
Load%Balancer%
Func. on%
IaaS%Cloud%Manager%
Media%Server%
Func. on%
Cloud%Orchestrator%
21. Application Server
Client request • Function
http://www.kurento.org
21
Signaling frontend
Security logic
API logic
Application Server Instance
– Signaling
Load%Balancer%
Func. on%
Applica. on%Server%
%Func. on%
IaaS%Cloud%Manager%
• Send/receive of signaling messages
– Security logic
• Authentication, Authorization,
Accounting
– API logic
• Control of media server functions
for providing API semantics
• Requires
– Signaling protocol
implementation
• SIP, JSON, etc.
– Security rules
• ACLs, CAP, etc.
– Specific logic
• Media server dependent
Broker%Func. on%
Media%Server%
Func. on%
Cloud%Orchestrator%
22. Load balancer
• Function
Applica. on%Server%
%Func. on%
Broker%Func. on%
– Distributes client requests
among available AS
instances
– Usually stateful
• Requires
– Balancing policy
• Round robin
• Random
• Less load
• Etc.
• Scaling needs
– Low
http://www.kurento.org
22
Client App.
Load Balancer Function
Application
Server
Instance
Client App. Client App.
Application
Server
Instance
Application
Server
Instance
Load%Balancer%
Func. on%
IaaS%Cloud%Manager%
Media%Server%
Func. on%
Cloud%Orchestrator%
23. The flat Nubomedia implementation
Application Server
Broker Function
http://www.kurento.org
23
Load Balancer
Function
Function
IaaS Cloud Manager
Media Server
Function
Cloud Orchestrator
24. Instance Lifecycle
Packer Open Stack Heat
http://www.kurento.org 24
OpenStack Glance
OpenStack Swift
Media Server
Image
Application
Server Image
Broker
Image
Load Balancer
Image
Heat Orchestration
Template
OpenStack Nova
Scalability
Group
Autoscaling
Rules
Launch
configurations
Scalability
Group
Scalability
Group
Scalability
Group
Load
Balancer
Instance
Application
Server
Instance
Application
Server
Instance
Broker
Instance
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
25. Scalability of RTC multimedia services
“Broadcasting
Non-RTC”
http://www.kurento.org
25
Number of concurrent sessions
Number of users per session
WebRTC PaaS Phone system
TV
Broadcasting
CDNs
Media Server
based Services
“RTC calls”
“Home-made
RTC”
“Beyond RTC calls”
26. Beyond calls: convergence of
broadcasting and phone-like services
http://www.kurento.org
26
Users in call Monitoring users
Users can dynamically
change their role
27. The scalability problem in “beyond
call” clouds
http://www.kurento.org
27
Media stream
One to MANY
28. Anatomy of WebRTC PaaS for call
models: Hierarchical Architecture
Application Server
Broker Function
http://www.kurento.org
28
Load Balancer
Function
Function
IaaS Cloud Manager
Media Server
Function
Cloud Orchestrator
29. Media Server Function
http://www.kurento.org
29
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
• Function
Load%Balancer%
Func. on%
Applica. on%Server%
%Func. on%
Broker%Func. on%
IaaS%Cloud%Manager%
– Provides elastics media
capabilities
• Strong dependencies
among media server
instances
• Media servers connect
following a specific
topology
• Requires
– Glue mechanism among
media server instances
Media%Server%
Func. on%
Cloud%Orchestrator%
30. The elastic media server
http://www.kurento.org
30
• Elasticity
Applica. on%Server%
%Func. on%
Broker%Func. on%
– On the number of media
pipelines
• Number of concurrent
sessions
– On the number of elements
per media pipeline
• Number of concurrent users
per session
– Media Pipeline
• Distributed media pipeline
• Rigidity
– The media element is a
monolithic (non distributed)
entity
Sink SRC
Sink SRC
Sink SRC
Sink
SRC
Sink SRC Sink SRC
Sink SRC
Load%Balancer%
Func. on%
IaaS%Cloud%Manager%
Media%Server%
Func. on%
Cloud%Orchestrator%
31. Broker Function
Server
Instance • Function
http://www.kurento.org
31
Application
Broker Function
Applica. on%Server%
%Func. on%
Broker%Func. on%
– Assigns “call legs” to specific
media server instances
• Give me a media server instance to
take care of this call
– “call” are split among different
media server instances
• Requires
– Scheduling policy
• Topology aware
• Network aware
• SLA aware
• Etc.
– Very complex problem
• Leg adding may require additional
media server instances
• Churn is very complex to manage
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
Media
Server
Instance
Load%Balancer%
Func. on%
IaaS%Cloud%Manager%
Media%Server%
Func. on%
Cloud%Orchestrator%
32. Hierarchical Nubomedia implementation:
Work in progress
Applica. on%Server%
Broker%Func. on%
http://www.kurento.org
32
Load%Balancer%
Func. on%
%Func. on%
IaaS%Cloud%Manager%
Media%Server%
Func. on%
Cloud%Orchestrator%
Own
implementation
33. Lessons learnt
• CAP theorem
– You cannot be available and consistent at the same time
• Implementing security
– ACLs are slow
• Poisson messages
– Managing failures is tricky
• Video streams are not like water streams
– FIRs & PLIs killed the cat
• Scaling out simpler than scaling in
– Move or wait?
• Managing video quality is THE PROBLEM
– Simulcast Vs Transcoding
http://www.kurento.org
33