+ All Categories
Home > Engineering > Janus: an open source and general purpose WebRTC (gateway) server

Janus: an open source and general purpose WebRTC (gateway) server

Date post: 12-Apr-2017
Category:
Upload: devday
View: 255 times
Download: 0 times
Share this document with a friend
76
DevDay L. Miniero Intro WebRTC Standardization Janus Modules and APIs Deploying Troubleshooting Examples A few examples Next steps Janus: an open source and general purpose WebRTC gate way (application) server Lorenzo Miniero @elminiero 25 th January 2017, DevDay Napoli
Transcript
Page 1: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Janus: an open source and general purposeWebRTC gateway (application) server

Lorenzo Miniero@elminiero

25th January 2017, DevDay Napoli

Page 2: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Outline

1 A brief introduction

2 Some contextWebRTC and standardization activities

3 Janus: a general purpose WebRTC gateway (application) serverModular architecture: plugins and APIsDeploying Janus: a few possible topologiesMonitoring and troubleshooting

4 Some practical examplesWhat is Janus used for today, and by whom?

5 Next steps

Page 3: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What’s Meetecho?

• Co-founded in 2009 as an academic spin-off• University research efforts brought to the market

• Recently got my Ph.D @ UniNA

• Proudly brewed in sunny Napoli(*), Italy

• Focus on real-time multimedia applications• Web conferencing only, at first• Then widened the scope to multimedia in general• Strong perspective on standardization and open source

• WebRTC rulez!

• Several activities• Consulting services• Commercial support & licenses• Streaming of live events (e.g., IETF, ACM SIGCOMM, ...)• Products (conferencing, webinar, ...)

Page 4: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What’s Meetecho?

• Co-founded in 2009 as an academic spin-off• University research efforts brought to the market

• Recently got my Ph.D @ UniNA

• Proudly brewed in sunny Napoli(*), Italy

• Focus on real-time multimedia applications• Web conferencing only, at first• Then widened the scope to multimedia in general• Strong perspective on standardization and open source

• WebRTC rulez!

• Several activities• Consulting services• Commercial support & licenses• Streaming of live events (e.g., IETF, ACM SIGCOMM, ...)• Products (conferencing, webinar, ...)

Page 5: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What’s Meetecho?

• Co-founded in 2009 as an academic spin-off• University research efforts brought to the market

• Recently got my Ph.D @ UniNA

• Proudly brewed in sunny Napoli(*), Italy

• Focus on real-time multimedia applications• Web conferencing only, at first• Then widened the scope to multimedia in general• Strong perspective on standardization and open source

• WebRTC rulez!

• Several activities• Consulting services• Commercial support & licenses• Streaming of live events (e.g., IETF, ACM SIGCOMM, ...)• Products (conferencing, webinar, ...)

Page 6: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

((*)“I can see your house, from here”)

Page 7: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Ok, ok, enough about you... what’s WebRTC about?

• Real-time media in a browser• Up to some time ago, no standard solution!

• No interoperability• Plugins needed to be installed anyway

WebRTC = Joint standardization efforts• Internet Engineering Task Force (IETF)• World Wide Web Consortium (W3C)

• RTCWEB (IETF)• Real-Time Communication in WEB browsers WG• Defines protocols and formats to use

• WEBRTC (W3C)• Web Real-Time Communications WG• Defines UI and API to access devices

Page 8: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Ok, ok, enough about you... what’s WebRTC about?

• Real-time media in a browser• Up to some time ago, no standard solution!

• No interoperability• Plugins needed to be installed anyway

WebRTC = Joint standardization efforts• Internet Engineering Task Force (IETF)• World Wide Web Consortium (W3C)

• RTCWEB (IETF)• Real-Time Communication in WEB browsers WG• Defines protocols and formats to use

• WEBRTC (W3C)• Web Real-Time Communications WG• Defines UI and API to access devices

Page 9: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Ok, ok, enough about you... what’s WebRTC about?

• Real-time media in a browser• Up to some time ago, no standard solution!

• No interoperability• Plugins needed to be installed anyway

WebRTC = Joint standardization efforts• Internet Engineering Task Force (IETF)• World Wide Web Consortium (W3C)

