58
Future of Web Apps Boston 2014 Oct 28, 2014 Lisa Larson-Kelley LearnFromLisa.com @lisamarienyc http://bit.ly/fowawebrtc Real-time Communication – for Everyone!

Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

Embed Size (px)

Citation preview

Page 1: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Future of Web Apps Boston 2014 Oct 28, 2014 !

Lisa Larson-Kelley LearnFromLisa.com @lisamarienyc http://bit.ly/fowawebrtc

Real-time Communication – for Everyone!

Page 2: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

What is WebRTC?

WebRTC

Page 3: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Communication.

Page 4: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Page 5: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014 Photo: @trevorcummings

Page 6: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014 Photo: @taylorherring

Page 7: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014 Photo: @NASA

Page 8: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Enter, WebRTC.

WebRTC

Page 9: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

It’s going to be “in”

all the things.

Page 10: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

What is WebRTC?

Page 11: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Amazon Kindle Mayday Button

Page 12: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Google ChromeCast

Google ChromeCast

Page 13: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Cystic Fibrosis e-Health & Telemonitoring Program

Page 14: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

appear.in/lisa

Page 15: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

chromeexperiments.com/detail/face-substitution/

Page 16: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

WebRTC, all the parts

Page 17: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

The full WebRTC environment

Web Servers

PSTN Gateway

Jingle Client

Tablet

Mobile Phone

Phone

PSTN

Laptop PC

SIP Client

Other Servers

WebRTC

Page 18: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

MediaStreamRTCDataChannel

RTCPeerConnection

WebRTC

Page 19: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Get connected using WebRTC

signaling server

!HTTP, Websockets, or ??

webpage [HTML / JS]

1) Initialize

Page 20: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Get connected using WebRTC

webpage [HTML / JS]

webpage [HTML / JS]

signaling server

!HTTP, Websockets, or ??

1) Initialize

2) Exchange client info

Page 21: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

webpage [HTML / JS]

webpage [HTML / JS]

Get connected using WebRTC

signaling server

!HTTP, Websockets, or ??

1) Initialize

2) Exchange client info

3) Communicate!

Page 22: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Signaling options

+ +

Page 23: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Get connected using WebRTC

webpage [HTML / JS]

webpage [HTML / JS]

Trying to…

Page 24: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

1) Initialize and introduce (signaling)

2) Exchange client info

3) NAT traversal via STUN / TURN servers

4) Communicate!

Page 25: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Why do we need servers with WebRTC?

I was promised peer-to-peer!

Page 26: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

STUN

Introducing STUN, TURN and ICE

ICE

TURN

Page 27: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Establishing Peer Connections: An Overview

192.168.0.3 225.35.6.2.188

192.168.0.3 = 225.35.6.2.188

192.168.0.4 = 225.35.6.2.189

192.168.0.5 = 225.35.6.2.190

192.168.0.6 = 225.35.6.2.191

Respond to 192.168.0.3

Page 28: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

How STUN servers work

“Hey, what’s my external IP address?”

“My IP address is 41.19.4.1.255”

STUNYour external IP Address is

225.35.6.2.188

“My IP address is 225.35.6.2.188Peer-to-Peer Connection

Page 29: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

How STUN servers work (sometimes…)

Peer-to-Peer

Page 30: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

How TURN works

TURN

Jane’s data Jane’s data

John’s dataJohn’s data

Page 31: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Interactive Connectivity Establishment (ICE)

STUN TURN

ICE

Page 32: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Interactive Connectivity Establishment (ICE)

STUN

TURN

ICESTUN

SUCCESS!

Page 33: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Al…most… there….

MYTHs

BUSTED!

@lisamarienyc | LearnFromLisa.com

Page 34: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Opaque (unless you’re a telecom engineer)

BUSTED!

Page 35: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Not well documented

BUSTED!

Page 36: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Doesn’t work in IE or Safari, so why bother?

(No video on the iPad, revisited)(sorta) BUSTED!

Page 37: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Browser support today…

DESKTOP

MOBILE

IsWebRTCReadyYet.com+ Skype team

announcement 10/27/14 – 

it’s coming!

Page 38: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

What about this competingORTC thing?

BUSTED!

Page 39: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

The SDP debate…

http://www.w3.org/community/ortc/

Page 40: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

is object-oriented.

Page 41: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014 @lisamarienyc | LearnFromLisa.com

Page 42: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

"It's kind of fun to do the impossible."

- Walt Disney

@lisamarienyc | LearnFromLisa.com

WebRTC

Page 43: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

How to get started

Page 44: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

What do you need?

✓Core programming skills

✓ HTML, CSS and

JavaScript

✓Your preferred HTML editor

✓Webcam and microphone

✓ Latest build of

Chrome or

Firefox

Page 45: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Use services / libraries

STUN TURN

Page 46: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

§Instant free video conferencing ๏ apprtc.appspot.com ๏ AddLive.com ๏ Vline.com ๏ Vsee.com (free and premium) ๏ (and more every day!)

Some ready-to-use services

bit.ly/fowawebrtc

Page 47: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

§WebRTC services and platforms ๏ Tokbox.com Open Tok platform ๏ Appear.in ๏ Vidyo.com ๏ rtc.io ๏ Xirsys.com hosted server

infrastructure

Some ready-to-use services

Low cost for developers! appear.in

$200-400/mo. entire infrastructure amazon web services

$1500/mo to ramp up now don’t need dedicated hardware/software

Page 48: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

The DIY approach

STUN TURN

Page 49: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Prebuilt frameworks – Telephony

‣Phono - Open source JavaScript phone API

‣sipML5 - Open source JavaScript SIP client

‣FreeSWITCH - Scalable open source cross-platform service

Page 50: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

‣PeerJS

‣SimpleWebRTC

‣easyRTC

‣webRTC.io

‣RTC.io (node toolbox)

Prebuilt frameworks – Web

Page 51: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

SimpleWebRTC is simple.

Page 52: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

SimpleWebRTC is simple.

Page 53: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

§ Simplest possible API demos § HTML5Rocks tutorials § Video chat: apprtc.appspot.com

(with source code) § webrtc-experiment.com - Muaz Khan § http://webrtcbook.com - Alan Johnston and Daniel Burnett § And more!

Resources

http://bit.ly/lisa-rtc

Page 54: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Potential of WebRTC

6.2 billion by 2018

Financial ServicesHealthcare Insurance

Page 55: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Speaking Exchange Created by FCB BRASIL

Powered by WebRTC

Page 56: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Communication

Page 57: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

Communication Connection= Photo: @Popicinio

Page 58: Real-time Communication on the Web, For Everyone! (Lisa Larson-Kelley)

@lisamarienyc | LearnFromLisa.comFOWA Boston 2014

@lisamarienyc | LearnFromLisa.com bit.ly/learnwebrtc

Thank you.

Welcome to the new frontier of real-time communication on the web!

bit.ly/fowawebrtc