Erlang/Elixir for voice calls?

Afternoon.

I am a junior Node / React developer & have newly found the world of Erlang/Elixir fascinating.

Having worked only with JSON data & React components, I would like to inquire as to Erlang’s/Elixir’s viability for building chat applications with text messaging & voice calls.

Having read some intros, I was left with the assumption that most voice calls o Android are handled solely with Erlang on the server & processing of readable streams with JAVA on Android, JS & browser APIs in the browser. Please correct me if I’m wrong, how are they typically handled?

I plan to invest heavily in either Elixir or Golang, preferably Elixir since scalability seems to be better & I witnessed a demonstration of hard real-time (was it really?) capabilities at a local conference.

Thank you.

2 Likes

Hello and Welcome! I hope you find this community friendly and helpful !

If you are building a communication platform (voice calls, text messages, etc) then you will be hard pressed to find anything more suited for the job than Erlang/Elixir.

Most of the telecommunication’s infrastructure in use today is using Erlang and Erlang was built specifically for this problem (See Open Telecom Platform for that effect).

Without going that far, Whatsap is built using Erlang (and Mnesia iirc):

You don’t have to use Mnesia, odds are any other DB will do just fine for you. I also believe Whatsap is a good study case for what you want to achieve.

As for Go, it is also a very strong competitor, at least in regards to elixir. There have been a lot of discussions and comparisons between Go and Elixir in this forum, so I will just direct you to them:

3 Likes

I see, thanks. Will take a look.

Would you recommend Elixir in Action, 2nd Edition for learning how to stream audio/video, possibly video files?

I heard that over 60% of audio messaging between phone calls is send using Erlang, is that true?

Convinced my manager the other day to consider proposing the introduction of Elixir in the company, after he learned about some of its documented capabilities, portability & unmatched fault-tolerance. Seems a well-rounded solution to the buggy, unreliable JS ecosystem.

Without going that far, Whatsap is built using Erlang

I see they use Erlang & PHP, do they receive/process/send the audio stream with Erlang?

I would recommend Elixir in Action for anyone learning Elixir. His author @sasajuric is rather active in the forum and very approachable. I have bought and read the book and I have also had a series of conversations in this forum with him so I can vouch that if you want to learn Elixir his work (and conferences) won’t disappoint you.

However, I am not sure I would recommend that specific book if your main focus is Streaming audio and video, the main objective of the book is not to teach you streaming, it’s to teach Elixir fundamentals.

I don’t know the exact number, but I do know it is used in a lot of switches for Telecom:

http://erlang.org/faq/introduction.html#idp32560400

As the post I have directed you to explains, they use Erlang for the processing of audio and messages and PHP for the web development part (I assume for the whats app web page they have).

2 Likes

As mentionned, Elixir/Erlang are well suited for telecom… Building a text chat is quite simple, but adding voice is more challenging.

For media, You can add webrtc, and use Elixir as the signalling server. Some use Janus gateway.

For more complex scenario (signal processing), You might check Membrane.

3 Likes

I’ll be releasing a library for interfacing with Asterisk pretty soon. It utilizes ARI a REST and WebSocket interface for Asterisk.

Asterisk supports WebRTC and several other protocols. This offloads the video and audio handling from Elixir, so it may not be exactly what you’re looking to utilize.

Do you have any idea on the protocols/technologies you want to utilize? WebRTC? SIP? Jabber?

5 Likes

Generally, how did they manage to get around Erlang’s supposedly bad performance with signal processing?

Why do they say that when you can do things like:
https://stackoverflow.com/questions/37544655/elixir-stream-audio-to-users

Do they interoperate with Rust/C++ or is Membrane sufficient ?

Thanks.

How about UHD stream? Would that be viable for VOIP with let’s say a React Native app?

I have never used UHD stream, I tried with webrtc.

1 Like