Is it possible to use Phoenix Channel to create a app like WhatsApp or Telegram,not like their scale but like their function

I want to build an IM app, used in a middle scale company(< 2000 employee ). It could send messages , images, and videos.

I have noticed many IM plans such as
https://github.com/esl/MongooseIM,
https://github.com/processone/ejabberd

But I just curious whether Phoenix Channel can do the same thing as ejabberd?

1 Like

Yes, it is possible. It also has kind of been done already, as WhatsApps original backend software was built in erlang.

1 Like

Or maybe I should ask,
How does Phoenix Channel compare with XMPP in terms of reliability and maturity

WhatsApp is still Erlang. Maybe you are thinking of Facebook Messanger that was originally written in Erlang?

1 Like

I’ve heard rumours about pushing away from erlang after it has been acquired by FaceBook.

In light of Facebook is trying to add static typing for Erlang I don’t that is plausible.


There is also thread about that in this forum Facebook is writing a new, statically typed language to run on the BEAM?!

2 Likes

I know about that, but between acquisition and this information are about 6/7 years?

Maybe I misunderstood something then? You wrote

WhatsApps original backend software was built in erlang

I thought that meant it’s not written in Erlang anymore and that was the reason of my first post to you. What I meant from my previous post that it’s doesn’t sound plausible that “pushing away” from Erlang is going to happen. Yes I’ll bet there has been talk about moving away from Erlang at Facebook at some point probably because messenger switched to I think C++. Switching from immutable language like Erlang to C++ that is much more error prone sounds crazy to me.

XMPP is just a protocol, you can use different transport channels, and Phoenix Channel is one of them. However in most cases there would be no point in that as Phoenix Channels are meant mostly for WebSockets and XMPP can use raw TCP connections. So if you want you can for example build Web UI for XMPP with Phoenix that would use Phoenix Channels for communicating with browser and use raw TCP in the backend.

3 Likes

Definitely possible. Just take a look at Discord, it’s built almost entirely in Elixir, with a dash of Rust here and here.

Outside of the biggest elephants like WhatsApp and Telegram, Discord is one of the most used chat programs.

My information could be wrong, but i recall reading that Facebook messenger was originally written in erlang and they did a full rewrite into c++ “because no one could understand the code” which is what cause the errors and bugginess for a long time.