SlideShare a Scribd company logo
1 of 62
Download to read offline
Troubleshooting and monitoring Janus:
a HEPIC journey!
Lorenzo Miniero
@elminiero
OpenSIPS Summit
2nd May 2018,
“Which Lorenzo are you, exactly?”
You may remember me from “Revenge of
the Mutant Janus Instances” (not really...)
No, seriously, remember Janus?
• General purpose, open source WebRTC server
• https://github.com/meetecho/janus-gateway
• Demos and documentation: https://janus.conf.meetecho.com
• Community: https://groups.google.com/forum/#!forum/meetecho-janus
Past OpenSIPS presentations: on Janus, SIP, and various salads
• https://www.youtube.com/watch?v=SFeWYewoL7Q
• https://www.youtube.com/watch?v=anmyMC6Ovl8&t=25112s
No, seriously, remember Janus?
• General purpose, open source WebRTC server
• https://github.com/meetecho/janus-gateway
• Demos and documentation: https://janus.conf.meetecho.com
• Community: https://groups.google.com/forum/#!forum/meetecho-janus
Past OpenSIPS presentations: on Janus, SIP, and various salads
• https://www.youtube.com/watch?v=SFeWYewoL7Q
• https://www.youtube.com/watch?v=anmyMC6Ovl8&t=25112s
Troubleshooting Janus: a bit of history
• First approach (still widely used) was the Admin API
• Request/response protocol available on different transports
• Allows to inspect handles and WebRTC “internals” from the Janus perspective
• Can tweak some settings too (e.g., enable/disable debugging)
• A different, asynchronous mechanism then followed: Event Handlers
• Core and plugins generate events of different types
• Custom modules can subscribe to and handle them
• e.g., save to DB, send to external service, CDR, etc.
Fun fact: Event Handlers were conceived during OpenSIPS 2016!
• You can thank Lorenzo, Celeste, Alexandr (and a big burger!) for that
Troubleshooting Janus: a bit of history
• First approach (still widely used) was the Admin API
• Request/response protocol available on different transports
• Allows to inspect handles and WebRTC “internals” from the Janus perspective
• Can tweak some settings too (e.g., enable/disable debugging)
• A different, asynchronous mechanism then followed: Event Handlers
• Core and plugins generate events of different types
• Custom modules can subscribe to and handle them
• e.g., save to DB, send to external service, CDR, etc.
Fun fact: Event Handlers were conceived during OpenSIPS 2016!
• You can thank Lorenzo, Celeste, Alexandr (and a big burger!) for that
Troubleshooting Janus: a bit of history
• First approach (still widely used) was the Admin API
• Request/response protocol available on different transports
• Allows to inspect handles and WebRTC “internals” from the Janus perspective
• Can tweak some settings too (e.g., enable/disable debugging)
• A different, asynchronous mechanism then followed: Event Handlers
• Core and plugins generate events of different types
• Custom modules can subscribe to and handle them
• e.g., save to DB, send to external service, CDR, etc.
Fun fact: Event Handlers were conceived during OpenSIPS 2016!
• You can thank Lorenzo, Celeste, Alexandr (and a big burger!) for that
Routing and managing asynchronous events
“Sample Event Handler”: HTTP as a notifier
• Simply forwards all events as JSON to an HTTP backend
• Supports basic authentication
• Can group events (i.e., JSON array vs. multiple JSON objects)
• Implements basic retransmissions (exponential back-off)
• Does nothing more than that: logic needs to be elsewhere
• HTTP backend decides what to do with events, if anything
• Behaviour can be tweaked via Admin API calls
Need something else? Check the alternatives or write your own!
A few other event handlers also available
• RabbitMQ (in repo), MQTT (PR #1185), SQLite (by Mozilla)
“Sample Event Handler”: HTTP as a notifier
• Simply forwards all events as JSON to an HTTP backend
• Supports basic authentication
• Can group events (i.e., JSON array vs. multiple JSON objects)
• Implements basic retransmissions (exponential back-off)
• Does nothing more than that: logic needs to be elsewhere
• HTTP backend decides what to do with events, if anything
• Behaviour can be tweaked via Admin API calls
Need something else? Check the alternatives or write your own!
A few other event handlers also available
• RabbitMQ (in repo), MQTT (PR #1185), SQLite (by Mozilla)
“Sample Event Handler”: HTTP as a notifier
• Simply forwards all events as JSON to an HTTP backend
• Supports basic authentication
• Can group events (i.e., JSON array vs. multiple JSON objects)
• Implements basic retransmissions (exponential back-off)
• Does nothing more than that: logic needs to be elsewhere
• HTTP backend decides what to do with events, if anything
• Behaviour can be tweaked via Admin API calls
Need something else? Check the alternatives or write your own!
A few other event handlers also available
• RabbitMQ (in repo), MQTT (PR #1185), SQLite (by Mozilla)
How do we handle events, now?
• Generating events is easy, evaluating them is another matter...
• Event Handlers typically just relay events, and don’t do processing themselves
• Analyzing and correlating tons of events is complicated
• A few different approaches, from easiest to trickiest
1 https://github.com/stirlab/janus-event-server (dumping events to file)
2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite)
3 Write your own backend, e.g.,
http://www.meetecho.com/blog/event-handlers-a-practical-example/
http://www.meetecho.com/blog/correlating-janus-event-handlers/
• A much better approach: trust the smart guys!
• http://www.sipcapture.org/
• http://hepic.tel/
How do we handle events, now?
• Generating events is easy, evaluating them is another matter...
• Event Handlers typically just relay events, and don’t do processing themselves
• Analyzing and correlating tons of events is complicated
• A few different approaches, from easiest to trickiest
1 https://github.com/stirlab/janus-event-server (dumping events to file)
2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite)
3 Write your own backend, e.g.,
http://www.meetecho.com/blog/event-handlers-a-practical-example/
http://www.meetecho.com/blog/correlating-janus-event-handlers/
• A much better approach: trust the smart guys!
• http://www.sipcapture.org/
• http://hepic.tel/
How do we handle events, now?
• Generating events is easy, evaluating them is another matter...
• Event Handlers typically just relay events, and don’t do processing themselves
• Analyzing and correlating tons of events is complicated
• A few different approaches, from easiest to trickiest
1 https://github.com/stirlab/janus-event-server (dumping events to file)
2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite)
3 Write your own backend, e.g.,
http://www.meetecho.com/blog/event-handlers-a-practical-example/
http://www.meetecho.com/blog/correlating-janus-event-handlers/
• A much better approach: trust the smart guys!
• http://www.sipcapture.org/
• http://hepic.tel/
Event Handlers in HOMER since “day one”(*)
(*A trip down Memory Lane: FOSDEM 2017!)
https://archive.fosdem.org/2017/schedule/event/janus/
https://archive.fosdem.org/2017/schedule/event/homer/
From SIP to WebRTC
• As anticipated, Event Handlers were conceived in a chat with QXIP
• “How can I dump SIP messages with Sofia SIP?”
• “Which other events would be useful to have?”
• “What about a new modular approach, where HEP could be a plugin?”
• The only “caveat”: it was SIP only
• Only events coming from the SIP plugin were tracked, to follow the signalling
• Other events related to SIP handles only saved as “related info”
• Still very used and widespread, but limited to WebRTC/SIP scenarios
• Lately, big step to start tracking generic WebRTC applications instead
• How to handle users with more than one PeerConnection?
• How to relate a PeerConnection to another, for issues and more?
• How to reconstruct a session topology from the media perspective?
From SIP to WebRTC
• As anticipated, Event Handlers were conceived in a chat with QXIP
• “How can I dump SIP messages with Sofia SIP?”
• “Which other events would be useful to have?”
• “What about a new modular approach, where HEP could be a plugin?”
• The only “caveat”: it was SIP only
• Only events coming from the SIP plugin were tracked, to follow the signalling
• Other events related to SIP handles only saved as “related info”
• Still very used and widespread, but limited to WebRTC/SIP scenarios
• Lately, big step to start tracking generic WebRTC applications instead
• How to handle users with more than one PeerConnection?
• How to relate a PeerConnection to another, for issues and more?
• How to reconstruct a session topology from the media perspective?
From SIP to WebRTC
• As anticipated, Event Handlers were conceived in a chat with QXIP
• “How can I dump SIP messages with Sofia SIP?”
• “Which other events would be useful to have?”
• “What about a new modular approach, where HEP could be a plugin?”
• The only “caveat”: it was SIP only
• Only events coming from the SIP plugin were tracked, to follow the signalling
• Other events related to SIP handles only saved as “related info”
• Still very used and widespread, but limited to WebRTC/SIP scenarios
• Lately, big step to start tracking generic WebRTC applications instead
• How to handle users with more than one PeerConnection?
• How to relate a PeerConnection to another, for issues and more?
• How to reconstruct a session topology from the media perspective?
Challenge #1: getting events in HOMER/HEPIC
• Basically, this was there already in HOMER 5.x
• HTTP Event Handler + hepipe.js = Magic!
• hepipe.js as an Events server, statically injecting events in the platform
• Anyway, considerable refactoring done for HOMER 7.x
• Modular protocols and backends (e.g., Prometheus vs. InfluxDB)
• The solution: HEPop as a way to index/tag incoming heterogeneous data
• Support for several different data sources (e.g., Janus and mediasoup)
• For Janus, it acts as an events server exactly as hepipe.js did
A potential Janus-specific improvement?
As anticipated, a MQTT event handler is on the way (thanks Olle!)
• Might be a much better alternative to HTTP as a way to channel events
Challenge #1: getting events in HOMER/HEPIC
• Basically, this was there already in HOMER 5.x
• HTTP Event Handler + hepipe.js = Magic!
• hepipe.js as an Events server, statically injecting events in the platform
• Anyway, considerable refactoring done for HOMER 7.x
• Modular protocols and backends (e.g., Prometheus vs. InfluxDB)
• The solution: HEPop as a way to index/tag incoming heterogeneous data
• Support for several different data sources (e.g., Janus and mediasoup)
• For Janus, it acts as an events server exactly as hepipe.js did
A potential Janus-specific improvement?
As anticipated, a MQTT event handler is on the way (thanks Olle!)
• Might be a much better alternative to HTTP as a way to channel events
Challenge #1: getting events in HOMER/HEPIC
• Basically, this was there already in HOMER 5.x
• HTTP Event Handler + hepipe.js = Magic!
• hepipe.js as an Events server, statically injecting events in the platform
• Anyway, considerable refactoring done for HOMER 7.x
• Modular protocols and backends (e.g., Prometheus vs. InfluxDB)
• The solution: HEPop as a way to index/tag incoming heterogeneous data
• Support for several different data sources (e.g., Janus and mediasoup)
• For Janus, it acts as an events server exactly as hepipe.js did
A potential Janus-specific improvement?
As anticipated, a MQTT event handler is on the way (thanks Olle!)
• Might be a much better alternative to HTTP as a way to channel events
Challenge #1: getting events in HOMER/HEPIC
• Basically, this was there already in HOMER 5.x
• HTTP Event Handler + hepipe.js = Magic!
• hepipe.js as an Events server, statically injecting events in the platform
• Anyway, considerable refactoring done for HOMER 7.x
• Modular protocols and backends (e.g., Prometheus vs. InfluxDB)
• The solution: HEPop as a way to index/tag incoming heterogeneous data
• Support for several different data sources (e.g., Janus and mediasoup)
• For Janus, it acts as an events server exactly as hepipe.js did
A potential Janus-specific improvement?
As anticipated, a MQTT event handler is on the way (thanks Olle!)
• Might be a much better alternative to HTTP as a way to channel events
Challenge #2: storing and processing events
• Ex-post evaluations vs. live monitoring
• Analyzing a dump after the session ended is different from live monitoring
• Postgres, MySQL, InfluxDB, Prometheus, etc.
• Several options in the new HOMER/HEPIC, which is exciting!
• JSON databases and queries
• Janus events are in JSON format, so why not use that effectively?
• HOMER/HEPIC backends support JSON as a native format
Storing and tagging events
Smart choice is to store events AND tag them as they flow
• Good way to create quick correlations and recap what happened
• Media stats can then be turned in Time Series (monitoring/alerting)
Challenge #2: storing and processing events
• Ex-post evaluations vs. live monitoring
• Analyzing a dump after the session ended is different from live monitoring
• Postgres, MySQL, InfluxDB, Prometheus, etc.
• Several options in the new HOMER/HEPIC, which is exciting!
• JSON databases and queries
• Janus events are in JSON format, so why not use that effectively?
• HOMER/HEPIC backends support JSON as a native format
Storing and tagging events
Smart choice is to store events AND tag them as they flow
• Good way to create quick correlations and recap what happened
• Media stats can then be turned in Time Series (monitoring/alerting)
Challenge #2: storing and processing events
• Ex-post evaluations vs. live monitoring
• Analyzing a dump after the session ended is different from live monitoring
• Postgres, MySQL, InfluxDB, Prometheus, etc.
• Several options in the new HOMER/HEPIC, which is exciting!
• JSON databases and queries
• Janus events are in JSON format, so why not use that effectively?
• HOMER/HEPIC backends support JSON as a native format
Storing and tagging events
Smart choice is to store events AND tag them as they flow
• Good way to create quick correlations and recap what happened
• Media stats can then be turned in Time Series (monitoring/alerting)
Challenge #2: storing and processing events
• Ex-post evaluations vs. live monitoring
• Analyzing a dump after the session ended is different from live monitoring
• Postgres, MySQL, InfluxDB, Prometheus, etc.
• Several options in the new HOMER/HEPIC, which is exciting!
• JSON databases and queries
• Janus events are in JSON format, so why not use that effectively?
• HOMER/HEPIC backends support JSON as a native format
Storing and tagging events
Smart choice is to store events AND tag them as they flow
• Good way to create quick correlations and recap what happened
• Media stats can then be turned in Time Series (monitoring/alerting)
Challenge #3: correlating events
• Sessions might be used to identify users, but can’t always be “trusted”
• Works fine when users talk to Janus directly (1↔1 relationship)
• There are server-side applications with a single session for all users, though
• Enter opaque_id: a client-provided opaque identifier
• Just set the same opaque ID for all handles belonging to the same user
• The opaque ID can be whatever you want, Janus doesn’t care
• Useful for intra-plugin, but also inter-plugin, correlations
• e.g., to know a user is publishing and subscribing in a VideoRoom
• ... but also, for instance, in a SIP call in the same application
Want to learn more?
http://www.meetecho.com/blog/correlating-janus-event-handlers/
Challenge #3: correlating events
• Sessions might be used to identify users, but can’t always be “trusted”
• Works fine when users talk to Janus directly (1↔1 relationship)
• There are server-side applications with a single session for all users, though
• Enter opaque_id: a client-provided opaque identifier
• Just set the same opaque ID for all handles belonging to the same user
• The opaque ID can be whatever you want, Janus doesn’t care
• Useful for intra-plugin, but also inter-plugin, correlations
• e.g., to know a user is publishing and subscribing in a VideoRoom
• ... but also, for instance, in a SIP call in the same application
Want to learn more?
http://www.meetecho.com/blog/correlating-janus-event-handlers/
Challenge #3: correlating events
• Sessions might be used to identify users, but can’t always be “trusted”
• Works fine when users talk to Janus directly (1↔1 relationship)
• There are server-side applications with a single session for all users, though
• Enter opaque_id: a client-provided opaque identifier
• Just set the same opaque ID for all handles belonging to the same user
• The opaque ID can be whatever you want, Janus doesn’t care
• Useful for intra-plugin, but also inter-plugin, correlations
• e.g., to know a user is publishing and subscribing in a VideoRoom
• ... but also, for instance, in a SIP call in the same application
Want to learn more?
http://www.meetecho.com/blog/correlating-janus-event-handlers/
Challenge #3: correlating events
• Sessions might be used to identify users, but can’t always be “trusted”
• Works fine when users talk to Janus directly (1↔1 relationship)
• There are server-side applications with a single session for all users, though
• Enter opaque_id: a client-provided opaque identifier
• Just set the same opaque ID for all handles belonging to the same user
• The opaque ID can be whatever you want, Janus doesn’t care
• Useful for intra-plugin, but also inter-plugin, correlations
• e.g., to know a user is publishing and subscribing in a VideoRoom
• ... but also, for instance, in a SIP call in the same application
Want to learn more?
http://www.meetecho.com/blog/correlating-janus-event-handlers/
Challenge #3: storing and processing events
Challenge #3: storing and processing events
Challenge #3: storing and processing events
Challenge #4: client-side events
• All the discussion so far has been for server-side events
• Janus originates events for what happens there
• What about the client side perspective?
• In WebRTC, standard mechanism for getting statistics on a PeerConnection
• https://www.w3.org/TR/webrtc-stats/
• Calls to getStats() return useful info, but in JavaScript
• How to get it to HOMER/HEPIC, possibly via Janus/Event Handlers as well?
Solution: a new Janus plugin!
• Client attaches and sends stats on a regular basis to the plugin via Janus API
• Plugin relays stats via Event Handlers (same opaque ID as media channels)
• Note: still WIP (working demo using rtcstats), but not open source yet
Challenge #4: client-side events
• All the discussion so far has been for server-side events
• Janus originates events for what happens there
• What about the client side perspective?
• In WebRTC, standard mechanism for getting statistics on a PeerConnection
• https://www.w3.org/TR/webrtc-stats/
• Calls to getStats() return useful info, but in JavaScript
• How to get it to HOMER/HEPIC, possibly via Janus/Event Handlers as well?
Solution: a new Janus plugin!
• Client attaches and sends stats on a regular basis to the plugin via Janus API
• Plugin relays stats via Event Handlers (same opaque ID as media channels)
• Note: still WIP (working demo using rtcstats), but not open source yet
Challenge #4: client-side events
• All the discussion so far has been for server-side events
• Janus originates events for what happens there
• What about the client side perspective?
• In WebRTC, standard mechanism for getting statistics on a PeerConnection
• https://www.w3.org/TR/webrtc-stats/
• Calls to getStats() return useful info, but in JavaScript
• How to get it to HOMER/HEPIC, possibly via Janus/Event Handlers as well?
Solution: a new Janus plugin!
• Client attaches and sends stats on a regular basis to the plugin via Janus API
• Plugin relays stats via Event Handlers (same opaque ID as media channels)
• Note: still WIP (working demo using rtcstats), but not open source yet
Challenge #4: client-side events
• All the discussion so far has been for server-side events
• Janus originates events for what happens there
• What about the client side perspective?
• In WebRTC, standard mechanism for getting statistics on a PeerConnection
• https://www.w3.org/TR/webrtc-stats/
• Calls to getStats() return useful info, but in JavaScript
• How to get it to HOMER/HEPIC, possibly via Janus/Event Handlers as well?
Solution: a new Janus plugin!
• Client attaches and sends stats on a regular basis to the plugin via Janus API
• Plugin relays stats via Event Handlers (same opaque ID as media channels)
• Note: still WIP (working demo using rtcstats), but not open source yet
A real use case: IETF meetings!
Remote participation at the IETF
https://www.slideshare.net/LorenzoMiniero/ietf-remote-participation-via-meetecho-webrtc-meetup-stockholm
https://www.vuc.me/2017/vuc640-ietf-remote-participation-with-lorenzo-miniero/
Studying data from IETF 101 in London
• IETF remote participation based on multiple Janus plugins
• SIP plugin for mixed audio
• Streaming plugin for static sources
• VideoRoom plugin for remote speakers
• Collected events related to 10 different Working Group sessions
• https://datatracker.ietf.org/meeting/agenda.html#2018-03-23-083000
• MMUSIC, HOMENET, ICCRG, DETNET, ROLL, SECEVENT, DTN, SPRING,
IPSECME, LAMPS
• Good mix of heterogeneous sessions
• Some shorter, some longer (DETNET lasted 5 hours!)
• Some had many active remote speakers
• All had attendees from all over the world (different network conditions)
Studying data from IETF 101 in London
• IETF remote participation based on multiple Janus plugins
• SIP plugin for mixed audio
• Streaming plugin for static sources
• VideoRoom plugin for remote speakers
• Collected events related to 10 different Working Group sessions
• https://datatracker.ietf.org/meeting/agenda.html#2018-03-23-083000
• MMUSIC, HOMENET, ICCRG, DETNET, ROLL, SECEVENT, DTN, SPRING,
IPSECME, LAMPS
• Good mix of heterogeneous sessions
• Some shorter, some longer (DETNET lasted 5 hours!)
• Some had many active remote speakers
• All had attendees from all over the world (different network conditions)
Studying data from IETF 101 in London
• IETF remote participation based on multiple Janus plugins
• SIP plugin for mixed audio
• Streaming plugin for static sources
• VideoRoom plugin for remote speakers
• Collected events related to 10 different Working Group sessions
• https://datatracker.ietf.org/meeting/agenda.html#2018-03-23-083000
• MMUSIC, HOMENET, ICCRG, DETNET, ROLL, SECEVENT, DTN, SPRING,
IPSECME, LAMPS
• Good mix of heterogeneous sessions
• Some shorter, some longer (DETNET lasted 5 hours!)
• Some had many active remote speakers
• All had attendees from all over the world (different network conditions)
First experiments: dumping events to Postgres
• Postgres supports JSON natively, and is used by HOMER/HEPIC too
• Why not play with this locally, first?
• Created a single database, and a different table per each WG
• Each table just has a unique index and the JSON value
• All queries can be done on JSON fields
• Played with different queries to identify different events
• How many concurrent participants? How many were active?
• Who subscribed to what? (SIP, slides, camera, remotees)
• Any network errors? If so, caused by what?
• What can we extract from the statistics?
First experiments: dumping events to Postgres
• Postgres supports JSON natively, and is used by HOMER/HEPIC too
• Why not play with this locally, first?
• Created a single database, and a different table per each WG
• Each table just has a unique index and the JSON value
• All queries can be done on JSON fields
• Played with different queries to identify different events
• How many concurrent participants? How many were active?
• Who subscribed to what? (SIP, slides, camera, remotees)
• Any network errors? If so, caused by what?
• What can we extract from the statistics?
First experiments: dumping events to Postgres
• Postgres supports JSON natively, and is used by HOMER/HEPIC too
• Why not play with this locally, first?
• Created a single database, and a different table per each WG
• Each table just has a unique index and the JSON value
• All queries can be done on JSON fields
• Played with different queries to identify different events
• How many concurrent participants? How many were active?
• Who subscribed to what? (SIP, slides, camera, remotees)
• Any network errors? If so, caused by what?
• What can we extract from the statistics?
Summarizing relevant user/handle events
Summarizing relevant user/handle events
Summarizing relevant user/handle events
Summarizing relevant user/handle events
The ugliest charts you’ll ever see!
Some bugs to be fixed in Janus too, I guess...
• Analysing dumps, one thing popped to the eye: RTCP RTT > 4M?!
• RTT was either quite low, or super-high, never in the middle
• Turned out to be a bug in the RTCP parsing code, though... (that we fixed, now!)
How does it look like in HOMER/HEPIC?
How does it look like in HOMER/HEPIC?
Cool demo with Lorenzo tomorrow!
Next steps
• Collecting real data and analysing it was very useful
• Helped fix a couple of bugs (I’m looking at you, RTT!)
• Showed we needed better info in some events (e.g., in selected-pair)
• Very helpful in terms of HOMER/HEPIC integration as well
• What were we looking for?
• Was the available information enough?
• Did we have all the instruments to monitor/navigate/search?
What’s next?
Not the end of the journey, just the beginning!
• Need to generalize IETF meeting considerations to other use cases
• Live monitoring and troubleshooting is definitely of interest
• Most of the analysis was done on ex-post processing
• Alerting is ready, though, so looking forward to that!
Next steps
• Collecting real data and analysing it was very useful
• Helped fix a couple of bugs (I’m looking at you, RTT!)
• Showed we needed better info in some events (e.g., in selected-pair)
• Very helpful in terms of HOMER/HEPIC integration as well
• What were we looking for?
• Was the available information enough?
• Did we have all the instruments to monitor/navigate/search?
What’s next?
Not the end of the journey, just the beginning!
• Need to generalize IETF meeting considerations to other use cases
• Live monitoring and troubleshooting is definitely of interest
• Most of the analysis was done on ex-post processing
• Alerting is ready, though, so looking forward to that!
Next steps
• Collecting real data and analysing it was very useful
• Helped fix a couple of bugs (I’m looking at you, RTT!)
• Showed we needed better info in some events (e.g., in selected-pair)
• Very helpful in terms of HOMER/HEPIC integration as well
• What were we looking for?
• Was the available information enough?
• Did we have all the instruments to monitor/navigate/search?
What’s next?
Not the end of the journey, just the beginning!
• Need to generalize IETF meeting considerations to other use cases
• Live monitoring and troubleshooting is definitely of interest
• Most of the analysis was done on ex-post processing
• Alerting is ready, though, so looking forward to that!
Next steps
• Collecting real data and analysing it was very useful
• Helped fix a couple of bugs (I’m looking at you, RTT!)
• Showed we needed better info in some events (e.g., in selected-pair)
• Very helpful in terms of HOMER/HEPIC integration as well
• What were we looking for?
• Was the available information enough?
• Did we have all the instruments to monitor/navigate/search?
What’s next?
Not the end of the journey, just the beginning!
• Need to generalize IETF meeting considerations to other use cases
• Live monitoring and troubleshooting is definitely of interest
• Most of the analysis was done on ex-post processing
• Alerting is ready, though, so looking forward to that!
Next steps
• Collecting real data and analysing it was very useful
• Helped fix a couple of bugs (I’m looking at you, RTT!)
• Showed we needed better info in some events (e.g., in selected-pair)
• Very helpful in terms of HOMER/HEPIC integration as well
• What were we looking for?
• Was the available information enough?
• Did we have all the instruments to monitor/navigate/search?
What’s next?
Not the end of the journey, just the beginning!
• Need to generalize IETF meeting considerations to other use cases
• Live monitoring and troubleshooting is definitely of interest
• Most of the analysis was done on ex-post processing
• Alerting is ready, though, so looking forward to that!
Thanks! Questions? Comments?
Get in touch!
• https://twitter.com/elminiero
• https://twitter.com/meetecho
• http://www.meetecho.com

