|
|
|
|
|
by SideburnsOfDoom
2376 days ago
|
|
> persistent messaging is built on a database. Even RabbitMQ's persistent messaging is built on a database (Mnesia). Good point that any system that is "persistent" has a data store by definition. The real question is that if it's a good fit to a SQL relational database. |
|
Postgres checks those boxes, as do others.
Technically, though, Postgres has been an "object-relational" database for some time.
In the end, Message DB uses a table as an append-only log, and leverages Postgres indexes, advisory locks, and JSON documents (and indexes) to implement some of the critical messaging features and patterns. It's not using the "relational" aspects of Postgres. There are no relational tables.
Here's the table schema: https://github.com/message-db/message-db/blob/master/databas...
Given the paucity of Postgres features that the message store leverages, it could have been implemented against the raw Postgres storage engine. Had we done that, though, few people could have understood it and been able to specialize it to their purposes using plain old SQL. And any performance improvements induced by skipping Postgres's tabular data abstractions would have been so negligible for the schema in question that it wouldn't have offered much return on the effort.