rtj

rtj

Best DB for chat

Hello everyone
I would like to know which database you prefer for chat applications?
I do not know if traditional databases are preferable or maybe there is some other option that works well with Elixir / Phoenix?

I would appreciate it if you can share your experience.
In this case it will be a fairly complete and large chat app.

Thanks

First Post!

idi527

idi527

I would try

  • scylla [0] for storing messages,
  • postgres for storing user metadata (might replace with cockroach [1] for lolavailability, it’s definitely production ready, hit 1.0 a few weeks ago),
  • elasticsearch for, well, searching through all those messages and users,
  • prometheus 2.0-alpha [2] for collecting and storing metrics (2.0-alpha because stable is way too stable)

[0] http://www.scylladb.com
[1] https://www.cockroachlabs.com
[2] https://prometheus.io

Actually, even though cockroach is very nice, I might still stay with postgres because of postgis (might come in handy if you plan to support location sharing, “users nearby”, “boys from my hood” etc.).

Note: I’ve never written anything more complex than a “hello world.” So you should really just skip to the next answer.

Most Liked

OvermindDL1

OvermindDL1

Eh, I’d honestly just use PostgreSQL for all that, it even has very advanced searching abilities that can out do elasticsearch in many cases, all while using the same database so no worry about things getting out of sync. Plus a chat app is mostly write and read with little to no ‘updating’, which is the perfect use-case for PostgreSQL (it flies the less ‘updating’ you do, mostly just reading and writing).

DianaOlympos

DianaOlympos

In general : Do Not Use Cassandra except if you have a really really good team of devs or a really really good team of Operators/SRE. And i would probably put a and here instead of a or if i could.

Cassandra seems nice from the outside, but it is really hard to operate and really hard to develop for, especially if you care about not losing data or getting acceptable time frame for answers.

JEG2

JEG2

Author of Designing Elixir Systems with OTP

I feel this is a rare problem to have and once you do have it, you’ll have the resources to address it.

Last Post!

idi527

idi527

Then probably genserver + postgres will work fine.

Where Next?

Popular in Questions Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44778 311
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New

We're in Beta

About us Mission Statement