More Related Content

What's hot

SSO with the WSO2 Identity Server
SSO with the WSO2 Identity ServerSSO with the WSO2 Identity Server
SSO with the WSO2 Identity Server
WSO2
 
Apache Knox - Hadoop Security Swiss Army Knife
Apache Knox - Hadoop Security Swiss Army KnifeApache Knox - Hadoop Security Swiss Army Knife
Apache Knox - Hadoop Security Swiss Army Knife
DataWorks Summit
 

What's hot (20)

Managing the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsManaging the Complexity of Microservices Deployments
Managing the Complexity of Microservices Deployments
 
Effective API Governance: Lessons Learnt
Effective API Governance: Lessons LearntEffective API Governance: Lessons Learnt
Effective API Governance: Lessons Learnt
 
BWE in Janus
BWE in JanusBWE in Janus
BWE in Janus
 
Axway amplify api management platform
Axway amplify api management platformAxway amplify api management platform
Axway amplify api management platform
 
Api application programming interface
Api application programming interfaceApi application programming interface
Api application programming interface
 
API Strategy Introduction
API Strategy IntroductionAPI Strategy Introduction
API Strategy Introduction
 
Architecting an Enterprise API Management Strategy
Architecting an Enterprise API Management StrategyArchitecting an Enterprise API Management Strategy
Architecting an Enterprise API Management Strategy
 