• RTCWEB (IETF)• Real-Time Communication in WEB browsers WG• Defines protocols and formats to use

• WEBRTC (W3C)• Web Real-Time Communications WG• Defines UI and API to access devices

Page 10: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

WebRTC reference architecture

Page 11: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

The WebRTC protocol suite

Page 12: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

The WebRTC protocol suite

• Signalling (well, sort of) and Negotiation• Javascript Session Establishment Protocol (JSEP)• Session Description Protocol (SDP) adaptation

• Connection Establishment and NAT Traversal• Session Traversal Utilities for NAT (STUN)• Traversal Using Relay NAT (TURN)• Interactive Connectivity Establishment (ICE)

• Media Transport and Control• Real-time Transport (and Control) Protocol (RTP/RTCP)• Secure Extensions to RTP (SRTP)• Datagram Transport Layer Security (DTLS)

• Multimedia codecs• Opus audio codec (MTI, Mandatory-to-implement)• VP8 and H.264 video codecs (MTI, Mandatory-to-implement)

• Generic Data• WebRTC Data Channels (SCTP)

Page 13: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

The WebRTC protocol suite

• Signalling (well, sort of) and Negotiation• Javascript Session Establishment Protocol (JSEP)• Session Description Protocol (SDP) adaptation

• Connection Establishment and NAT Traversal• Session Traversal Utilities for NAT (STUN)• Traversal Using Relay NAT (TURN)• Interactive Connectivity Establishment (ICE)

• Media Transport and Control• Real-time Transport (and Control) Protocol (RTP/RTCP)• Secure Extensions to RTP (SRTP)• Datagram Transport Layer Security (DTLS)

• Multimedia codecs• Opus audio codec (MTI, Mandatory-to-implement)• VP8 and H.264 video codecs (MTI, Mandatory-to-implement)

• Generic Data• WebRTC Data Channels (SCTP)

Page 14: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

WebRTC reference architecture (again)

Page 15: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Involving a gateway/server (and applications)

Page 16: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Involving different technologies as well

“What is a WebRTC Gateway anyway?”• https://webrtchacks.com/webrtc-gw/

Page 17: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Involving different technologies as well

“What is a WebRTC Gateway anyway?”• https://webrtchacks.com/webrtc-gw/

Page 18: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Janus: a general purpose WebRTC gateway server

“In ancient Roman religion andmyth, Janus [..] is the god ofbeginnings and transitions, andthereby of gates, doors, passages,endings and time. He is usuallydepicted as having two faces, sincehe looks to the future and to thepast.”

— http://en.wikipedia.org/wiki/Janus

Page 19: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Janus: a general purpose WebRTC gateway server

• A door between the communications past and future• Legacy technologies (the “past”)• WebRTC (the “future”)

JanusGeneral purpose, open source WebRTC gateway• https://github.com/meetecho/janus-gateway• Demos and documentation: https://janus.conf.meetecho.com• Community: https://groups.google.com/forum/#!forum/meetecho-janus

Page 20: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Modular architecture

• The core only implements the WebRTC stack• JSEP/SDP, ICE, DTLS-SRTP, Data Channels, ...

• Plugins expose Janus API over different transports• Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT (new!)

• “Application” logic implemented in plugins too• Users attach to plugins via the Janus core• The core handles the WebRTC stuff• Plugins route/manipulate the media/data

• Some proof of concept plugins implemented• Echo Test• Streaming (→ Plain RTP to WebRTC!)• Video Room (→ Selective Forwarding Unit!)• SIP Gateway (→ “Legacy” SIP!)• ...

Page 21: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Modular architecture

• The core only implements the WebRTC stack• JSEP/SDP, ICE, DTLS-SRTP, Data Channels, ...

• Plugins expose Janus API over different transports• Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT (new!)

• “Application” logic implemented in plugins too• Users attach to plugins via the Janus core• The core handles the WebRTC stuff• Plugins route/manipulate the media/data

• Some proof of concept plugins implemented• Echo Test• Streaming (→ Plain RTP to WebRTC!)• Video Room (→ Selective Forwarding Unit!)• SIP Gateway (→ “Legacy” SIP!)• ...

