3 ms·
When you need to dynamically scale the "cluster membership" of a distributed datastore. When you need more data than a single instance can handle. I've worked
by lmm 8y ago
When you need to dynamically scale the "cluster membership" of a distributed datastore. When you need more data than a single instance can handle.
I've worked on products that used Mongo and could not have worked with Postgres. Mongo has plenty of issues but Postgres barely has support for true master-master replication even with a static set of nodes, yet alone doing dynamic scaling.
I tend towards Cassandra rather than Mongo, but if we're talking about advantages for NoSQL more generally I'd say: when you need to do reporting queries without them interfering with live queries. When you want index updates to happen behind "live" changes for performance reasons. When you want a query language that makes sense as a programmer and lets you understand query performance from reading the query. When you want a nonblocking client library in the JVM ecosystem. (Hell, when you want your client library and the ecosystem on top of it to have first-class support for your database's features - Postgresql may have first-class support for JSON but that doesn't mean your ORM does). All these things are possible with SQL, but harder.
- chaostheory 8y agoCitusDB? https://www.citusdata.com/ https://www.citusdata.com/ There are a few other solutions for postgres as well.
- lmm 8y agoThere are various efforts, but none of them is mature/established enough that I'd trust it (and I heard of specific issues with some of them, though I think citrusdb is newer than when I last looked). Maybe this one works, but without an established community around it I'd rather stick to cassandra.
- chaostheory 8y agoCitus is almost a decade old now. Others like Greenplum are even older. I like Cassandra, but like most NoSQL, if you want to use it as a general purpose datastore; there's a lot of work to do for devs
- lmm 8y ago> if you want to use it as a general purpose datastore; there's a lot of work to do for devs I'd say that's equally true for postgres. Adapting your data to a relational model does not come naturally, and to use postgresql as a document store requires learning a whole lot of novel postgresql-only functionality that the community will always treat as second-class.