What's an api
What's an apiWhat's an api
What's an api
 
Apigee Edge: Intro to Microgateway
Apigee Edge: Intro to MicrogatewayApigee Edge: Intro to Microgateway
Apigee Edge: Intro to Microgateway
 
SSO with the WSO2 Identity Server
SSO with the WSO2 Identity ServerSSO with the WSO2 Identity Server
SSO with the WSO2 Identity Server
 
How to avoid connection pool deadlock
How to avoid connection pool deadlockHow to avoid connection pool deadlock
How to avoid connection pool deadlock
 
"Operation Timed out" error while configuring HA in vCenter Server
"Operation Timed out" error while configuring HA in vCenter Server "Operation Timed out" error while configuring HA in vCenter Server
"Operation Timed out" error while configuring HA in vCenter Server
 
Learn REST in 18 Slides
Learn REST in 18 SlidesLearn REST in 18 Slides
Learn REST in 18 Slides
 
Simplify Security with Ivanti Security Controls
Simplify Security with Ivanti Security ControlsSimplify Security with Ivanti Security Controls
Simplify Security with Ivanti Security Controls
 
Apache Knox - Hadoop Security Swiss Army Knife
Apache Knox - Hadoop Security Swiss Army KnifeApache Knox - Hadoop Security Swiss Army Knife
Apache Knox - Hadoop Security Swiss Army Knife
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
세션2. 이더리움 합의 알고리즘과 마이닝
세션2. 이더리움 합의 알고리즘과 마이닝세션2. 이더리움 합의 알고리즘과 마이닝
세션2. 이더리움 합의 알고리즘과 마이닝
 