Page 22: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Modular architecture

• The core only implements the WebRTC stack• JSEP/SDP, ICE, DTLS-SRTP, Data Channels, ...

• Plugins expose Janus API over different transports• Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT (new!)

• “Application” logic implemented in plugins too• Users attach to plugins via the Janus core• The core handles the WebRTC stuff• Plugins route/manipulate the media/data

• Some proof of concept plugins implemented• Echo Test• Streaming (→ Plain RTP to WebRTC!)• Video Room (→ Selective Forwarding Unit!)• SIP Gateway (→ “Legacy” SIP!)• ...

Page 23: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Modular architecture

• The core only implements the WebRTC stack• JSEP/SDP, ICE, DTLS-SRTP, Data Channels, ...

• Plugins expose Janus API over different transports• Currently HTTP / WebSockets / RabbitMQ / Unix Sockets / MQTT (new!)

• “Application” logic implemented in plugins too• Users attach to plugins via the Janus core• The core handles the WebRTC stuff• Plugins route/manipulate the media/data

• Some proof of concept plugins implemented• Echo Test• Streaming (→ Plain RTP to WebRTC!)• Video Room (→ Selective Forwarding Unit!)• SIP Gateway (→ “Legacy” SIP!)• ...

Page 24: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Extensible Architecture and API

Page 25: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Extensible Architecture and API

Page 26: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Plugins as “bricks”

• Each plugin is a feature, not an application

• Application can be composed out of different features• Features as “bricks” for a complex scenario

• A few examples...• Multimedia conferencing with PSTN support

• Video Room (participants video & screen) + SIP (participants audio)

• Webinar with Q&A

• Video Room (screen) + Video Room (speakers) + Audio Bridge (questions)

• Social TV

• Streaming (TV channel) + Video Room (interaction)

• Contact center / Communication in social networks

• SIP plugin (calls) + Echo Test (diagnostics) + Record & Play (messaging)

Page 27: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Plugins as “bricks”

• Each plugin is a feature, not an application

• Application can be composed out of different features• Features as “bricks” for a complex scenario

• A few examples...• Multimedia conferencing with PSTN support

• Video Room (participants video & screen) + SIP (participants audio)

• Webinar with Q&A

• Video Room (screen) + Video Room (speakers) + Audio Bridge (questions)

• Social TV

• Streaming (TV channel) + Video Room (interaction)

• Contact center / Communication in social networks

• SIP plugin (calls) + Echo Test (diagnostics) + Record & Play (messaging)

Page 28: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Webinar with Q/A

Page 29: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Social TV

Page 30: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

How do I...

• ... use Janus in my web app?• JavaScript library available (janus.{nojquery.}js)

• https://janus.conf.meetecho.com/docs/JS• You can use HTTP or WebSockets transports• Several demos available to start from

• ... use Janus, but keeping my API?• Wrap the Janus API on the server side

• https://janus.conf.meetecho.com/docs/rest• https://janus.conf.meetecho.com/docs/resources

• Effective way to control what users can do• Also helps to orchestrate pool of Janus servers

• ... and allows you to use RabbitMQ, MQTT and UnixSockets transports

• ... ask questions, report issues, contribute, or do this/that?• https://git.io/v2hWD (contributing guidelines)• https://groups.google.com/forum/#!forum/meetecho-janus• https://janus.conf.meetecho.com/docs/FAQ

Page 31: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

How do I...

• ... use Janus in my web app?• JavaScript library available (janus.{nojquery.}js)

• https://janus.conf.meetecho.com/docs/JS• You can use HTTP or WebSockets transports• Several demos available to start from

• ... use Janus, but keeping my API?• Wrap the Janus API on the server side

• https://janus.conf.meetecho.com/docs/rest• https://janus.conf.meetecho.com/docs/resources

• Effective way to control what users can do• Also helps to orchestrate pool of Janus servers

• ... and allows you to use RabbitMQ, MQTT and UnixSockets transports

• ... ask questions, report issues, contribute, or do this/that?• https://git.io/v2hWD (contributing guidelines)• https://groups.google.com/forum/#!forum/meetecho-janus• https://janus.conf.meetecho.com/docs/FAQ

