Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
-
Upload
telestax -
Category
Technology
-
view
1.844 -
download
0
description
Transcript of Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Boost JBoss AS7 with HTML5 WebRTC for Real
Time CommunicationsJean Deruelle
November 2012
Agenda
● HTML5 WebRTC Demo
● What's HTML5 WebRTC anyway ?
● JBoss AS7 HTML5 WebRTC Support with Mobicents
● Q&A
Your 5 minutes of fame !
What's anyway ?
Mission Statement
● WebRTC is a free, open project that enables web browsers with Real-Time Communications (RTC) capabilities via simple Javascript APIs.
● Think rich, high quality, RTC applications in the browser via simple Javascript APIs and HTML5 without plugin
● The WebRTC initiative is a project supported by
Developer Stance
Defines a set of Media and Data JavaScript APIs to bring VoIP natively to the browser and cross platforms :
● GetUserMedia (camera and microphone access)
● PeerConnection(sending and receiving media)
● DataChannels (sending non-media direct between browsers)
Architecture
HTML5 WebRTC Signaling and Media
• WebRTC is independent of WebSockets
• Can use anything for call control signaling including Ajax, server push or plain HTTP
• Media is peer to peer and can handle both audio and video (RTCWeb)
Call Control Call Control
Relation to VoIP
Browser Support Today ?● Supported out of the box in Google Chrome 23, ● support coming to Chrome Mobile in 2013
● nightly builds support WebRTC, should be stable in ● the next couple months
● not supporting WebRTC but Microsoft made its own ● WebRTC proposal “CU-RTC-Web” (Customizable, Ubiquitous Real Time Communication over the Web) but available through Google Frame
not supporting WebRTC yet but Opera Mobile support access to Video and Camera
● launched a new Mobile Browser called Bowser with support for WebRTC, trying to push H.264 vs VP8 video codec
● Support has more concerns : Browsers, SDK, Native APIs
?
What is ?
The Approach
Web / MobileApplicationDeveloper
From Legacy PSTN to Cloud Communications
HTML5 WebRTC Integration
Goal
● Since WebRTC = VoIP, makes sense to support in the largest Open Source Communication Platform, no ?
● Handle large number of concurrent connections
● Allow Interop with existing VoIP or Telco Infrastructure● Since WebRTC doesn't define the call control signaling, choice
was to use SIP as signaling protocol (there is a draft for that)
What is SIP ?● Stands for Session Initiation Protocol, protocol of choice for VoIP and all IP based networks (LTE, 4G networks)● VoIP Call consists of 2 parts :
● Call Control (SIP)● Negotiates RTP parameters (through SDP)● Authentication
● Media (RTP) – carries audio stream in small packets
Call Flow
WebSockets
SIP Over WebSockets Typical Flow
• Regular HTTP request with Upgrade header• Switch to normal modeo No HTTP any more, just plain subprotocolo ..except it's masked so plaintext can't be
misinterpreted and avoid security issues• SIP Messages carried in WebSocket Data • New SIP Transports : WS or WSS (for Secure
using TLS)
http://tools.ietf.org/html/draft-ietf-sipcore-sip-websocket-06 : Still a draft
SIP INVITE
200 OK
Server Side Awesomeness
JBoss AS7 Adds-Ons
• Automatically adds WebSocket support to any JAIN SIP based server (SIP Stack used by Mobicents and Google Android 2.3+)o SIP Servlets http://dev.telestax.com/sipservlets/o SIP Stack http://dev.telestax.com/jain-sip/
Implemented on top of NIO
•WebSockets phones need a TCP/TLS connection to be alive even when not in a call. This connection cannot die otherwise the phone can't receive calls.
•NIO is great for TCP/TLSoTCP/TLS SIP sockets do not require separate Threads
as Threads are expensive (3K threads easily crash server machines just by themselves)
•The architecture accommodates both NIO and Blocking IO nicely
• No but next revision of SIP Servlets
Specification (JSR 359) will support it.
• Deliver support for reusable Converged Web and Real Time Communications Applications
• RTC Applications can leverage Java EE6 Technologies and Standards all the way
• Existing Applications can adds RTC Capabilities easily
WebRTC Support In Java EE7 ?
Client Side Coolness
SIP JavaScript Stack
•JavaScript Framework allowing HTML5 Applications to that handle Call Control (SIP) in the Browser
•Contributed by
SIP JavaScript StackStill ugly (to web developers) Low Level SIP details for now but working on higher abstractions, ie 1 liner import and 1 liners to place call, reject, hangup etc
Future Work
It's Only the Beginning
More Features to Add ● Chat● File Sharing● Tab Sharing● Music Sharing● Screen Sharing● Presence● Location● Social Network Integration● …
It's Open Source... Help yourself, Contribute !