Event-driven Architecture
Event-driven ArchitectureEvent-driven Architecture
Event-driven Architecture
 
the-coming-perfect-storm-john-paul-jackson
the-coming-perfect-storm-john-paul-jacksonthe-coming-perfect-storm-john-paul-jackson
the-coming-perfect-storm-john-paul-jackson
 

Similar to Janus/HOMER/HEPIC @ OpenSIPS18

Similar to Janus/HOMER/HEPIC @ OpenSIPS18 (20)

FOSDEM2017 - Janus Event Handlers
FOSDEM2017 - Janus Event HandlersFOSDEM2017 - Janus Event Handlers
FOSDEM2017 - Janus Event Handlers
 
Scaling server side web rtc applications the janus challenge by lorenzo miniero
Scaling server side web rtc applications the janus challenge by lorenzo minieroScaling server side web rtc applications the janus challenge by lorenzo miniero
Scaling server side web rtc applications the janus challenge by lorenzo miniero
 
Scaling WebRTC applications with Janus
Scaling WebRTC applications with JanusScaling WebRTC applications with Janus
Scaling WebRTC applications with Janus
 
Quick look in Reactive Extensions
Quick look in Reactive ExtensionsQuick look in Reactive Extensions
Quick look in Reactive Extensions
 
Real time web
Real time webReal time web
Real time web
 
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soulLet's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
Let's Get Real (time): Server-Sent Events, WebSockets and WebRTC for the soul
 