Page 32: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

How do I...

• ... use Janus in my web app?• JavaScript library available (janus.{nojquery.}js)

• https://janus.conf.meetecho.com/docs/JS• You can use HTTP or WebSockets transports• Several demos available to start from

• ... use Janus, but keeping my API?• Wrap the Janus API on the server side

• https://janus.conf.meetecho.com/docs/rest• https://janus.conf.meetecho.com/docs/resources

• Effective way to control what users can do• Also helps to orchestrate pool of Janus servers

• ... and allows you to use RabbitMQ, MQTT and UnixSockets transports

• ... ask questions, report issues, contribute, or do this/that?• https://git.io/v2hWD (contributing guidelines)• https://groups.google.com/forum/#!forum/meetecho-janus• https://janus.conf.meetecho.com/docs/FAQ

Page 33: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

A few possible topologies

Page 34: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

A few possible topologies

Page 35: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

A few possible topologies

Page 36: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

A few possible topologies

Page 37: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

A few possible topologies

Page 38: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

A few possible topologies

Page 39: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

A few possible topologies

Page 40: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Anything wrong? Check the Admin API!

• Requests/response API to interrogate Janus• Query server capabilities• Control some aspects (e.g., enable/disable debugging)• Inspect handles and WebRTC “internals”

• What about asynchronous events? More on that in a minute!

http://www.meetecho.com/blog/understanding-the-janus-admin-api/

Page 41: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

An asynchronous approach to monitoring/troubleshooting

• Admin API is cool, but is request/response...• What about an asynchronous approach?

• A new mechanism: Event Handlers• Core and plugins generate events• Custom modules can subscribe to and handle them

• e.g., save to DB, send to external service, CDR, etc.• Sample Event Handler forwards JSON events via HTTP

• Learning more with practical examples (node.js + DB)• http://www.meetecho.com/blog/event-handlers-a-practical-example/• http://www.meetecho.com/blog/correlating-janus-event-handlers/

• A couple of potentially interesting integrations• Homer/HEP (originally conceived for SIP calls)• Live stats collection via callstats.io

Page 42: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

An asynchronous approach to monitoring/troubleshooting

• Admin API is cool, but is request/response...• What about an asynchronous approach?

• A new mechanism: Event Handlers• Core and plugins generate events• Custom modules can subscribe to and handle them

• e.g., save to DB, send to external service, CDR, etc.• Sample Event Handler forwards JSON events via HTTP

• Learning more with practical examples (node.js + DB)• http://www.meetecho.com/blog/event-handlers-a-practical-example/• http://www.meetecho.com/blog/correlating-janus-event-handlers/

• A couple of potentially interesting integrations• Homer/HEP (originally conceived for SIP calls)• Live stats collection via callstats.io

Page 43: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

An asynchronous approach to monitoring/troubleshooting

• Admin API is cool, but is request/response...• What about an asynchronous approach?

• A new mechanism: Event Handlers• Core and plugins generate events• Custom modules can subscribe to and handle them

• e.g., save to DB, send to external service, CDR, etc.• Sample Event Handler forwards JSON events via HTTP

• Learning more with practical examples (node.js + DB)• http://www.meetecho.com/blog/event-handlers-a-practical-example/• http://www.meetecho.com/blog/correlating-janus-event-handlers/

• A couple of potentially interesting integrations• Homer/HEP (originally conceived for SIP calls)• Live stats collection via callstats.io

Page 44: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

An asynchronous approach to monitoring/troubleshooting

• Admin API is cool, but is request/response...• What about an asynchronous approach?

• A new mechanism: Event Handlers• Core and plugins generate events• Custom modules can subscribe to and handle them

• e.g., save to DB, send to external service, CDR, etc.• Sample Event Handler forwards JSON events via HTTP

• Learning more with practical examples (node.js + DB)• http://www.meetecho.com/blog/event-handlers-a-practical-example/• http://www.meetecho.com/blog/correlating-janus-event-handlers/

• A couple of potentially interesting integrations• Homer/HEP (originally conceived for SIP calls)• Live stats collection via callstats.io

