I remember seeing on the Elixir subreddit a long time ago that a user was building a Discord alternative (Probably because Discord mines all data for profit and is closed source).
I doubt that project kept going (it’s quite ambitious after all).
But I wanted to open this thread to discuss ideas about how such a thing could be built.
Building a group chat application in Elixir should be fairly straightforward. However, the biggest hurdle would likely be the group audio.
I know Discord uses WebRTC (with their own enhancements), but I’ve also seen someone suggest using Mumble as the audio backend.
I know there is an Elixir GUI system in the works, but for now, the obvious choice would put Elixir only as the backend and something like React Native / Proton Native as the frontend.
Here’s an example of how to interact with janus from elixir via unix sockets. The SDP packets were sent to the elixir server via websockets, which were then relayed to janus. Making basic chats is actually already easy in erlang/elixir, I’d probably wouldn’t use mongoose …
I think the best bet would be implementing a Matrix server. It’s not necessarily the smallest project (see the spec) but in terms of functionality I think it’s great.
Chat rooms are relatively simple (and yet matrix seems to make this extremely complex).
I think the biggest hurdle is rooms that are multi-media.
In practice, most discord “servers” have text and voice channels with the same name. So when you’re in this voice channel, you type in the text channel with the same name.
I think there’s room for improvement by simply making generic multi-media rooms that are persistent only in text.
So for example, it would be like having a Jitsi meeting that is always running and users can jump in and out of seamlessly.