I've got a mobile app, and I need to add a chat feature ASAP.<p>I know Go, Nodejs, and Elixir (beginner). Out of these, it seems like Elixir (using Phoenix channels) might be the simplest approach. But I have never built a chat system before, with auth and some restrictions.<p>I also know that there are chat SDKs that I can use, but the biggest downside is that the pricing is insane.<p>I also know that I could just use firestore and be done with it tonight. However, that comes with its own set of issues. I tried it in the past, and it didn't turn out so well.<p>So - if you had to build a chat system in 3 days, how would you do it?
If I were in that position I'd just stand up an ejabberd server, find an XMPP library for whatever language my app is written in, and configure XMPP chat. Now I'm not necessarily saying this is the best overall solution in any universal sense... it's what <i>I</i> would do at least in part because I'm already fairly familiar with setting up ejabberd and coding against an XMPP library. YMMV.
Elixer does seem tailor made for this sort of thing, but I’ve never used it so I can only recommend you try [feathersjs](<a href="https://feathersjs.com/" rel="nofollow">https://feathersjs.com/</a>). Setting up a chat backend with it was fairly straightforward, but your mileage may vary as it does force some abstractions that you may not want.
In 3 days? It would impossible for me to code the serverside, so i would use something already that is done.
in that case i would probably use matrix. I can scale it by adding more servers or if its an game where you have an serverselection you can limit it to one server and in case when there is an need for chatting across servers i can use the federation.
<a href="http://www.catb.org/~esr/faqs/smart-questions.html#before" rel="nofollow">http://www.catb.org/~esr/faqs/smart-questions.html#before</a>:<p>“When you ask your question, display the fact that you have done these things first; this will help establish that you're not being a lazy sponge and wasting people's time. Better yet, display what you have learned from doing these things. We like answering questions for people who have demonstrated they can learn from the answers.”<p>Also, knowing what you know and don’t know may make helping you a lot easier, thus increasing the possibility that you’ll get an answer that helps you.<p>In particular, if you did “Try to find an answer by searching the Web.”, did you find <a href="https://en.wikipedia.org/wiki/P_versus_NP_problem" rel="nofollow">https://en.wikipedia.org/wiki/P_versus_NP_problem</a>? If so, what’s insufficient for you in that?<p>(I also think <a href="http://www.catb.org/~esr/faqs/smart-questions.html#forum" rel="nofollow">http://www.catb.org/~esr/faqs/smart-questions.html#forum</a> applies. IMO, this isn’t the forum to ask these kind of question, but will let the community judge that)
In 3 days? Just create a basic CRUD backend with each message getting a row in a table (or whatever db you use). Honestly the actual messages part feels like it'd take less time than the project setup and initial deployment.