Page 45: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Stressing Janus: Jattack!

• Jattack = Janus Attack (or J’attacque ,)• Controllable (via WebSockets) WebRTC client stack• Allows dynamic creation/monitoring of tons of WebRTC PeerConnections

• Still WIP, but already in a usable state• Presented at IPTComm in Chicago just a few months ago!

Page 46: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What is Janus used for today, and by whom?

• We use it ourselves for many things (obviously)• Web conferencing and Webinars• WebRTC-to-SIP gateway• Streaming of live events (e.g., IETF meetings)

• Many folks/companies also using it in creative ways!• E-learning• Coworking• Contact centers• TV broadcasting and Social TV• Surveillance systems• E-health• Home automation & Internet of Things• Mobile devices, Raspberry Pis, drones, etc.

• New third-party tools are starting to come out• https://janus.conf.meetecho.com/docs/resources

Page 47: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What is Janus used for today, and by whom?

• We use it ourselves for many things (obviously)• Web conferencing and Webinars• WebRTC-to-SIP gateway• Streaming of live events (e.g., IETF meetings)

• Many folks/companies also using it in creative ways!• E-learning• Coworking• Contact centers• TV broadcasting and Social TV• Surveillance systems• E-health• Home automation & Internet of Things• Mobile devices, Raspberry Pis, drones, etc.

• New third-party tools are starting to come out• https://janus.conf.meetecho.com/docs/resources

Page 48: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What is Janus used for today, and by whom?

• We use it ourselves for many things (obviously)• Web conferencing and Webinars• WebRTC-to-SIP gateway• Streaming of live events (e.g., IETF meetings)

• Many folks/companies also using it in creative ways!• E-learning• Coworking• Contact centers• TV broadcasting and Social TV• Surveillance systems• E-health• Home automation & Internet of Things• Mobile devices, Raspberry Pis, drones, etc.

• New third-party tools are starting to come out• https://janus.conf.meetecho.com/docs/resources

Page 49: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Streaming IETF meetings: the “director” room

Remote participation completely WebRTC-based• Slides as a video feed from the beamer• Static video feed from the room• Dynamic video feeds for remote speakers

Page 50: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Meetecho: IETF meeting example

https://ietf.org/meeting/remote-participation.html

Page 51: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Meetecho: IETF meeting example

https://ietf.org/meeting/remote-participation.html

Page 52: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Meetecho: IETF meeting example

https://ietf.org/meeting/remote-participation.html

Page 53: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Meetecho: IETF recordings

https://www.youtube.com/user/ietf

Page 54: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

A “silly” use case: The Jumping Sumo!

https://www.youtube.com/watch?v=isGSnMlKcss

Page 55: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

A “silly” use case: The Jumping Sumo!

https://www.youtube.com/watch?v=isGSnMlKcss

Page 56: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

“Matrix wins Best of Show at WebRTC World!”

https://www.youtube.com/watch?v=OMzDklvDS3c

Page 57: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

“Matrix wins Best of Show at WebRTC World!”

https://www.youtube.com/watch?v=NpBStIIq6fM

Page 58: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Jangouts (for "Janus Hangouts" ,)

https://github.com/jangouts/jangouts

Page 59: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

SylkServer (SIP/XMPP Application Server)

http://sylkserver.com/

Page 60: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

SylkServer (SIP/XMPP Application Server)

http://sylkserver.com/

Page 61: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Slack (team co-working)

https://webrtchacks.com/dear-slack/https://webrtchacks.com/slack-webrtc-slacking/

https://slack.engineering/calls-is-it-you-or-is-it-me-f5d36749e8edhttps://webrtchacks.com/slack-video/

Page 62: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Mattermost (team co-working)

https://docs.mattermost.com/deployment/webrtc.htmlhttps://github.com/mattermost/mattermost-webrtc

Page 63: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Beam (videogame streaming)

https://beam.pro/https://github.com/WatchBeam/ftl-sdk

Page 64: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Lenovo’s AirClass (e-learning)

https://www.airclass.com

Page 65: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Sqwiggle / Speak.io (team co-working)

https://www.sqwiggle.comhttps://speak.io

