SlideShare a Scribd company logo
1 of 50
Download to read offline
Writing a Janus plugin in Lua
C can be a scary world, let us come to the rescue!
Lorenzo Miniero
@elminiero
FOSDEM 2018 Real Time devroom
4th February 2018, Brussels
Remember Janus?
• A door between the communications past and future
• Legacy technologies (the “past”)
• WebRTC (the “future”)
Janus
General 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
A quick recap: 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
• “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
• Plugins can be combined on client side as “bricks”
• Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
“Pointers, pointers, everywhere...”
• Plugins a very powerful way to extend Janus, but...
• ... everything in Janus is written in C! (well, except the web demos of course...)
• May be troublesome for some users to write their own (when really needed)
Let’s have a look at the Plugin API (1)
• Plugin initialization and information
• init(): called when plugin is loaded
• destroy(): called when Janus is shutting down
• get_api_compatibility(): must return JANUS_PLUGIN_API_VERSION
• get_version(): numeric version identifier (e.g., 3)
• get_version_string(): verbose version identifier (e.g., “v1.0.1”)
• get_description(): verbose description of the plugin (e.g., “This is my awesome plugin
that does this and that”)
• get_name(): short display name for your plugin (e.g., “My Awesome Plugin”)
• get_author(): author of the plugin (e.g., “Meetecho s.r.l.”)
• get_package(): unique package identifier for your plugin (e.g., “janus.plugin.myplugin”)
Let’s have a look at the Plugin API (2)
• Sessions management (callbacks invoked by the core)
• create_session(): a user (session+handle) just attached to the plugin
• handle_message(): incoming message/request (with or without a JSEP/SDP)
• setup_media(): PeerConnection is now ready to be used
• incoming_rtp(): incoming RTP packet
• incoming_rtcp(): incoming RTCP message
• incoming_data(): incoming DataChannel message
• slow_link(): notification of problems on media path
• hangup_media(): PeerConnection has been closed (e.g., DTLS alert)
• query_session(): called to get plugin-specific info on a user session
• destroy_session(): existing user gone (handle detached)
Let’s have a look at the Plugin API (3)
• Interaction with the core (methods invoked by the plugin)
• push_event(): send the user a JSON message/event (with or without a JSEP/SDP)
• relay_rtp(): send/relay the user an RTP packet
• relay_rtcp(): send/relay the user an RTCP message
• relay_data(): send/relay the user a DataChannel message
• close_pc(): close the user’s PeerConnection
• end_session(): close a user session (force-detach core handle)
• events_is_enabled(): check whether the event handlers mechanism is enabled
• notify_event(): notify an event to the registered and subscribed event handlers
Sequence diagrams (sessions mgmt)
Sequence diagrams (sessions mgmt)
Sequence diagrams (sessions mgmt)
Sequence diagrams (sessions mgmt)
Sequence diagrams (sessions mgmt)
Sequence diagrams (sessions mgmt)
Writing a plugin in a different language
• All the above methods and callbacks need to be implemented in C
• The core loads a shared module, and the core is written in C
• That said, does the logic really need to be written in C too?
• As long as stubs are C, the core is happy
• What these stubs do and return can be done in a different way
• All we need is provide hooks and bindings in C, and delegate the logic
Exactly what we did with the Lua plugin!
• https://github.com/meetecho/janus-gateway/pull/1033
• http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
Writing a plugin in a different language
• All the above methods and callbacks need to be implemented in C
• The core loads a shared module, and the core is written in C
• That said, does the logic really need to be written in C too?
• As long as stubs are C, the core is happy
• What these stubs do and return can be done in a different way
• All we need is provide hooks and bindings in C, and delegate the logic
Exactly what we did with the Lua plugin!
• https://github.com/meetecho/janus-gateway/pull/1033
• http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
Writing a plugin in a different language
• All the above methods and callbacks need to be implemented in C
• The core loads a shared module, and the core is written in C
• That said, does the logic really need to be written in C too?
• As long as stubs are C, the core is happy
• What these stubs do and return can be done in a different way
• All we need is provide hooks and bindings in C, and delegate the logic
Exactly what we did with the Lua plugin!
• https://github.com/meetecho/janus-gateway/pull/1033
• http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
Writing a plugin in a different language
• All the above methods and callbacks need to be implemented in C
• The core loads a shared module, and the core is written in C
• That said, does the logic really need to be written in C too?
• As long as stubs are C, the core is happy
• What these stubs do and return can be done in a different way
• All we need is provide hooks and bindings in C, and delegate the logic
Exactly what we did with the Lua plugin!
• https://github.com/meetecho/janus-gateway/pull/1033
• http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
Janus Lua plugin: the basics
• Conceptually simple: C plugin, but with an embedded Lua state machine
• Load a user-provided Lua script when initializing the plugin
• Implement plugin callbacks in C, and have them call a Lua function
• Implement core methods as Lua functions in C, that the Lua script can invoke
• Track users/sessions via a unique ID that the C and Lua code share
• In theory, everything works (simple C↔Lua proxy)
• The core sees a C plugin, but logic is handled in Lua
• In practice, that’s not enough...
1 Lua is single threaded (how to do things really asynchronously?)
2 Handling RTP in Lua space would kill performance
Janus Lua plugin: the basics
• Conceptually simple: C plugin, but with an embedded Lua state machine
• Load a user-provided Lua script when initializing the plugin
• Implement plugin callbacks in C, and have them call a Lua function
• Implement core methods as Lua functions in C, that the Lua script can invoke
• Track users/sessions via a unique ID that the C and Lua code share
• In theory, everything works (simple C↔Lua proxy)
• The core sees a C plugin, but logic is handled in Lua
• In practice, that’s not enough...
1 Lua is single threaded (how to do things really asynchronously?)
2 Handling RTP in Lua space would kill performance
Janus Lua plugin: the basics
• Conceptually simple: C plugin, but with an embedded Lua state machine
• Load a user-provided Lua script when initializing the plugin
• Implement plugin callbacks in C, and have them call a Lua function
• Implement core methods as Lua functions in C, that the Lua script can invoke
• Track users/sessions via a unique ID that the C and Lua code share
• In theory, everything works (simple C↔Lua proxy)
• The core sees a C plugin, but logic is handled in Lua
• In practice, that’s not enough...
1 Lua is single threaded (how to do things really asynchronously?)
2 Handling RTP in Lua space would kill performance
Hooks and bindings (1)
• Plugin initialization and information
C Lua
init() −→ init()
destroy() −→ destroy()
get_api_compatibility() −→ not needed
get_version() −→ getVersion()1
get_version_string() −→ getVersionString()1
get_description() −→ getDescription()1
get_name() −→ getName()1
get_author() −→ getAuthor()1
get_package() −→ getPackage()1
1
Not really needed, so optional
Hooks and bindings (2)
• Sessions management (callbacks invoked by the core)
C Lua
create_session() −→ createSession()
handle_message() −→ handleMessage()
setup_media() −→ setupMedia()
incoming_rtp() −→ incomingRtp()2
incoming_rtcp() −→ incomingRtcp()2
incoming_data() −→ incomingData()2
slow_link() −→ slowLink()
hangup_media() −→ hangupMedia()
query_session() −→ querySession()
destroy_session() −→ destroySession()
2
Not the right way... more on this later!
Hooks and bindings (3)
• Interaction with the core (methods invoked by the plugin)
C Lua
push_event() ←− pushEvent()
relay_rtp() ←− relayRtp()3
relay_rtcp() ←− relayRtcp()3
relay_data() ←− relayData()3
close_pc() ←− closePc()
end_session() ←− endSession()
events_is_enabled() ←− eventsIsEnabled()4
notify_event() ←− notifyEvent()
3
Not the right way... more on this later!
4
Not really needed, so optional
Example of hooks and bindings
Asynchronous logic in the Lua plugin
• We’ve seen how asynchronous events are heavily used by plugins
• Asynchronous message response, negotiations, etc.
• Most out-of-the-box Janus plugins are thread based
• Lua is single threaded, though...
• Coroutines can be seen as threads, but they aren’t
• Access to the Lua state isn’t thread safe either
Solution: a C “scheduler”
A dedicated thread in the C code of the plugin acts as scheduler
• The Lua script queues tasks, and “pokes” the scheduler via pokeScheduler()
• pokeScheduler() is implemented in C, and wakes the scheduler (queue)
• The C scheduler calls resumeScheduler() in Lua as a coroutine
Asynchronous logic in the Lua plugin
• We’ve seen how asynchronous events are heavily used by plugins
• Asynchronous message response, negotiations, etc.
• Most out-of-the-box Janus plugins are thread based
• Lua is single threaded, though...
• Coroutines can be seen as threads, but they aren’t
• Access to the Lua state isn’t thread safe either
Solution: a C “scheduler”
A dedicated thread in the C code of the plugin acts as scheduler
• The Lua script queues tasks, and “pokes” the scheduler via pokeScheduler()
• pokeScheduler() is implemented in C, and wakes the scheduler (queue)
• The C scheduler calls resumeScheduler() in Lua as a coroutine
Asynchronous logic in the Lua plugin
• We’ve seen how asynchronous events are heavily used by plugins
• Asynchronous message response, negotiations, etc.
• Most out-of-the-box Janus plugins are thread based
• Lua is single threaded, though...
• Coroutines can be seen as threads, but they aren’t
• Access to the Lua state isn’t thread safe either
Solution: a C “scheduler”
A dedicated thread in the C code of the plugin acts as scheduler
• The Lua script queues tasks, and “pokes” the scheduler via pokeScheduler()
• pokeScheduler() is implemented in C, and wakes the scheduler (queue)
• The C scheduler calls resumeScheduler() in Lua as a coroutine
Scheduler example: asynchronous reply
Scheduler example: asynchronous reply
Timed callbacks in the Lua plugin
• pokeScheduler() and resumeScheduler() are great but have limits
• No arguments can be passed to the scheduler
• You need to keep track of tasks yourself
• The resumeScheduler() function is called as soon as possible
• You may want to trigger a callback (with a parameter?) after some time instead
• e.g., “call secondsPassed(5) in 5 seconds”
Solution: a new timeCallback function as a C hook
A timed source in the C code of the plugin acts as triggerer
• The Lua script times a callback via timeCallback()
• timeCallback() is implemented in C, and creates a timed source
• The source fires and calls the specified callback in Lua as a coroutine
Timed callbacks in the Lua plugin
• pokeScheduler() and resumeScheduler() are great but have limits
• No arguments can be passed to the scheduler
• You need to keep track of tasks yourself
• The resumeScheduler() function is called as soon as possible
• You may want to trigger a callback (with a parameter?) after some time instead
• e.g., “call secondsPassed(5) in 5 seconds”
Solution: a new timeCallback function as a C hook
A timed source in the C code of the plugin acts as triggerer
• The Lua script times a callback via timeCallback()
• timeCallback() is implemented in C, and creates a timed source
• The source fires and calls the specified callback in Lua as a coroutine
Timed callbacks in the Lua plugin
• pokeScheduler() and resumeScheduler() are great but have limits
• No arguments can be passed to the scheduler
• You need to keep track of tasks yourself
• The resumeScheduler() function is called as soon as possible
• You may want to trigger a callback (with a parameter?) after some time instead
• e.g., “call secondsPassed(5) in 5 seconds”
Solution: a new timeCallback function as a C hook
A timed source in the C code of the plugin acts as triggerer
• The Lua script times a callback via timeCallback()
• timeCallback() is implemented in C, and creates a timed source
• The source fires and calls the specified callback in Lua as a coroutine
What about RTP/RTCP/data?
• As we pointed out, handling data in Lua drags performance down
• While hooks are there, there’s a cost in going from C to Lua and viceversa
• Lua state is single threaded, meaning relaying would have a bottleneck
• Arguably this is more of an issue for RTP, less so for RTCP and data
• ... unless RTCP and data messages are very frequent too
Solution: only configuring routing in Lua (actual relaying still in C)
The C code routes the media according to dynamic changes coming from Lua
• addRecipient() and removeRecipient() dictate who receives user’s media
• configureMedium() opens/closes valves for outgoing/incoming media
• Helper methods (setBitrate(), sendPli(), etc.) do the rest
What about RTP/RTCP/data?
• As we pointed out, handling data in Lua drags performance down
• While hooks are there, there’s a cost in going from C to Lua and viceversa
• Lua state is single threaded, meaning relaying would have a bottleneck
• Arguably this is more of an issue for RTP, less so for RTCP and data
• ... unless RTCP and data messages are very frequent too
Solution: only configuring routing in Lua (actual relaying still in C)
The C code routes the media according to dynamic changes coming from Lua
• addRecipient() and removeRecipient() dictate who receives user’s media
• configureMedium() opens/closes valves for outgoing/incoming media
• Helper methods (setBitrate(), sendPli(), etc.) do the rest
What about RTP/RTCP/data?
• As we pointed out, handling data in Lua drags performance down
• While hooks are there, there’s a cost in going from C to Lua and viceversa
• Lua state is single threaded, meaning relaying would have a bottleneck
• Arguably this is more of an issue for RTP, less so for RTCP and data
• ... unless RTCP and data messages are very frequent too
Solution: only configuring routing in Lua (actual relaying still in C)
The C code routes the media according to dynamic changes coming from Lua
• addRecipient() and removeRecipient() dictate who receives user’s media
• configureMedium() opens/closes valves for outgoing/incoming media
• Helper methods (setBitrate(), sendPli(), etc.) do the rest
Routing media (SFU example)
A few examples: EchoTest clone
Something trickier: VideoRoom clone
VideoCall clone: a tutorial
http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
Astricon 2017 Dangerous Demo
https://gist.github.com/lminiero/9aeeda1be501fb636cad0c8057c6e076
One more cool example... Chatroulette!
https://github.com/lminiero/fosdem18-januslua
One more cool example... Chatroulette!
https://github.com/lminiero/fosdem18-januslua
One more cool example... Chatroulette!
https://github.com/lminiero/fosdem18-januslua
One more cool example... Chatroulette!
What to do next?
• Integrate advanced features recently added to master
• RTP injection/forwarding, simulcasting, VP9 SVC, ...
• General improvements may be needed once it’s used more
• Based on refcount branch, which is experimental itself
• Do Lua-based Transport plugins and Event Handlers make any sense?
• They’re plugins (shared objects) too, after all...
• Why not, write new plugins for other programming languages!
• Most hooks are already there, after all, we only need bindings
• A potential “candidate”: JavaScript (e.g., with http://duktape.org/)
Help us improve this!
• Play with it, more testing is important
• Write your own applications, or help expand the Lua plugin itself!
What to do next?
• Integrate advanced features recently added to master
• RTP injection/forwarding, simulcasting, VP9 SVC, ...
• General improvements may be needed once it’s used more
• Based on refcount branch, which is experimental itself
• Do Lua-based Transport plugins and Event Handlers make any sense?
• They’re plugins (shared objects) too, after all...
• Why not, write new plugins for other programming languages!
• Most hooks are already there, after all, we only need bindings
• A potential “candidate”: JavaScript (e.g., with http://duktape.org/)
Help us improve this!
• Play with it, more testing is important
• Write your own applications, or help expand the Lua plugin itself!
What to do next?
• Integrate advanced features recently added to master
• RTP injection/forwarding, simulcasting, VP9 SVC, ...
• General improvements may be needed once it’s used more
• Based on refcount branch, which is experimental itself
• Do Lua-based Transport plugins and Event Handlers make any sense?
• They’re plugins (shared objects) too, after all...
• Why not, write new plugins for other programming languages!
• Most hooks are already there, after all, we only need bindings
• A potential “candidate”: JavaScript (e.g., with http://duktape.org/)
Help us improve this!
• Play with it, more testing is important
• Write your own applications, or help expand the Lua plugin itself!
What to do next?
• Integrate advanced features recently added to master
• RTP injection/forwarding, simulcasting, VP9 SVC, ...
• General improvements may be needed once it’s used more
• Based on refcount branch, which is experimental itself
• Do Lua-based Transport plugins and Event Handlers make any sense?
• They’re plugins (shared objects) too, after all...
• Why not, write new plugins for other programming languages!
• Most hooks are already there, after all, we only need bindings
• A potential “candidate”: JavaScript (e.g., with http://duktape.org/)
Help us improve this!
• Play with it, more testing is important
• Write your own applications, or help expand the Lua plugin itself!
What to do next?
• Integrate advanced features recently added to master
• RTP injection/forwarding, simulcasting, VP9 SVC, ...
• General improvements may be needed once it’s used more
• Based on refcount branch, which is experimental itself
• Do Lua-based Transport plugins and Event Handlers make any sense?
• They’re plugins (shared objects) too, after all...
• Why not, write new plugins for other programming languages!
• Most hooks are already there, after all, we only need bindings
• A potential “candidate”: JavaScript (e.g., with http://duktape.org/)
Help us improve this!
• Play with it, more testing is important
• Write your own applications, or help expand the Lua plugin itself!
Thanks! Questions? Comments?
Get in touch!
• https://twitter.com/elminiero
• https://twitter.com/meetecho
• http://www.meetecho.com

More Related Content

What's hot

Janus workshop @ RTC2019 Beijing
Janus workshop @ RTC2019 BeijingJanus workshop @ RTC2019 Beijing
Janus workshop @ RTC2019 BeijingLorenzo Miniero
 
Janus @ WebRTC Meetup Stockholm
Janus @ WebRTC Meetup StockholmJanus @ WebRTC Meetup Stockholm
Janus @ WebRTC Meetup StockholmLorenzo Miniero
 
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 MBONEDLorenzo Miniero
 
WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017Lorenzo Miniero
 
JamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConferenceJamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConferenceLorenzo Miniero
 
Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Lorenzo Miniero
 
Simulcast/SVC @ IIT-RTC 2019
Simulcast/SVC @ IIT-RTC 2019Simulcast/SVC @ IIT-RTC 2019
Simulcast/SVC @ IIT-RTC 2019Lorenzo Miniero
 
SIP/WebRTC load testing @ KamailioWorld 2017
SIP/WebRTC load testing @ KamailioWorld 2017SIP/WebRTC load testing @ KamailioWorld 2017
SIP/WebRTC load testing @ KamailioWorld 2017Lorenzo Miniero
 
Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019Lorenzo Miniero
 
Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021Lorenzo Miniero
 
Multistream in Janus @ CommCon 2019
Multistream in Janus @ CommCon 2019Multistream in Janus @ CommCon 2019
Multistream in Janus @ CommCon 2019Lorenzo Miniero
 
WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022Lorenzo Miniero
 
FOSDEM2017 - Janus Event Handlers
FOSDEM2017 - Janus Event HandlersFOSDEM2017 - Janus Event Handlers
FOSDEM2017 - Janus Event HandlersLorenzo Miniero
 
WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021Lorenzo Miniero
 
IETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup StockholmIETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup StockholmLorenzo Miniero
 
Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021Lorenzo Miniero
 
Janus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) serverJanus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) serverDevDay
 
Janus/HOMER/HEPIC @ OpenSIPS18
Janus/HOMER/HEPIC @ OpenSIPS18Janus/HOMER/HEPIC @ OpenSIPS18
Janus/HOMER/HEPIC @ OpenSIPS18Lorenzo Miniero
 

What's hot (20)

Janus workshop @ RTC2019 Beijing
Janus workshop @ RTC2019 BeijingJanus workshop @ RTC2019 Beijing
Janus workshop @ RTC2019 Beijing
 
Janus @ WebRTC Meetup Stockholm
Janus @ WebRTC Meetup StockholmJanus @ WebRTC Meetup Stockholm
Janus @ WebRTC Meetup Stockholm
 
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 @ RTC2017 Beijing
Janus @ RTC2017 BeijingJanus @ RTC2017 Beijing
Janus @ RTC2017 Beijing
 
WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017WebRTC Rockstars Asian Tour 2017
WebRTC Rockstars Asian Tour 2017
 
JamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConferenceJamRTC @ Wonder WebRTC unConference
JamRTC @ Wonder WebRTC unConference
 
Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021
 
Simulcast/SVC @ IIT-RTC 2019
Simulcast/SVC @ IIT-RTC 2019Simulcast/SVC @ IIT-RTC 2019
Simulcast/SVC @ IIT-RTC 2019
 
SIP/WebRTC load testing @ KamailioWorld 2017
SIP/WebRTC load testing @ KamailioWorld 2017SIP/WebRTC load testing @ KamailioWorld 2017
SIP/WebRTC load testing @ KamailioWorld 2017
 
Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019Fuzzing Janus @ IPTComm 2019
Fuzzing Janus @ IPTComm 2019
 
Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021Janus Workshop pt.2 @ ClueCon 2021
Janus Workshop pt.2 @ ClueCon 2021
 
Multistream in Janus @ CommCon 2019
Multistream in Janus @ CommCon 2019Multistream in Janus @ CommCon 2019
Multistream in Janus @ CommCon 2019
 
WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022
 
FOSDEM2017 - Janus Event Handlers
FOSDEM2017 - Janus Event HandlersFOSDEM2017 - Janus Event Handlers
FOSDEM2017 - Janus Event Handlers
 
WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021WHIP and Janus @ IIT-RTC 2021
WHIP and Janus @ IIT-RTC 2021
 
IETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup StockholmIETF remote participation via Meetecho @ WebRTC Meetup Stockholm
IETF remote participation via Meetecho @ WebRTC Meetup Stockholm
 
Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021Janus + NDI @ ClueCon 2021
Janus + NDI @ ClueCon 2021
 
Janus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) serverJanus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) server
 
Janus/HOMER/HEPIC @ OpenSIPS18
Janus/HOMER/HEPIC @ OpenSIPS18Janus/HOMER/HEPIC @ OpenSIPS18
Janus/HOMER/HEPIC @ OpenSIPS18
 
Janus @ ClueCon 2019
Janus @ ClueCon 2019Janus @ ClueCon 2019
Janus @ ClueCon 2019
 

Similar to FOSDEM2018 Janus Lua plugin presentation

Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)p3castro
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xrkr10
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using SwiftDiego Freniche Brito
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsYoshiki Shibukawa
 
NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017Maarten Balliauw
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Adam Dunkels
 
C++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroC++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroMohammad Shaker
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Anthony Dahanne
 
Leveraging zeromq for node.js
Leveraging zeromq for node.jsLeveraging zeromq for node.js
Leveraging zeromq for node.jsRuben Tan
 
PyParis 2017 / Writing a C Python extension in 2017, Jean-Baptiste Aviat
PyParis 2017 / Writing a C Python extension in 2017, Jean-Baptiste Aviat PyParis 2017 / Writing a C Python extension in 2017, Jean-Baptiste Aviat
PyParis 2017 / Writing a C Python extension in 2017, Jean-Baptiste Aviat Pôle Systematic Paris-Region
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
Puppet in k8s, Miroslav Hadzhiev
Puppet in k8s, Miroslav HadzhievPuppet in k8s, Miroslav Hadzhiev
Puppet in k8s, Miroslav HadzhievPuppet
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014Rafe Colton
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...Docker, Inc.
 
From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R Kai Lichtenberg
 
ITCamp 2017 - Raffaele Rialdi - A Deep Dive Into Bridging Node-js with .NET Core
ITCamp 2017 - Raffaele Rialdi - A Deep Dive Into Bridging Node-js with .NET CoreITCamp 2017 - Raffaele Rialdi - A Deep Dive Into Bridging Node-js with .NET Core
ITCamp 2017 - Raffaele Rialdi - A Deep Dive Into Bridging Node-js with .NET CoreITCamp
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek PROIDEA
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackJakub Hajek
 
