© 2015 IBM Corporation
Wading through the Mobile WebRTC Developer Gauntlet
Brian Pulito Email: [email protected] Twitter: @brianpulito Linkedin: brianpulito
2
Introduction
This session discusses the importance of WebRTC in the mobile environment and what to consider when developing with WebRTC in your application.
AndroidApple
Mobile is ubiquitous
WebRTC is disruptive
3
Be Mobile First
Enterprise use of mobile technology is growing at 25% per year But most critical decisions still require a desktop computer
The average adult has 24 apps on their phone But spends 80% of their time on just 5 of them
The number of custom mobile apps will double compared to 2014 But 85% of companies have a mobile backlog of up to 20 apps
The average person has their mobile devices within arms reach 90% of the time But at any given time malicious code is infecting more than 11.6 million of them
Creating opportunity to reinvent the nature of work
Raising the stakes for real time relevant engagement
Making speed and agility more critical than ever
Making security as important as convenience
4
Use Case: WebRTC Unified Calling Service with Analytics
1) Dr. Jones attempts to initiate a video call with Dr. Smith through the hospital's WebRTC enabled web portal.
2) UC service tries Dr. Smith at home first because she provisioned her UC profile that way.
3) UC service completes call to Dr. Smith on her mobile device (using app with shoulder tap).
4) Doctor calls out to Analytics service to get specific questions/insights on problem being discussed
Unified Calling Service
Scenario: Doctors and nurses communicate over a hospital's IP network via a web portal enabled with WebRTC service. Real-time analytics provided as a call-in service.
5
Real-Time, Contextual Communication in appsSystems of Interactions
Contextless Communication using Individual applications
Contextual Communication with embedded WebRTC
• Mobile Audio/Video can be hard. WebRTC can make it easy.
• User experience is key. In app real time communications can enhance and simplify this experience through context.
6
• Getting WebRTC on mobile is not too hard, but there are challenges to consider:• Signaling for WebRTC• Security• Multi-platform development
Getting WebRTC on Mobile Platforms
• WebRTC is available to be built natively • There are cordova plugins that provide WebRTC (ex.
cordova.plugins.iosrtc)• No native browsers for mobile web* , though you can build
your own or use Ericsson’s Bowser Browser.
• WebRTC is available to be built natively • WebView provides access to WebRTC for Hybrid apps• Android Chrome provides WebRTC for mobile web
* Apple is slowly adding things: “Apple implements features of GetUserMedia and MediaStreams in the mac ports of webkits(Aug. 15th, 2015)”
7
• WebRTC does not provide a signaling standard • Provides means to connect two (or more) parties/services
Signaling
Peer to Peer Connection
Challenges
• Choosing a library vs. creating your own• Pub/sub vs. Sip over WebSockets• Web and Mobile portability• Hybrid vs. Native networking
• Sleeping devices and power consumption• Identifying available peers and services • WebRTC Island vs. Federation
?
8
• Authentication• Authorization• Identity verification• Encrypted Signaling • App authenticity (did you download the correct app and is it secure)
Challenges: • Enterprise Security Integration (LTPA, OAuth)• Access Control Lists and Identity Propagation• Need Mobile SDK/App Store Authority
Note: Browsers are moving to https only (no getUserMedia requests)
Security
9
• Developing for omni-channel• Native (iOS/Android), Hybrid and Web• Hybrid JavaScript frameworks
Challenges
• Native • Multiple codebases (UI and Signaling)• Building Native WebRTC OpenSource• Development Resources with native skills
• Hybrid• Framework selection• Performance• iOS WebRTC plugin support
• Testing • Automation due to lack of WebRTC support in emulators
• Future proofing your SDK decision
Multi-platform development
10
Hybrid Development
Native OS
Cordova Native Code & Native Plugin Code
Your Hybrid Application
cordova.js & plugin JavaScript APIs
HTML5/JavaScript in WebView• Apache Cordova(formerly PhoneGap)
provides native functionality via Plugins that expose a JavaScript API (Cordova has ~580 plugins)
• Single Page Applications are recommended (Can use any library like AngularJS, EmberJS, Backbone, ReactJS, jQuery Mobile, etc…)
• WebRTC functionality is provided by a plugin: cordova.plugins.iosrtc
• React Native enables developers to use JavaScript and React. • For additional native functionality, you must provide it yourself.• WebRTC plugin can be built from webrtchacks.com
Hybrid frameworks like Apache Cordova and React Native provide OS abstraction and allow developers to code in HTML5/JavaScript
11
• The quickest route with hybrid mobile is through a JavaScript framework. Some very different ones to consider are:
Hybrid Development – JavaScript mobile frameworks
Ionic is implemented on top of angular.js and uses cordova. WebRTC is provided via cordova.plugins.iosrtc.
React Native – Mobile environment using JavaScript and React. Build your own React Native WebRTC plugin from webrtchacks.com
• These provide a consistent UI look and feel as well as 3rd party plugins and modules to enable extended functionality.
• React Native is React specific
© 2015 IBM Corporation
z
Operations
Back-end
Mobile apps go deeper than front-end UI
Front-end
30% of the value and effort is visible (mobile UI)
70%
of the value and effort lies under the surface
Short time to market
Web? Hybrid? Native?
Teamwork
Industrialize app dev
Integrate with SDLC
Ensuring continued support in a quick-
changing landscape
Track problems that affect UX
Manage and enforce app
versions
Security Data
protection
Push upgrades
Malwaredetectio
n
Userauthenticatio
n
User engagementConnect to back-
endEfficient and flexible
push notifications
Offline availability
B2E app distribution
Track and leverage location
13
WebRTC Middleware for Mobile
CoturnOpen Source
STUN/TURN Server
Dialogic XMS Media Server
(Transcoding, Multiway, Record/Playback)
WebSphere Liberty
(Rtcomm Gateway, JSR 289 SIP Servlets)
Web/Signaling Proxy
(HTTP, SIP, WebSockets)
STUN/TURN Server
Sig Gateway, App Server.
Message Broker(SIP Servlets )
Media Processing Server
DMZ
SIP Services(Contact Center)
Media + ICE
JSR 309
Intranet
Media + ICE
Media Relay
HTTP/REST
Signaling
HTTP/REST
WebRTC Middleware
Signaling
AnalyticsServices
Systems of Record
Enterprise IMS Core
Microservices
Business Services
Mobile Notifications
Push
14
• Think Mobile First• Future proofing (Frameworks/SDKs/Open Source)• Hybrid vs Native• Omni-channel perspective• Middleware
Conclusions
To learn more visit: www.wasdev.net/webrtc
1515