5 ms·
What makes mongo mongo is its distibruted nature, without it you could just store json(b) in an RDBMS.
by karmakaze 2y ago
What makes mongo mongo is its distibruted nature, without it you could just store json(b) in an RDBMS.
- richwater 2y ago> store json(b) in an RDBMS I actually did this for as small HR application and it worked incredible well.jsonb gin indexes are pretty nice once you get the hang of the syntax. And then, you also have all the features of Postgres as a freebie.
- eddd-ddde 2y agoPersonally, I much better like postgres json syntax than whatever mongo invented. Big fan of jsonb columns.
- oskar_dudycz 2y agoI'm planning to add methods for raw JSON path or, in general, raw SQL syntax to enable such fine-tuning and not need to always use MongoDB API. I agree that for many people, this would be better.
- darby_nine 2y agobut then you wouldn't have the joy of using the most awkward query language invented by mankind
- lkdfjlkdfjlg 2y ago> What makes mongo mongo is its distibruted nature, without it you could just store json(b) in an RDBMS. Welllllllll I think that's moving the goalposts. Being distributed might be a thing _now_ but I still remember when it was marketed as the thing to have if you wanted to store unstructured documents. Now that Postgres also does that, you're marketing Mongo as having a different unique feature. Moving the goalposts.
- thfuran 2y agoIt doesn't really seem reasonable to accuse someone of moving goalposts that you've just brought into the conversation, especially when they were allegedly set by a third party.
- coldtea 2y agoParent didn't "just brought them", they merely referrenced the pre-existing goalposts used to advocate for Mongo and reasons devs adopted it.
- lkdfjlkdfjlg 2y agoExactly this, very eloquent, thank you. Yes, I'm still bitter because I was one of those tricked into it.
- zihotki 2y agoBut RDBMS'es are often also distributed. So what is mongo now?
- marcosdumay 2y agoPeople don't usually distribute Postgres (unless you count read replicas and cold HA replicas). But well, people don't usually distribute MongoDB either, so no difference. In principle, a cluster of something like Mongo can scale much further than Postgres. In practice, Mongo is full of issues even before you replicate it, and you are better with something that abstracts a set if incoherent Postgres (or sqlite) instances.
- zozbot234 2y agoPostgres supports foreign data wrapper (FDW), which is the basic building block for a distributed DB. It doesn't support strong consistency in distributed settings as of yet, although it does provide two-phase commit which could be used for such.
- williamdclt 2y ago> strong consistency in distributed settings I doubt it ever will. The point of distributing a data store is latency and availability, both of which would go down the drain with distributed strong consistency
- hibikir 2y agoI think of the Stripe Mongo install, as it was a decade or so ago. It really was sharded quite wide, and relied on all shards having multiple replicas, as to tolerate cycling through them on a regular basis. It worked well enough to run as a source of truth for a financial company, but the database team wasn't small, dedicated to keeping all that machinery working well. Ultimately anyone doing things at that scale is going to run a small priesthood doing custom things to keep the persistence payer humming, regardless of what the underlying database is. I recall a project abstracting over the Mongo API, as to allow for swapping the storage layer if they ever needed to
- anonzzzies 2y agoSo how easy is it to distribute it? I don’t have experience with it but the tutorials look terrible compared to, say, Scylla, Yuga, Cockroach, TiDB etc. Again, honest question?
- rad_gruchalski 2y agoPongo seems to be a middleware between your app and Postgres. So it will most certainly work absolutely fine on YugabyteDB, if one’s okay with occasional latency issues. One could optimise it more for a distributed sql by implementing key partition awareness and connecting directly to a tserver storing the data one’s after.
- oskar_dudycz 2y agoYes, as long as database has support to JSONB and JSON path syntax (so PG 12 >= compliant) you should be good to go :)
- rad_gruchalski 2y agoIt could work: https://docs.yugabyte.com/preview/explore/ysql-language-features/jsonb-ysql/ https://docs.yugabyte.com/preview/explore/ysql-language-feat....
- theteapot 2y agoDoes "distributed" mean sharded or just replicated? In either case it's a bit quirky but easy enough. > Scylla, Yuga, Cockroach, TiDB etc. You have experience "distributing" all these DBs? That's impressive.
- anonzzzies 2y agoWe evaluated these over the years for different purposes/clients. And I don’t expect the ‘quirky’ part in 2024 I guess; it gets hard of course when the loads get specific; but in general I expect things to be automatic (multi master, sharding and replication) and simple to set up. Point out other nodes and done.
- rework 2y ago> What makes mongo mongo is its distibruted nature Since when? Mongo was popular because it gave the false perception it was insanely fast until people found out it was only fast if you didn't care about your data, and the moment you ensure write happened it ended up being slower than an RDB....
- jokethrowaway 2y agoSince forever, sharding, distributing postgres / mysql was not easy. There were a few proprietary extensions. Nowadays it's more accessible. This was typical crap you had to say to pass fang style interview "oh of course I'd use mongo because this use case doesn't have relations and because it's easy to scale", while you know postgres will give you way less problems and allow you to make charts and analytics in 30m when finance comes around. I made the mistake of picking mongo for my own startup, because of propaganda coming from interviewing materials and I regretted it for the entire duration of the company.
- threeseed 2y ago> Nowadays it's more accessible Distributing PostgreSQL still requires proprietary extensions. With the most popular being Citus which is owned by Microsoft and so questions should definitely remain about how long they support that instead of pushing users to Azure. People like to bash MongoDB but at least they have a built-in, supported and usable HA/Clustering solution. It's ridiculous to not have this in 2024.
- deleted 2y ago[deleted]
- foobarkey 2y agoTrying to use MongoDB by default for new projects because of the built in HA, dumped Postgres because the HA story is so bad on bare metal (alright if you are ok burning money on RDS or simiar). Current preference: 1. HA MongoDB 2. HA MariaDB (Galera) or MySQL Cluster 3. Postgres Rube Goldberg Machine HA with Patroni 4. No HA Postgres