Php on the Web and Desktop
Php on the Web and DesktopPhp on the Web and Desktop
Php on the Web and DesktopElizabeth Smith
 

Similar to FOSDEM2018 Janus Lua plugin presentation (20)

Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and Errors
 
NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
C++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroC++ Windows Forms L01 - Intro
C++ Windows Forms L01 - Intro
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
 
Leveraging zeromq for node.js
Leveraging zeromq for node.jsLeveraging zeromq for node.js
Leveraging zeromq for node.js
 
PyParis 2017 / Writing a C Python extension in 2017, Jean-Baptiste Aviat
PyParis 2017 / Writing a C Python extension in 2017, Jean-Baptiste Aviat PyParis 2017 / Writing a C Python extension in 2017, Jean-Baptiste Aviat
PyParis 2017 / Writing a C Python extension in 2017, Jean-Baptiste Aviat
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Puppet in k8s, Miroslav Hadzhiev
Puppet in k8s, Miroslav HadzhievPuppet in k8s, Miroslav Hadzhiev
Puppet in k8s, Miroslav Hadzhiev
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
 
From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R
 
ITCamp 2017 - Raffaele Rialdi - A Deep Dive Into Bridging Node-js with .NET Core
ITCamp 2017 - Raffaele Rialdi - A Deep Dive Into Bridging Node-js with .NET CoreITCamp 2017 - Raffaele Rialdi - A Deep Dive Into Bridging Node-js with .NET Core
ITCamp 2017 - Raffaele Rialdi - A Deep Dive Into Bridging Node-js with .NET Core
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
 
