First of all thank you for replying
I was hoping there would be some discussion on the topic after I posted, but the conversation went elsewhere.
First of all, I just want to point out that this is not necessarily “my opinion” that I’m arguing here. This point is indisputable: Elixir developers are not using BEAM databases. We’re pretty much all using Ecto with relational databases, particularly Postgres/SQLite. I would imagine Postgres users outnumber Mnesia users by at least a few orders of magnitude in this community. When I said we lacked “proper” databases, the word “proper” was doing a lot of work there.
I would say Riak is a “real” database, but architecturally my understanding is that it’s a clone of Dynamo (the original Dynamo at that, not DDB).
This generation of distributed databases was born out of the early 2000s with BigTable and spread to DynamoDB, Cassandra, HBase, etc. The problem is that it’s now 2025, a full two decades later, and frankly these designs turned out to be a bit of an architectural dead end.
First of all, they partition data across machines with no affordances for atomic transactions across partitions (which were often of a limited size). As a result they offer virtually nonexistent consistency guarantees.
Second, because of the “distributed hash table” approach they fail to offer good support for range queries, which are extremely important for managing relational data. So as a result they also fail to offer a relational model, and it is nearly impossible to implement the relational model on top of them.
Modern “NewSQL” databases or transactional K/V stores (like FoundationDB) offer much better consistency guarantees and are built on top of a range-partitioned storage engine (not hash) so that they can perform range scans and implement the relational model. This tech is over a decade old (Spanner 2012, FDB early 2010s), so we’re not talking bleeding edge here. There is nothing like this on the BEAM to my knowledge, but if there is I would of course love to hear about it.
Finally, Khepri seems cool but as I understand it’s just a replicated (not scalable) K/V store which runs all operations through MultiPaxos (actually Raft). This architecture is maybe okay for the old “distributed lock table” approach (which is actually a terrible idea btw), but it’s not appropriate for a “real” database for two reasons.
First, you still only have one table, so you can’t scale this approach to more than one core. And second, by running the log through MultiPaxos on every write you are eating double or triple round-trip latency to write, so it’s just going to be slow.
FoundationDB for example does not do this - there is not even a two-phase commit in the commit path. It’s a much better design.