Create chat server with elixir?

Hi everyone, I want to create chat services for my application, I do not want to use ejabberd or something like that server, is it possible to create my own service and how much time I will need?

What are your requirements? If you just need ephimeral, non-encrypted messages you can use Phoenix Channels to create chat rooms as needed. The clients can subscribe to the messages and also send them.

no , I want to create real chat app both web and mobile like whats app, but I do not know how to start to services

Is there a specific issue with using Ejabberd? XMPP is a solid standard for messaging (and WhatsApp uses a forked version of Ejabberd :slight_smile: ).

I guess whats app give up to use ejabberd

Maybe this one can help…

by @geo

The author of Phoenix in action


let me look,tnx so much

is it possible to create microservices with elixir for mobile chat app?

If you don’t like ejabberd and the xmpp protocol, you can use mqtt with VerneMQ. I don’t think it is possible to build a WA-like messenger without a messaging protocol such as mqtt or xmpp. I’m saying this as someone who has effectively build a mobile WA-like messenger app.

If ejabberd so important like that why whats app give app ejabberd, and İf I use the ejabberd how I will use elixir to customize services for chat app?

I’m not saying ejabberd is important. What is important is a message queueing protocol.

I don’t know what WA is using now. They forked ejabberd and havily changed the server. FB messenger is (was?) based on the mqtt protocol.

If you prefer an Elixir-based solution (Ejabberd, MongooseIM, and VerneMQ are all Erlang-based), you could search which message queueing servers are out there in the Elixir space. But using a server written in Erlang should not be a problem. Many Elixir projects use Erlang libraries and dependencies.

I’ve done that for mobiles with channels and React Native.

In the BEAM, every process is a sort of micro service.

ok tnx so much, it is a great explanation :slight_smile:

did you use ejabberd or …?

You are welcome !

I followed Erlang in Practice, from K. Smith, but it is not available anymore.

If I use ejabberd, is it possible customize it for my project with elixir?

I have not used ejabberd.

But You can see in the video if Phoenix reactivity fits your need.

I also liked this video about building a chat with Rust.

You can compare building a chat with low level tools :slight_smile:

1 Like

ok tnx so much :slight_smile:

is it possible to customize the ejabbedr with elixir, such as write notification service or etc?