Php on the Web and Desktop
Php on the Web and DesktopPhp on the Web and Desktop
Php on the Web and Desktop
 

More from Lorenzo Miniero

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 2024Lorenzo Miniero
 
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 ServerLorenzo Miniero
 
WebRTC Broadcasting @ TADSummit 2023
WebRTC Broadcasting @ TADSummit 2023WebRTC Broadcasting @ TADSummit 2023
WebRTC Broadcasting @ TADSummit 2023Lorenzo Miniero
 
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 2023Lorenzo Miniero
 
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 2023Lorenzo Miniero
 
Become a rockstar using FOSS!
Become a rockstar using FOSS!Become a rockstar using FOSS!
Become a rockstar using FOSS!Lorenzo Miniero
 
Janus SFU cascading @ IIT-RTC 2022
Janus SFU cascading @ IIT-RTC 2022Janus SFU cascading @ IIT-RTC 2022
Janus SFU cascading @ IIT-RTC 2022Lorenzo Miniero
 
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 2022Lorenzo Miniero
 
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 MOPSLorenzo Miniero
 
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 JanusLorenzo Miniero
 
Janus RTP forwarders @ FOSDEM 2020
Janus RTP forwarders @ FOSDEM 2020Janus RTP forwarders @ FOSDEM 2020
Janus RTP forwarders @ FOSDEM 2020Lorenzo Miniero
 
