17) ElixirConf US 2018 – Building Video Chat with Elixir & Phoenix – Anil Wadghule

ElixirConf US 2018 – Building Video Chat with Elixir & Phoenix – Anil Wadghule (@anildigital)

In this talk, I will share my experience and learnings about how I built a production-grade video chat system with Elixir and Phoenix.

My video chat app makes use of following features of Elixir and Phoenix.

Real-time with Phoenix channels
How a Video Chat benefits with real-time features of Phoenix framework. In a Video Chat app, there are so many interactions which happen in a group, so you need real-time capabilities on your server.

Agents, Tasks, GenSevers
How I used Agents to wrap the state, I need to talk to a third party server, how I used Tasks to perform certain operations, how I used GenServers for long-running features like Cache servers and recorded media file uploaders.

Supervisors
Instead of crashing, how we gracefully stop services. When users close tabs, other users in video chat should be gracefully informed that users have quit. I will cover, how we make use of supervisors and GenServers for the use case.

GenStage for events processing with a remote WebRTC media server
Third party media server has API and continually sends different events such as network is slow, user’s video is unpublished or audio went off etc. We will see how I make use of GenStage’s event handling to show user’s feedback interactively.

Debugging
We will see how Erlang’s debugging tools come in handy when there is something wrong.

Audience: Intermediate, Advanced
Topics: phoenix, video-streaming, webrtc

All talks are available in the ElixirConf US 2018 Talks List or via the elixirconf2018 tag

4 Likes

Cool talk Anil! I might have to pick your brains one day as I will probably experiment with video chat at some point :003:

How is this solution scaling for you at Scatter? Not sure if you can mention numbers and server stats but I’d be interested in hearing how this is deployed :slight_smile:

1 Like

Anybody remember a similar talk done by a guy from Brazil I believe where he talks about making an entire video streaming service in Elixir? It was done around the same time, I think, yet at a different conference.

Michael

Not from Brazil, but is this the video you are thinking of?

No, I’m pretty sure it was a different guy. I will look around on YouTube and if I find it I will post the link here.

1 Like

I found it!

3 Likes

thanks @maz for sharing this video link. this is quite interesting.

1 Like

I’m not sure what happened but the link disappeared. Here is it again:

ElixirConf 2018 - Using Elixir GenStage to Track Video Watch Progress - Emerson Macedo