Page 66: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Sqwiggle / Speak.io (team co-working)

https://www.sqwiggle.comhttps://speak.io

Page 67: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Veeting rooms (web conferencing)

https://www.veeting.com

Page 68: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

AliceX (let’s call it “virtual reality” ,)

https://www.alicex.com

Page 69: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What to do next?

• Finalize the WebRTC implementation

• Work on effective renegotiation (ICE restarts almost ready)

• Implement multistream (Unified Plan)

• Keep on improving and fixing things

• Code cleanup, reference counters, new modules, ...

• A monitoring/troubleshooting framework on top of Event Handlers

• Test Test Test!

• Jattack will greatly help here

Help us improve this!• Play with it, more testing is important• Write your own applications/wrappers/plugins!

Page 70: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What to do next?

• Finalize the WebRTC implementation

• Work on effective renegotiation (ICE restarts almost ready)

• Implement multistream (Unified Plan)

• Keep on improving and fixing things

• Code cleanup, reference counters, new modules, ...

• A monitoring/troubleshooting framework on top of Event Handlers

• Test Test Test!

• Jattack will greatly help here

Help us improve this!• Play with it, more testing is important• Write your own applications/wrappers/plugins!

Page 71: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What to do next?

• Finalize the WebRTC implementation

• Work on effective renegotiation (ICE restarts almost ready)

• Implement multistream (Unified Plan)

• Keep on improving and fixing things

• Code cleanup, reference counters, new modules, ...

• A monitoring/troubleshooting framework on top of Event Handlers

• Test Test Test!

• Jattack will greatly help here

Help us improve this!• Play with it, more testing is important• Write your own applications/wrappers/plugins!

Page 72: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

What to do next?

• Finalize the WebRTC implementation

• Work on effective renegotiation (ICE restarts almost ready)

• Implement multistream (Unified Plan)

• Keep on improving and fixing things

• Code cleanup, reference counters, new modules, ...

• A monitoring/troubleshooting framework on top of Event Handlers

• Test Test Test!

• Jattack will greatly help here

Help us improve this!• Play with it, more testing is important• Write your own applications/wrappers/plugins!

Page 73: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Next events

• FOSDEM 2017

• February 4-5, Bruxelles (Belgium)• Talk on Event Handlers in Real-Time devroom on the 4th, 17:10

• https://fosdem.org/2017/schedule/track/real_time_communications/

• WebRTC Stockholm

• February 16, Stockholm (Sweden)• Talk on how we provide remote participation at the IETF with WebRTC

• https://www.meetup.com/WebRTC-Stockholm/

• IETF 98

• March 26-31, Chicago (USA)• No talk, just hard work!!

• https://www.ietf.org/meeting/98/

Page 74: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Next events

• FOSDEM 2017

• February 4-5, Bruxelles (Belgium)• Talk on Event Handlers in Real-Time devroom on the 4th, 17:10

• https://fosdem.org/2017/schedule/track/real_time_communications/

• WebRTC Stockholm

• February 16, Stockholm (Sweden)• Talk on how we provide remote participation at the IETF with WebRTC

• https://www.meetup.com/WebRTC-Stockholm/

• IETF 98

• March 26-31, Chicago (USA)• No talk, just hard work!!

• https://www.ietf.org/meeting/98/

Page 75: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Next events

• FOSDEM 2017

• February 4-5, Bruxelles (Belgium)• Talk on Event Handlers in Real-Time devroom on the 4th, 17:10

• https://fosdem.org/2017/schedule/track/real_time_communications/

• WebRTC Stockholm

• February 16, Stockholm (Sweden)• Talk on how we provide remote participation at the IETF with WebRTC

• https://www.meetup.com/WebRTC-Stockholm/

• IETF 98

• March 26-31, Chicago (USA)• No talk, just hard work!!

• https://www.ietf.org/meeting/98/

Page 76: Janus: an open source and general purpose WebRTC (gateway) server

DevDay

L. Miniero

Intro

WebRTCStandardization

JanusModules and APIs

Deploying

Troubleshooting

ExamplesA few examples

Next steps

Questions?

@elminiero@meetecho


Recommended