Welcome to JanusCon! -- Past, Present and Future of Janus
Welcome to JanusCon! -- Past, Present and Future of JanusWelcome to JanusCon! -- Past, Present and Future of Janus
Welcome to JanusCon! -- Past, Present and Future of JanusLorenzo Miniero
 

More from Lorenzo Miniero (13)

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
 
BWE in Janus
BWE in JanusBWE in Janus
BWE in Janus
 
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
 
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
 
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
 
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
 
Janus RTP forwarders @ FOSDEM 2020
Janus RTP forwarders @ FOSDEM 2020Janus RTP forwarders @ FOSDEM 2020
Janus RTP forwarders @ FOSDEM 2020
 
Welcome to JanusCon! -- Past, Present and Future of Janus
Welcome to JanusCon! -- Past, Present and Future of JanusWelcome to JanusCon! -- Past, Present and Future of Janus
Welcome to JanusCon! -- Past, Present and Future of Janus
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 

FOSDEM2018 Janus Lua plugin presentation

  • 1. Writing a Janus plugin in Lua C can be a scary world, let us come to the rescue! Lorenzo Miniero @elminiero FOSDEM 2018 Real Time devroom 4th February 2018, Brussels
  • 2. Remember Janus? • A door between the communications past and future • Legacy technologies (the “past”) • WebRTC (the “future”) Janus General 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
  • 3. A quick recap: 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 • “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 • Plugins can be combined on client side as “bricks” • Video SFU, Audio MCU, SIP gatewaying, broadcasting, etc.
  • 4. “Pointers, pointers, everywhere...” • Plugins a very powerful way to extend Janus, but... • ... everything in Janus is written in C! (well, except the web demos of course...) • May be troublesome for some users to write their own (when really needed)
  • 5. Let’s have a look at the Plugin API (1) • Plugin initialization and information • init(): called when plugin is loaded • destroy(): called when Janus is shutting down • get_api_compatibility(): must return JANUS_PLUGIN_API_VERSION • get_version(): numeric version identifier (e.g., 3) • get_version_string(): verbose version identifier (e.g., “v1.0.1”) • get_description(): verbose description of the plugin (e.g., “This is my awesome plugin that does this and that”) • get_name(): short display name for your plugin (e.g., “My Awesome Plugin”) • get_author(): author of the plugin (e.g., “Meetecho s.r.l.”) • get_package(): unique package identifier for your plugin (e.g., “janus.plugin.myplugin”)
  • 6. Let’s have a look at the Plugin API (2) • Sessions management (callbacks invoked by the core) • create_session(): a user (session+handle) just attached to the plugin • handle_message(): incoming message/request (with or without a JSEP/SDP) • setup_media(): PeerConnection is now ready to be used • incoming_rtp(): incoming RTP packet • incoming_rtcp(): incoming RTCP message • incoming_data(): incoming DataChannel message • slow_link(): notification of problems on media path • hangup_media(): PeerConnection has been closed (e.g., DTLS alert) • query_session(): called to get plugin-specific info on a user session • destroy_session(): existing user gone (handle detached)
  • 7. Let’s have a look at the Plugin API (3) • Interaction with the core (methods invoked by the plugin) • push_event(): send the user a JSON message/event (with or without a JSEP/SDP) • relay_rtp(): send/relay the user an RTP packet • relay_rtcp(): send/relay the user an RTCP message • relay_data(): send/relay the user a DataChannel message • close_pc(): close the user’s PeerConnection • end_session(): close a user session (force-detach core handle) • events_is_enabled(): check whether the event handlers mechanism is enabled • notify_event(): notify an event to the registered and subscribed event handlers
  • 14. Writing a plugin in a different language • All the above methods and callbacks need to be implemented in C • The core loads a shared module, and the core is written in C • That said, does the logic really need to be written in C too? • As long as stubs are C, the core is happy • What these stubs do and return can be done in a different way • All we need is provide hooks and bindings in C, and delegate the logic Exactly what we did with the Lua plugin! • https://github.com/meetecho/janus-gateway/pull/1033 • http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
  • 15. Writing a plugin in a different language • All the above methods and callbacks need to be implemented in C • The core loads a shared module, and the core is written in C • That said, does the logic really need to be written in C too? • As long as stubs are C, the core is happy • What these stubs do and return can be done in a different way • All we need is provide hooks and bindings in C, and delegate the logic Exactly what we did with the Lua plugin! • https://github.com/meetecho/janus-gateway/pull/1033 • http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
  • 16. Writing a plugin in a different language • All the above methods and callbacks need to be implemented in C • The core loads a shared module, and the core is written in C • That said, does the logic really need to be written in C too? • As long as stubs are C, the core is happy • What these stubs do and return can be done in a different way • All we need is provide hooks and bindings in C, and delegate the logic Exactly what we did with the Lua plugin! • https://github.com/meetecho/janus-gateway/pull/1033 • http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
  • 17. Writing a plugin in a different language • All the above methods and callbacks need to be implemented in C • The core loads a shared module, and the core is written in C • That said, does the logic really need to be written in C too? • As long as stubs are C, the core is happy • What these stubs do and return can be done in a different way • All we need is provide hooks and bindings in C, and delegate the logic Exactly what we did with the Lua plugin! • https://github.com/meetecho/janus-gateway/pull/1033 • http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
  • 18. Janus Lua plugin: the basics • Conceptually simple: C plugin, but with an embedded Lua state machine • Load a user-provided Lua script when initializing the plugin • Implement plugin callbacks in C, and have them call a Lua function • Implement core methods as Lua functions in C, that the Lua script can invoke • Track users/sessions via a unique ID that the C and Lua code share • In theory, everything works (simple C↔Lua proxy) • The core sees a C plugin, but logic is handled in Lua • In practice, that’s not enough... 1 Lua is single threaded (how to do things really asynchronously?) 2 Handling RTP in Lua space would kill performance
  • 19. Janus Lua plugin: the basics • Conceptually simple: C plugin, but with an embedded Lua state machine • Load a user-provided Lua script when initializing the plugin • Implement plugin callbacks in C, and have them call a Lua function • Implement core methods as Lua functions in C, that the Lua script can invoke • Track users/sessions via a unique ID that the C and Lua code share • In theory, everything works (simple C↔Lua proxy) • The core sees a C plugin, but logic is handled in Lua • In practice, that’s not enough... 1 Lua is single threaded (how to do things really asynchronously?) 2 Handling RTP in Lua space would kill performance
  • 20. Janus Lua plugin: the basics • Conceptually simple: C plugin, but with an embedded Lua state machine • Load a user-provided Lua script when initializing the plugin • Implement plugin callbacks in C, and have them call a Lua function • Implement core methods as Lua functions in C, that the Lua script can invoke • Track users/sessions via a unique ID that the C and Lua code share • In theory, everything works (simple C↔Lua proxy) • The core sees a C plugin, but logic is handled in Lua • In practice, that’s not enough... 1 Lua is single threaded (how to do things really asynchronously?) 2 Handling RTP in Lua space would kill performance
  • 21. Hooks and bindings (1) • Plugin initialization and information C Lua init() −→ init() destroy() −→ destroy() get_api_compatibility() −→ not needed get_version() −→ getVersion()1 get_version_string() −→ getVersionString()1 get_description() −→ getDescription()1 get_name() −→ getName()1 get_author() −→ getAuthor()1 get_package() −→ getPackage()1 1 Not really needed, so optional
  • 22. Hooks and bindings (2) • Sessions management (callbacks invoked by the core) C Lua create_session() −→ createSession() handle_message() −→ handleMessage() setup_media() −→ setupMedia() incoming_rtp() −→ incomingRtp()2 incoming_rtcp() −→ incomingRtcp()2 incoming_data() −→ incomingData()2 slow_link() −→ slowLink() hangup_media() −→ hangupMedia() query_session() −→ querySession() destroy_session() −→ destroySession() 2 Not the right way... more on this later!
  • 23. Hooks and bindings (3) • Interaction with the core (methods invoked by the plugin) C Lua push_event() ←− pushEvent() relay_rtp() ←− relayRtp()3 relay_rtcp() ←− relayRtcp()3 relay_data() ←− relayData()3 close_pc() ←− closePc() end_session() ←− endSession() events_is_enabled() ←− eventsIsEnabled()4 notify_event() ←− notifyEvent() 3 Not the right way... more on this later! 4 Not really needed, so optional
  • 24. Example of hooks and bindings
  • 25. Asynchronous logic in the Lua plugin • We’ve seen how asynchronous events are heavily used by plugins • Asynchronous message response, negotiations, etc. • Most out-of-the-box Janus plugins are thread based • Lua is single threaded, though... • Coroutines can be seen as threads, but they aren’t • Access to the Lua state isn’t thread safe either Solution: a C “scheduler” A dedicated thread in the C code of the plugin acts as scheduler • The Lua script queues tasks, and “pokes” the scheduler via pokeScheduler() • pokeScheduler() is implemented in C, and wakes the scheduler (queue) • The C scheduler calls resumeScheduler() in Lua as a coroutine
  • 26. Asynchronous logic in the Lua plugin • We’ve seen how asynchronous events are heavily used by plugins • Asynchronous message response, negotiations, etc. • Most out-of-the-box Janus plugins are thread based • Lua is single threaded, though... • Coroutines can be seen as threads, but they aren’t • Access to the Lua state isn’t thread safe either Solution: a C “scheduler” A dedicated thread in the C code of the plugin acts as scheduler • The Lua script queues tasks, and “pokes” the scheduler via pokeScheduler() • pokeScheduler() is implemented in C, and wakes the scheduler (queue) • The C scheduler calls resumeScheduler() in Lua as a coroutine
  • 27. Asynchronous logic in the Lua plugin • We’ve seen how asynchronous events are heavily used by plugins • Asynchronous message response, negotiations, etc. • Most out-of-the-box Janus plugins are thread based • Lua is single threaded, though... • Coroutines can be seen as threads, but they aren’t • Access to the Lua state isn’t thread safe either Solution: a C “scheduler” A dedicated thread in the C code of the plugin acts as scheduler • The Lua script queues tasks, and “pokes” the scheduler via pokeScheduler() • pokeScheduler() is implemented in C, and wakes the scheduler (queue) • The C scheduler calls resumeScheduler() in Lua as a coroutine
  • 30. Timed callbacks in the Lua plugin • pokeScheduler() and resumeScheduler() are great but have limits • No arguments can be passed to the scheduler • You need to keep track of tasks yourself • The resumeScheduler() function is called as soon as possible • You may want to trigger a callback (with a parameter?) after some time instead • e.g., “call secondsPassed(5) in 5 seconds” Solution: a new timeCallback function as a C hook A timed source in the C code of the plugin acts as triggerer • The Lua script times a callback via timeCallback() • timeCallback() is implemented in C, and creates a timed source • The source fires and calls the specified callback in Lua as a coroutine
  • 31. Timed callbacks in the Lua plugin • pokeScheduler() and resumeScheduler() are great but have limits • No arguments can be passed to the scheduler • You need to keep track of tasks yourself • The resumeScheduler() function is called as soon as possible • You may want to trigger a callback (with a parameter?) after some time instead • e.g., “call secondsPassed(5) in 5 seconds” Solution: a new timeCallback function as a C hook A timed source in the C code of the plugin acts as triggerer • The Lua script times a callback via timeCallback() • timeCallback() is implemented in C, and creates a timed source • The source fires and calls the specified callback in Lua as a coroutine
  • 32. Timed callbacks in the Lua plugin • pokeScheduler() and resumeScheduler() are great but have limits • No arguments can be passed to the scheduler • You need to keep track of tasks yourself • The resumeScheduler() function is called as soon as possible • You may want to trigger a callback (with a parameter?) after some time instead • e.g., “call secondsPassed(5) in 5 seconds” Solution: a new timeCallback function as a C hook A timed source in the C code of the plugin acts as triggerer • The Lua script times a callback via timeCallback() • timeCallback() is implemented in C, and creates a timed source • The source fires and calls the specified callback in Lua as a coroutine
  • 33. What about RTP/RTCP/data? • As we pointed out, handling data in Lua drags performance down • While hooks are there, there’s a cost in going from C to Lua and viceversa • Lua state is single threaded, meaning relaying would have a bottleneck • Arguably this is more of an issue for RTP, less so for RTCP and data • ... unless RTCP and data messages are very frequent too Solution: only configuring routing in Lua (actual relaying still in C) The C code routes the media according to dynamic changes coming from Lua • addRecipient() and removeRecipient() dictate who receives user’s media • configureMedium() opens/closes valves for outgoing/incoming media • Helper methods (setBitrate(), sendPli(), etc.) do the rest
  • 34. What about RTP/RTCP/data? • As we pointed out, handling data in Lua drags performance down • While hooks are there, there’s a cost in going from C to Lua and viceversa • Lua state is single threaded, meaning relaying would have a bottleneck • Arguably this is more of an issue for RTP, less so for RTCP and data • ... unless RTCP and data messages are very frequent too Solution: only configuring routing in Lua (actual relaying still in C) The C code routes the media according to dynamic changes coming from Lua • addRecipient() and removeRecipient() dictate who receives user’s media • configureMedium() opens/closes valves for outgoing/incoming media • Helper methods (setBitrate(), sendPli(), etc.) do the rest
  • 35. What about RTP/RTCP/data? • As we pointed out, handling data in Lua drags performance down • While hooks are there, there’s a cost in going from C to Lua and viceversa • Lua state is single threaded, meaning relaying would have a bottleneck • Arguably this is more of an issue for RTP, less so for RTCP and data • ... unless RTCP and data messages are very frequent too Solution: only configuring routing in Lua (actual relaying still in C) The C code routes the media according to dynamic changes coming from Lua • addRecipient() and removeRecipient() dictate who receives user’s media • configureMedium() opens/closes valves for outgoing/incoming media • Helper methods (setBitrate(), sendPli(), etc.) do the rest
  • 36. Routing media (SFU example)
  • 37. A few examples: EchoTest clone
  • 39. VideoCall clone: a tutorial http://www.meetecho.com/blog/tutorial-writing-a-janus-video-call-plugin-in-lua/
  • 40. Astricon 2017 Dangerous Demo https://gist.github.com/lminiero/9aeeda1be501fb636cad0c8057c6e076
  • 41. One more cool example... Chatroulette! https://github.com/lminiero/fosdem18-januslua
  • 42. One more cool example... Chatroulette! https://github.com/lminiero/fosdem18-januslua
  • 43. One more cool example... Chatroulette! https://github.com/lminiero/fosdem18-januslua
  • 44. One more cool example... Chatroulette!
  • 45. What to do next? • Integrate advanced features recently added to master • RTP injection/forwarding, simulcasting, VP9 SVC, ... • General improvements may be needed once it’s used more • Based on refcount branch, which is experimental itself • Do Lua-based Transport plugins and Event Handlers make any sense? • They’re plugins (shared objects) too, after all... • Why not, write new plugins for other programming languages! • Most hooks are already there, after all, we only need bindings • A potential “candidate”: JavaScript (e.g., with http://duktape.org/) Help us improve this! • Play with it, more testing is important • Write your own applications, or help expand the Lua plugin itself!
  • 46. What to do next? • Integrate advanced features recently added to master • RTP injection/forwarding, simulcasting, VP9 SVC, ... • General improvements may be needed once it’s used more • Based on refcount branch, which is experimental itself • Do Lua-based Transport plugins and Event Handlers make any sense? • They’re plugins (shared objects) too, after all... • Why not, write new plugins for other programming languages! • Most hooks are already there, after all, we only need bindings • A potential “candidate”: JavaScript (e.g., with http://duktape.org/) Help us improve this! • Play with it, more testing is important • Write your own applications, or help expand the Lua plugin itself!
  • 47. What to do next? • Integrate advanced features recently added to master • RTP injection/forwarding, simulcasting, VP9 SVC, ... • General improvements may be needed once it’s used more • Based on refcount branch, which is experimental itself • Do Lua-based Transport plugins and Event Handlers make any sense? • They’re plugins (shared objects) too, after all... • Why not, write new plugins for other programming languages! • Most hooks are already there, after all, we only need bindings • A potential “candidate”: JavaScript (e.g., with http://duktape.org/) Help us improve this! • Play with it, more testing is important • Write your own applications, or help expand the Lua plugin itself!
  • 48. What to do next? • Integrate advanced features recently added to master • RTP injection/forwarding, simulcasting, VP9 SVC, ... • General improvements may be needed once it’s used more • Based on refcount branch, which is experimental itself • Do Lua-based Transport plugins and Event Handlers make any sense? • They’re plugins (shared objects) too, after all... • Why not, write new plugins for other programming languages! • Most hooks are already there, after all, we only need bindings • A potential “candidate”: JavaScript (e.g., with http://duktape.org/) Help us improve this! • Play with it, more testing is important • Write your own applications, or help expand the Lua plugin itself!
  • 49. What to do next? • Integrate advanced features recently added to master • RTP injection/forwarding, simulcasting, VP9 SVC, ... • General improvements may be needed once it’s used more • Based on refcount branch, which is experimental itself • Do Lua-based Transport plugins and Event Handlers make any sense? • They’re plugins (shared objects) too, after all... • Why not, write new plugins for other programming languages! • Most hooks are already there, after all, we only need bindings • A potential “candidate”: JavaScript (e.g., with http://duktape.org/) Help us improve this! • Play with it, more testing is important • Write your own applications, or help expand the Lua plugin itself!
  • 50. Thanks! Questions? Comments? Get in touch! • https://twitter.com/elminiero • https://twitter.com/meetecho • http://www.meetecho.com