3 ms·
These are fundamentally different database technologies. Postgres is a powerful SQL based store while Mongo was originally built around the idea of a write neve
by vorpalhex 8y ago
These are fundamentally different database technologies. Postgres is a powerful SQL based store while Mongo was originally built around the idea of a write never failing.
Postgres tends to keep a speed edge but the jsonb syntax is awkward and some operations can be trickier for a developer to navigate. Scaling uses traditional sql strategies.
Mongo has a pretty nifty query language but more difficult queries start becoming quite slow. Scaling is a bit different then Postgres.
Like any tech choice, it's not about what is vogue or trendy but what best fits your problem space.
- davidgl 8y agoThis is a recent attempt to make a nicer Document API for PG: https://github.com/robconery/dox https://github.com/robconery/dox
- deleted 8y ago[deleted]
- kqr 8y ago> built around the idea of a write never failing. What am I missing if I think this sounds like a very interesting thought experiment, but completely disconnected from reality?
- zzzcpan 8y agoIn distributed systems getting to a failing state is exactly the same as getting to a succeeding state, both have to make CAP consistency/availability trade offs. So in many cases not failing is just easier.
- vorpalhex 8y agoThe tradeoff is "consistency". As long as some node of Mongo is running, it'll do it's absolute damned best to accept a write, including buffering in memory and all kinds of other tricks. However, if you write to it and then immediately read.. you might not get back what you just wrote (but it will eventually show up in reads). Likewise, you might get different responses from different nodes in some weird situations. A few things to note: This weird behavior is only in a failure state (eg a network partition), and I believe it's no longer the default but can be enabled. It's very useful for lots of applications, but isn't the right choice for all applications.