Project Flogo: Serverless Integration, Powered by Flogo and Lambda
Project Flogo: Serverless Integration, Powered by Flogo and LambdaProject Flogo: Serverless Integration, Powered by Flogo and Lambda
Project Flogo: Serverless Integration, Powered by Flogo and Lambda
 
Janus/SIP @ OpenSIPS 2017
Janus/SIP @ OpenSIPS 2017Janus/SIP @ OpenSIPS 2017
Janus/SIP @ OpenSIPS 2017
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
 
Understanding event data
Understanding event dataUnderstanding event data
Understanding event data
 
Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021Write a SocialTV app @ OpenSIPS 2021
Write a SocialTV app @ OpenSIPS 2021
 
Netty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsNetty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoops
 
Janus @ RTC2017 Beijing
Janus @ RTC2017 BeijingJanus @ RTC2017 Beijing
Janus @ RTC2017 Beijing
 
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysHacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
 
WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017
 
The challenges of hybrid meetings @ CommCon 2023
The challenges of hybrid meetings @ CommCon 2023The challenges of hybrid meetings @ CommCon 2023
The challenges of hybrid meetings @ CommCon 2023
 
OpenFest 2014 Aggressive DevOps
OpenFest 2014 Aggressive DevOpsOpenFest 2014 Aggressive DevOps
OpenFest 2014 Aggressive DevOps
 
Manual JavaScript Analysis Is A Bug
Manual JavaScript Analysis Is A BugManual JavaScript Analysis Is A Bug
Manual JavaScript Analysis Is A Bug
 
An Introduction to Microservices
An Introduction to MicroservicesAn Introduction to Microservices
An Introduction to Microservices
 
WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021
 

More from Lorenzo Miniero

