TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What's the simplest chat back end I can set up in the next 3 days?

1 点作者 talmr超过 2 年前
I&#x27;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&#x27;t turn out so well.<p>So - if you had to build a chat system in 3 days, how would you do it?

6 条评论

mindcrime超过 2 年前
If I were in that position I&#x27;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&#x27;m not necessarily saying this is the best overall solution in any universal sense... it&#x27;s what <i>I</i> would do at least in part because I&#x27;m already fairly familiar with setting up ejabberd and coding against an XMPP library. YMMV.
textninja超过 2 年前
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:&#x2F;&#x2F;feathersjs.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;feathersjs.com&#x2F;</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.
stop50超过 2 年前
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.
metadat超过 2 年前
<a href="http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;faqs&#x2F;smart-questions.html#before" rel="nofollow">http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;faqs&#x2F;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&#x27;re not being a lazy sponge and wasting people&#x27;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:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;P_versus_NP_problem" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;P_versus_NP_problem</a>? If so, what’s insufficient for you in that?<p>(I also think <a href="http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;faqs&#x2F;smart-questions.html#forum" rel="nofollow">http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;faqs&#x2F;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)
评论 #32893766 未加载
intelVISA超过 2 年前
If you&#x27;re happy with Node then something like SocketIO is decent for this type of stuff.
PeterPorky超过 2 年前
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&#x27;d take less time than the project setup and initial deployment.