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

phoenix
webrtc
video-streaming
elixirconf2018
#1

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

3 Likes
I am planning to create chat application which need to send files like voice, video, image etc
#2

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
#3

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

#4

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

#5

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
#6

I found it!

2 Likes