More from Lorenzo Miniero (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Getting AV1/SVC to work in the Janus WebRTC Server
Getting AV1/SVC to work in the Janus WebRTC ServerGetting AV1/SVC to work in the Janus WebRTC Server
Getting AV1/SVC to work in the Janus WebRTC Server
 
WebRTC Broadcasting @ TADSummit 2023
WebRTC Broadcasting @ TADSummit 2023WebRTC Broadcasting @ TADSummit 2023
WebRTC Broadcasting @ TADSummit 2023
 
Real-Time Text and WebRTC @ Kamailio World 2023
Real-Time Text and WebRTC @ Kamailio World 2023Real-Time Text and WebRTC @ Kamailio World 2023
Real-Time Text and WebRTC @ Kamailio World 2023
 
Become a rockstar using FOSS!
Become a rockstar using FOSS!Become a rockstar using FOSS!
Become a rockstar using FOSS!
 
Janus SFU cascading @ IIT-RTC 2022
Janus SFU cascading @ IIT-RTC 2022Janus SFU cascading @ IIT-RTC 2022
Janus SFU cascading @ IIT-RTC 2022
 
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
 
WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21
 
Janus + Audio @ Open Source World
Janus + Audio @ Open Source WorldJanus + Audio @ Open Source World
Janus + Audio @ Open Source World
 
JamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConferenceJamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConference
 
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
Scaling WebRTC deployments with multicast @ IETF 110 MBONEDScaling WebRTC deployments with multicast @ IETF 110 MBONED
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
 
Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021
 
Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021
 
Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021
 
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
Virtual IETF meetings with WebRTC @ IETF 109 MOPSVirtual IETF meetings with WebRTC @ IETF 109 MOPS
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
 
Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020Can SFUs and MCUs be friends @ IIT-RTC 2020
Can SFUs and MCUs be friends @ IIT-RTC 2020
 
Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020Insertable Streams and E2EE @ ClueCon2020
Insertable Streams and E2EE @ ClueCon2020
 
Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020Janus Workshop @ ClueCon 2020
Janus Workshop @ ClueCon 2020
 
Turning live events to virtual with Janus
Turning live events to virtual with JanusTurning live events to virtual with Janus
Turning live events to virtual with Janus
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Janus/HOMER/HEPIC @ OpenSIPS18

  • 1. Troubleshooting and monitoring Janus: a HEPIC journey! Lorenzo Miniero @elminiero OpenSIPS Summit 2nd May 2018,
  • 2. “Which Lorenzo are you, exactly?”
  • 3. You may remember me from “Revenge of the Mutant Janus Instances” (not really...)
  • 4. No, seriously, remember Janus? • General purpose, open source WebRTC server • https://github.com/meetecho/janus-gateway • Demos and documentation: https://janus.conf.meetecho.com • Community: https://groups.google.com/forum/#!forum/meetecho-janus Past OpenSIPS presentations: on Janus, SIP, and various salads • https://www.youtube.com/watch?v=SFeWYewoL7Q • https://www.youtube.com/watch?v=anmyMC6Ovl8&t=25112s
  • 5. No, seriously, remember Janus? • General purpose, open source WebRTC server • https://github.com/meetecho/janus-gateway • Demos and documentation: https://janus.conf.meetecho.com • Community: https://groups.google.com/forum/#!forum/meetecho-janus Past OpenSIPS presentations: on Janus, SIP, and various salads • https://www.youtube.com/watch?v=SFeWYewoL7Q • https://www.youtube.com/watch?v=anmyMC6Ovl8&t=25112s
  • 6. Troubleshooting Janus: a bit of history • First approach (still widely used) was the Admin API • Request/response protocol available on different transports • Allows to inspect handles and WebRTC “internals” from the Janus perspective • Can tweak some settings too (e.g., enable/disable debugging) • A different, asynchronous mechanism then followed: Event Handlers • Core and plugins generate events of different types • Custom modules can subscribe to and handle them • e.g., save to DB, send to external service, CDR, etc. Fun fact: Event Handlers were conceived during OpenSIPS 2016! • You can thank Lorenzo, Celeste, Alexandr (and a big burger!) for that
  • 7. Troubleshooting Janus: a bit of history • First approach (still widely used) was the Admin API • Request/response protocol available on different transports • Allows to inspect handles and WebRTC “internals” from the Janus perspective • Can tweak some settings too (e.g., enable/disable debugging) • A different, asynchronous mechanism then followed: Event Handlers • Core and plugins generate events of different types • Custom modules can subscribe to and handle them • e.g., save to DB, send to external service, CDR, etc. Fun fact: Event Handlers were conceived during OpenSIPS 2016! • You can thank Lorenzo, Celeste, Alexandr (and a big burger!) for that
  • 8. Troubleshooting Janus: a bit of history • First approach (still widely used) was the Admin API • Request/response protocol available on different transports • Allows to inspect handles and WebRTC “internals” from the Janus perspective • Can tweak some settings too (e.g., enable/disable debugging) • A different, asynchronous mechanism then followed: Event Handlers • Core and plugins generate events of different types • Custom modules can subscribe to and handle them • e.g., save to DB, send to external service, CDR, etc. Fun fact: Event Handlers were conceived during OpenSIPS 2016! • You can thank Lorenzo, Celeste, Alexandr (and a big burger!) for that
  • 9. Routing and managing asynchronous events
  • 10. “Sample Event Handler”: HTTP as a notifier • Simply forwards all events as JSON to an HTTP backend • Supports basic authentication • Can group events (i.e., JSON array vs. multiple JSON objects) • Implements basic retransmissions (exponential back-off) • Does nothing more than that: logic needs to be elsewhere • HTTP backend decides what to do with events, if anything • Behaviour can be tweaked via Admin API calls Need something else? Check the alternatives or write your own! A few other event handlers also available • RabbitMQ (in repo), MQTT (PR #1185), SQLite (by Mozilla)
  • 11. “Sample Event Handler”: HTTP as a notifier • Simply forwards all events as JSON to an HTTP backend • Supports basic authentication • Can group events (i.e., JSON array vs. multiple JSON objects) • Implements basic retransmissions (exponential back-off) • Does nothing more than that: logic needs to be elsewhere • HTTP backend decides what to do with events, if anything • Behaviour can be tweaked via Admin API calls Need something else? Check the alternatives or write your own! A few other event handlers also available • RabbitMQ (in repo), MQTT (PR #1185), SQLite (by Mozilla)
  • 12. “Sample Event Handler”: HTTP as a notifier • Simply forwards all events as JSON to an HTTP backend • Supports basic authentication • Can group events (i.e., JSON array vs. multiple JSON objects) • Implements basic retransmissions (exponential back-off) • Does nothing more than that: logic needs to be elsewhere • HTTP backend decides what to do with events, if anything • Behaviour can be tweaked via Admin API calls Need something else? Check the alternatives or write your own! A few other event handlers also available • RabbitMQ (in repo), MQTT (PR #1185), SQLite (by Mozilla)
  • 13. How do we handle events, now? • Generating events is easy, evaluating them is another matter... • Event Handlers typically just relay events, and don’t do processing themselves • Analyzing and correlating tons of events is complicated • A few different approaches, from easiest to trickiest 1 https://github.com/stirlab/janus-event-server (dumping events to file) 2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite) 3 Write your own backend, e.g., http://www.meetecho.com/blog/event-handlers-a-practical-example/ http://www.meetecho.com/blog/correlating-janus-event-handlers/ • A much better approach: trust the smart guys! • http://www.sipcapture.org/ • http://hepic.tel/
  • 14. How do we handle events, now? • Generating events is easy, evaluating them is another matter... • Event Handlers typically just relay events, and don’t do processing themselves • Analyzing and correlating tons of events is complicated • A few different approaches, from easiest to trickiest 1 https://github.com/stirlab/janus-event-server (dumping events to file) 2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite) 3 Write your own backend, e.g., http://www.meetecho.com/blog/event-handlers-a-practical-example/ http://www.meetecho.com/blog/correlating-janus-event-handlers/ • A much better approach: trust the smart guys! • http://www.sipcapture.org/ • http://hepic.tel/
  • 15. How do we handle events, now? • Generating events is easy, evaluating them is another matter... • Event Handlers typically just relay events, and don’t do processing themselves • Analyzing and correlating tons of events is complicated • A few different approaches, from easiest to trickiest 1 https://github.com/stirlab/janus-event-server (dumping events to file) 2 https://github.com/mozilla/janus-eventhandler-sqlite (dumping events to SQLite) 3 Write your own backend, e.g., http://www.meetecho.com/blog/event-handlers-a-practical-example/ http://www.meetecho.com/blog/correlating-janus-event-handlers/ • A much better approach: trust the smart guys! • http://www.sipcapture.org/ • http://hepic.tel/
  • 16. Event Handlers in HOMER since “day one”(*)
  • 17. (*A trip down Memory Lane: FOSDEM 2017!) https://archive.fosdem.org/2017/schedule/event/janus/ https://archive.fosdem.org/2017/schedule/event/homer/
  • 18. From SIP to WebRTC • As anticipated, Event Handlers were conceived in a chat with QXIP • “How can I dump SIP messages with Sofia SIP?” • “Which other events would be useful to have?” • “What about a new modular approach, where HEP could be a plugin?” • The only “caveat”: it was SIP only • Only events coming from the SIP plugin were tracked, to follow the signalling • Other events related to SIP handles only saved as “related info” • Still very used and widespread, but limited to WebRTC/SIP scenarios • Lately, big step to start tracking generic WebRTC applications instead • How to handle users with more than one PeerConnection? • How to relate a PeerConnection to another, for issues and more? • How to reconstruct a session topology from the media perspective?
  • 19. From SIP to WebRTC • As anticipated, Event Handlers were conceived in a chat with QXIP • “How can I dump SIP messages with Sofia SIP?” • “Which other events would be useful to have?” • “What about a new modular approach, where HEP could be a plugin?” • The only “caveat”: it was SIP only • Only events coming from the SIP plugin were tracked, to follow the signalling • Other events related to SIP handles only saved as “related info” • Still very used and widespread, but limited to WebRTC/SIP scenarios • Lately, big step to start tracking generic WebRTC applications instead • How to handle users with more than one PeerConnection? • How to relate a PeerConnection to another, for issues and more? • How to reconstruct a session topology from the media perspective?
  • 20. From SIP to WebRTC • As anticipated, Event Handlers were conceived in a chat with QXIP • “How can I dump SIP messages with Sofia SIP?” • “Which other events would be useful to have?” • “What about a new modular approach, where HEP could be a plugin?” • The only “caveat”: it was SIP only • Only events coming from the SIP plugin were tracked, to follow the signalling • Other events related to SIP handles only saved as “related info” • Still very used and widespread, but limited to WebRTC/SIP scenarios • Lately, big step to start tracking generic WebRTC applications instead • How to handle users with more than one PeerConnection? • How to relate a PeerConnection to another, for issues and more? • How to reconstruct a session topology from the media perspective?
  • 21. Challenge #1: getting events in HOMER/HEPIC • Basically, this was there already in HOMER 5.x • HTTP Event Handler + hepipe.js = Magic! • hepipe.js as an Events server, statically injecting events in the platform • Anyway, considerable refactoring done for HOMER 7.x • Modular protocols and backends (e.g., Prometheus vs. InfluxDB) • The solution: HEPop as a way to index/tag incoming heterogeneous data • Support for several different data sources (e.g., Janus and mediasoup) • For Janus, it acts as an events server exactly as hepipe.js did A potential Janus-specific improvement? As anticipated, a MQTT event handler is on the way (thanks Olle!) • Might be a much better alternative to HTTP as a way to channel events
  • 22. Challenge #1: getting events in HOMER/HEPIC • Basically, this was there already in HOMER 5.x • HTTP Event Handler + hepipe.js = Magic! • hepipe.js as an Events server, statically injecting events in the platform • Anyway, considerable refactoring done for HOMER 7.x • Modular protocols and backends (e.g., Prometheus vs. InfluxDB) • The solution: HEPop as a way to index/tag incoming heterogeneous data • Support for several different data sources (e.g., Janus and mediasoup) • For Janus, it acts as an events server exactly as hepipe.js did A potential Janus-specific improvement? As anticipated, a MQTT event handler is on the way (thanks Olle!) • Might be a much better alternative to HTTP as a way to channel events
  • 23. Challenge #1: getting events in HOMER/HEPIC • Basically, this was there already in HOMER 5.x • HTTP Event Handler + hepipe.js = Magic! • hepipe.js as an Events server, statically injecting events in the platform • Anyway, considerable refactoring done for HOMER 7.x • Modular protocols and backends (e.g., Prometheus vs. InfluxDB) • The solution: HEPop as a way to index/tag incoming heterogeneous data • Support for several different data sources (e.g., Janus and mediasoup) • For Janus, it acts as an events server exactly as hepipe.js did A potential Janus-specific improvement? As anticipated, a MQTT event handler is on the way (thanks Olle!) • Might be a much better alternative to HTTP as a way to channel events
  • 24. Challenge #1: getting events in HOMER/HEPIC • Basically, this was there already in HOMER 5.x • HTTP Event Handler + hepipe.js = Magic! • hepipe.js as an Events server, statically injecting events in the platform • Anyway, considerable refactoring done for HOMER 7.x • Modular protocols and backends (e.g., Prometheus vs. InfluxDB) • The solution: HEPop as a way to index/tag incoming heterogeneous data • Support for several different data sources (e.g., Janus and mediasoup) • For Janus, it acts as an events server exactly as hepipe.js did A potential Janus-specific improvement? As anticipated, a MQTT event handler is on the way (thanks Olle!) • Might be a much better alternative to HTTP as a way to channel events
  • 25. Challenge #2: storing and processing events • Ex-post evaluations vs. live monitoring • Analyzing a dump after the session ended is different from live monitoring • Postgres, MySQL, InfluxDB, Prometheus, etc. • Several options in the new HOMER/HEPIC, which is exciting! • JSON databases and queries • Janus events are in JSON format, so why not use that effectively? • HOMER/HEPIC backends support JSON as a native format Storing and tagging events Smart choice is to store events AND tag them as they flow • Good way to create quick correlations and recap what happened • Media stats can then be turned in Time Series (monitoring/alerting)
  • 26. Challenge #2: storing and processing events • Ex-post evaluations vs. live monitoring • Analyzing a dump after the session ended is different from live monitoring • Postgres, MySQL, InfluxDB, Prometheus, etc. • Several options in the new HOMER/HEPIC, which is exciting! • JSON databases and queries • Janus events are in JSON format, so why not use that effectively? • HOMER/HEPIC backends support JSON as a native format Storing and tagging events Smart choice is to store events AND tag them as they flow • Good way to create quick correlations and recap what happened • Media stats can then be turned in Time Series (monitoring/alerting)
  • 27. Challenge #2: storing and processing events • Ex-post evaluations vs. live monitoring • Analyzing a dump after the session ended is different from live monitoring • Postgres, MySQL, InfluxDB, Prometheus, etc. • Several options in the new HOMER/HEPIC, which is exciting! • JSON databases and queries • Janus events are in JSON format, so why not use that effectively? • HOMER/HEPIC backends support JSON as a native format Storing and tagging events Smart choice is to store events AND tag them as they flow • Good way to create quick correlations and recap what happened • Media stats can then be turned in Time Series (monitoring/alerting)
  • 28. Challenge #2: storing and processing events • Ex-post evaluations vs. live monitoring • Analyzing a dump after the session ended is different from live monitoring • Postgres, MySQL, InfluxDB, Prometheus, etc. • Several options in the new HOMER/HEPIC, which is exciting! • JSON databases and queries • Janus events are in JSON format, so why not use that effectively? • HOMER/HEPIC backends support JSON as a native format Storing and tagging events Smart choice is to store events AND tag them as they flow • Good way to create quick correlations and recap what happened • Media stats can then be turned in Time Series (monitoring/alerting)
  • 29. Challenge #3: correlating events • Sessions might be used to identify users, but can’t always be “trusted” • Works fine when users talk to Janus directly (1↔1 relationship) • There are server-side applications with a single session for all users, though • Enter opaque_id: a client-provided opaque identifier • Just set the same opaque ID for all handles belonging to the same user • The opaque ID can be whatever you want, Janus doesn’t care • Useful for intra-plugin, but also inter-plugin, correlations • e.g., to know a user is publishing and subscribing in a VideoRoom • ... but also, for instance, in a SIP call in the same application Want to learn more? http://www.meetecho.com/blog/correlating-janus-event-handlers/
  • 30. Challenge #3: correlating events • Sessions might be used to identify users, but can’t always be “trusted” • Works fine when users talk to Janus directly (1↔1 relationship) • There are server-side applications with a single session for all users, though • Enter opaque_id: a client-provided opaque identifier • Just set the same opaque ID for all handles belonging to the same user • The opaque ID can be whatever you want, Janus doesn’t care • Useful for intra-plugin, but also inter-plugin, correlations • e.g., to know a user is publishing and subscribing in a VideoRoom • ... but also, for instance, in a SIP call in the same application Want to learn more? http://www.meetecho.com/blog/correlating-janus-event-handlers/
  • 31. Challenge #3: correlating events • Sessions might be used to identify users, but can’t always be “trusted” • Works fine when users talk to Janus directly (1↔1 relationship) • There are server-side applications with a single session for all users, though • Enter opaque_id: a client-provided opaque identifier • Just set the same opaque ID for all handles belonging to the same user • The opaque ID can be whatever you want, Janus doesn’t care • Useful for intra-plugin, but also inter-plugin, correlations • e.g., to know a user is publishing and subscribing in a VideoRoom • ... but also, for instance, in a SIP call in the same application Want to learn more? http://www.meetecho.com/blog/correlating-janus-event-handlers/
  • 32. Challenge #3: correlating events • Sessions might be used to identify users, but can’t always be “trusted” • Works fine when users talk to Janus directly (1↔1 relationship) • There are server-side applications with a single session for all users, though • Enter opaque_id: a client-provided opaque identifier • Just set the same opaque ID for all handles belonging to the same user • The opaque ID can be whatever you want, Janus doesn’t care • Useful for intra-plugin, but also inter-plugin, correlations • e.g., to know a user is publishing and subscribing in a VideoRoom • ... but also, for instance, in a SIP call in the same application Want to learn more? http://www.meetecho.com/blog/correlating-janus-event-handlers/
  • 33. Challenge #3: storing and processing events
  • 34. Challenge #3: storing and processing events
  • 35. Challenge #3: storing and processing events
  • 36. Challenge #4: client-side events • All the discussion so far has been for server-side events • Janus originates events for what happens there • What about the client side perspective? • In WebRTC, standard mechanism for getting statistics on a PeerConnection • https://www.w3.org/TR/webrtc-stats/ • Calls to getStats() return useful info, but in JavaScript • How to get it to HOMER/HEPIC, possibly via Janus/Event Handlers as well? Solution: a new Janus plugin! • Client attaches and sends stats on a regular basis to the plugin via Janus API • Plugin relays stats via Event Handlers (same opaque ID as media channels) • Note: still WIP (working demo using rtcstats), but not open source yet
  • 37. Challenge #4: client-side events • All the discussion so far has been for server-side events • Janus originates events for what happens there • What about the client side perspective? • In WebRTC, standard mechanism for getting statistics on a PeerConnection • https://www.w3.org/TR/webrtc-stats/ • Calls to getStats() return useful info, but in JavaScript • How to get it to HOMER/HEPIC, possibly via Janus/Event Handlers as well? Solution: a new Janus plugin! • Client attaches and sends stats on a regular basis to the plugin via Janus API • Plugin relays stats via Event Handlers (same opaque ID as media channels) • Note: still WIP (working demo using rtcstats), but not open source yet
  • 38. Challenge #4: client-side events • All the discussion so far has been for server-side events • Janus originates events for what happens there • What about the client side perspective? • In WebRTC, standard mechanism for getting statistics on a PeerConnection • https://www.w3.org/TR/webrtc-stats/ • Calls to getStats() return useful info, but in JavaScript • How to get it to HOMER/HEPIC, possibly via Janus/Event Handlers as well? Solution: a new Janus plugin! • Client attaches and sends stats on a regular basis to the plugin via Janus API • Plugin relays stats via Event Handlers (same opaque ID as media channels) • Note: still WIP (working demo using rtcstats), but not open source yet
  • 39. Challenge #4: client-side events • All the discussion so far has been for server-side events • Janus originates events for what happens there • What about the client side perspective? • In WebRTC, standard mechanism for getting statistics on a PeerConnection • https://www.w3.org/TR/webrtc-stats/ • Calls to getStats() return useful info, but in JavaScript • How to get it to HOMER/HEPIC, possibly via Janus/Event Handlers as well? Solution: a new Janus plugin! • Client attaches and sends stats on a regular basis to the plugin via Janus API • Plugin relays stats via Event Handlers (same opaque ID as media channels) • Note: still WIP (working demo using rtcstats), but not open source yet
  • 40. A real use case: IETF meetings!
  • 41. Remote participation at the IETF https://www.slideshare.net/LorenzoMiniero/ietf-remote-participation-via-meetecho-webrtc-meetup-stockholm https://www.vuc.me/2017/vuc640-ietf-remote-participation-with-lorenzo-miniero/
  • 42. Studying data from IETF 101 in London • IETF remote participation based on multiple Janus plugins • SIP plugin for mixed audio • Streaming plugin for static sources • VideoRoom plugin for remote speakers • Collected events related to 10 different Working Group sessions • https://datatracker.ietf.org/meeting/agenda.html#2018-03-23-083000 • MMUSIC, HOMENET, ICCRG, DETNET, ROLL, SECEVENT, DTN, SPRING, IPSECME, LAMPS • Good mix of heterogeneous sessions • Some shorter, some longer (DETNET lasted 5 hours!) • Some had many active remote speakers • All had attendees from all over the world (different network conditions)
  • 43. Studying data from IETF 101 in London • IETF remote participation based on multiple Janus plugins • SIP plugin for mixed audio • Streaming plugin for static sources • VideoRoom plugin for remote speakers • Collected events related to 10 different Working Group sessions • https://datatracker.ietf.org/meeting/agenda.html#2018-03-23-083000 • MMUSIC, HOMENET, ICCRG, DETNET, ROLL, SECEVENT, DTN, SPRING, IPSECME, LAMPS • Good mix of heterogeneous sessions • Some shorter, some longer (DETNET lasted 5 hours!) • Some had many active remote speakers • All had attendees from all over the world (different network conditions)
  • 44. Studying data from IETF 101 in London • IETF remote participation based on multiple Janus plugins • SIP plugin for mixed audio • Streaming plugin for static sources • VideoRoom plugin for remote speakers • Collected events related to 10 different Working Group sessions • https://datatracker.ietf.org/meeting/agenda.html#2018-03-23-083000 • MMUSIC, HOMENET, ICCRG, DETNET, ROLL, SECEVENT, DTN, SPRING, IPSECME, LAMPS • Good mix of heterogeneous sessions • Some shorter, some longer (DETNET lasted 5 hours!) • Some had many active remote speakers • All had attendees from all over the world (different network conditions)
  • 45. First experiments: dumping events to Postgres • Postgres supports JSON natively, and is used by HOMER/HEPIC too • Why not play with this locally, first? • Created a single database, and a different table per each WG • Each table just has a unique index and the JSON value • All queries can be done on JSON fields • Played with different queries to identify different events • How many concurrent participants? How many were active? • Who subscribed to what? (SIP, slides, camera, remotees) • Any network errors? If so, caused by what? • What can we extract from the statistics?
  • 46. First experiments: dumping events to Postgres • Postgres supports JSON natively, and is used by HOMER/HEPIC too • Why not play with this locally, first? • Created a single database, and a different table per each WG • Each table just has a unique index and the JSON value • All queries can be done on JSON fields • Played with different queries to identify different events • How many concurrent participants? How many were active? • Who subscribed to what? (SIP, slides, camera, remotees) • Any network errors? If so, caused by what? • What can we extract from the statistics?
  • 47. First experiments: dumping events to Postgres • Postgres supports JSON natively, and is used by HOMER/HEPIC too • Why not play with this locally, first? • Created a single database, and a different table per each WG • Each table just has a unique index and the JSON value • All queries can be done on JSON fields • Played with different queries to identify different events • How many concurrent participants? How many were active? • Who subscribed to what? (SIP, slides, camera, remotees) • Any network errors? If so, caused by what? • What can we extract from the statistics?
  • 52. The ugliest charts you’ll ever see!
  • 53. Some bugs to be fixed in Janus too, I guess... • Analysing dumps, one thing popped to the eye: RTCP RTT > 4M?! • RTT was either quite low, or super-high, never in the middle • Turned out to be a bug in the RTCP parsing code, though... (that we fixed, now!)
  • 54. How does it look like in HOMER/HEPIC?
  • 55. How does it look like in HOMER/HEPIC?
  • 56. Cool demo with Lorenzo tomorrow!
  • 57. Next steps • Collecting real data and analysing it was very useful • Helped fix a couple of bugs (I’m looking at you, RTT!) • Showed we needed better info in some events (e.g., in selected-pair) • Very helpful in terms of HOMER/HEPIC integration as well • What were we looking for? • Was the available information enough? • Did we have all the instruments to monitor/navigate/search? What’s next? Not the end of the journey, just the beginning! • Need to generalize IETF meeting considerations to other use cases • Live monitoring and troubleshooting is definitely of interest • Most of the analysis was done on ex-post processing • Alerting is ready, though, so looking forward to that!
  • 58. Next steps • Collecting real data and analysing it was very useful • Helped fix a couple of bugs (I’m looking at you, RTT!) • Showed we needed better info in some events (e.g., in selected-pair) • Very helpful in terms of HOMER/HEPIC integration as well • What were we looking for? • Was the available information enough? • Did we have all the instruments to monitor/navigate/search? What’s next? Not the end of the journey, just the beginning! • Need to generalize IETF meeting considerations to other use cases • Live monitoring and troubleshooting is definitely of interest • Most of the analysis was done on ex-post processing • Alerting is ready, though, so looking forward to that!
  • 59. Next steps • Collecting real data and analysing it was very useful • Helped fix a couple of bugs (I’m looking at you, RTT!) • Showed we needed better info in some events (e.g., in selected-pair) • Very helpful in terms of HOMER/HEPIC integration as well • What were we looking for? • Was the available information enough? • Did we have all the instruments to monitor/navigate/search? What’s next? Not the end of the journey, just the beginning! • Need to generalize IETF meeting considerations to other use cases • Live monitoring and troubleshooting is definitely of interest • Most of the analysis was done on ex-post processing • Alerting is ready, though, so looking forward to that!
  • 60. Next steps • Collecting real data and analysing it was very useful • Helped fix a couple of bugs (I’m looking at you, RTT!) • Showed we needed better info in some events (e.g., in selected-pair) • Very helpful in terms of HOMER/HEPIC integration as well • What were we looking for? • Was the available information enough? • Did we have all the instruments to monitor/navigate/search? What’s next? Not the end of the journey, just the beginning! • Need to generalize IETF meeting considerations to other use cases • Live monitoring and troubleshooting is definitely of interest • Most of the analysis was done on ex-post processing • Alerting is ready, though, so looking forward to that!
  • 61. Next steps • Collecting real data and analysing it was very useful • Helped fix a couple of bugs (I’m looking at you, RTT!) • Showed we needed better info in some events (e.g., in selected-pair) • Very helpful in terms of HOMER/HEPIC integration as well • What were we looking for? • Was the available information enough? • Did we have all the instruments to monitor/navigate/search? What’s next? Not the end of the journey, just the beginning! • Need to generalize IETF meeting considerations to other use cases • Live monitoring and troubleshooting is definitely of interest • Most of the analysis was done on ex-post processing • Alerting is ready, though, so looking forward to that!
  • 62. Thanks! Questions? Comments? Get in touch! • https://twitter.com/elminiero • https://twitter.com/meetecho • http://www.meetecho.com