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
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
stableis 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
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
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
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
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









