News for hackers. Stuff that matters.
Re:Red Hat Satellite to standardize on PostgreSQL backend by Bucephalus355 on Wednesday February 13, 2019 @09:03PM (#19159060)
Wow was MongoDB really that bad?
Re:Red Hat Satellite to standardize on PostgreSQL backend by foobiekr on Wednesday February 13, 2019 @09:15PM (#19159115)
A way to think about that question is to ask whether typelessness in general is bad because a lot of the schemaless databases come from that side of the divide.

I’d personally answer yes, but that’s because I believe that typed, schema-generates structures should be pushed all the way from the database to the typescript code on the front end. Changes become something you can deal with with high confidence and things like typos, etc. become impossible. Relational structures enforced in the database (and imho sadly lacking in the intervening layers which is something I’d like to get the time to deal with; though the FoubdationDB record layer certainly has an interesting if unexploited take on it) is a natural extension of this.

But there’s a whole other world where people just don’t want to be tied to constraints. I suspect it’s a personality thing.

Re:Red Hat Satellite to standardize on PostgreSQL backend by int_19h on Wednesday February 13, 2019 @09:59PM (#19159282)
Strong typing and schemas are a bit different. They're often conflated, but once you start thinking about more complicated examples, this makes sense.

Look at Clojure for a good example - it is strongly (but dynamically) typed, but then it also has schemas with automatic validation on top of it (Spec).

Re:Red Hat Satellite to standardize on PostgreSQL backend by vp8989 on Thursday February 14, 2019 @10:23AM (#19162506)
"I suspect it’s a personality thing."

I do too. And also probably a lack of experience dealing with outages and remediation of mistakes.

If it's always someone else's problem to clean up your mistakes then you can't appropriately appreciate how valuable it is that a machine can help you make less of them.

Re:Red Hat Satellite to standardize on PostgreSQL backend by mlevental on Wednesday February 13, 2019 @09:44PM (#19159231)
how do you do this? tie it all the way from the DB to the client?

incidentally I believe this is the difference between being an engineer and being a product person. I straddle the line. in theory I want a strong type system so I can be confident about the future. in practice I don't want to pay the upfront cost and I'm more interested in shipping now and taking on debt.

Re:Red Hat Satellite to standardize on PostgreSQL backend by atombender on Thursday February 14, 2019 @01:09AM (#19159966)
Look at GraphQL. It lets you enforce a single schema from the front end down to the data layer.

In my company's product, we specify the data models as JSON Schema, and then generate the necessary language code -- we generate the GraphQL schema from it as well as Go data types, with some database glue. Our front end code is currently JavaScript, but we hope to migrate to TypeScript, which will make everything statically types all the way through.

(gRPC fills a similar role, though the web story is lacking. gRPC is brilliant for APIs between backend services, but browser support is not there yet. GraphQL is more convenient for the app-facing layers.)

Re:Red Hat Satellite to standardize on PostgreSQL backend by mlevental on Thursday February 14, 2019 @09:49AM (#19162225)
Re:Red Hat Satellite to standardize on PostgreSQL backend by atombender on Thursday February 14, 2019 @01:55PM (#19164704)
Yes, you can make it work. But you have to run this special shim or proxy, because browsers still don't all support HTTP/2, header trailers, etc. Hence "lacking".
Re:Red Hat Satellite to standardize on PostgreSQL backend by foobiekr on Thursday February 14, 2019 @03:10PM (#19165518)
We wrote it. Everything is derived from proto for us. Some of that is hand-written tooling, some is off the shelf. Mostly you have to be aware at design time of what this approach entails.

Proto is not elegant and the data model and implementation (especially the very poor performance of maps in the Go implementation) can leave a lot to be desired, but it's a thing that pretty much supports everything. It has good enough performance without headaches. Lowest common denominator can be quite useful and so can constraints.

Re:Red Hat Satellite to standardize on PostgreSQL backend by jacques_chester on Wednesday February 13, 2019 @09:50PM (#19159253)
What upfront cost?
Re:Red Hat Satellite to standardize on PostgreSQL backend by emmanueloga_ on Wednesday February 13, 2019 @09:08PM (#19159089)
Possible alternative headline: "Company weights in trade-offs of having two different database systems, decide to consolidate into a single one." :-)

They don't give too many reasons, but say that operationally it is gonna be easier for them to work with a single database than with two (no-brainer?)

Re:Red Hat Satellite to standardize on PostgreSQL backend by dralley on Wednesday February 13, 2019 @09:37PM (#19159209)
As someone on the team, that didn't factor into the decision too much, although it's definitely a nice perk.

Switching to Postgres made a lot of sense even when looking at Pulp as a standalone project rather than as a part of Satellite.

Re:Red Hat Satellite to standardize on PostgreSQL backend by taude on Wednesday February 13, 2019 @09:38PM (#19159212)
Except, I'd argue that most large distributed systems these days are using much more than two types of data stores, especially when you start including name/value keystores (and in memory caching variants), big data pipelines, transactional data, "unstructured" data storage (like Mongo), time series, etc.

I work in FinTech and you'll see several backing our apps, and this isn't uncommon.

Re:Red Hat Satellite to standardize on PostgreSQL backend by zaphirplane on Thursday February 14, 2019 @06:08AM (#19161044)
The licensing change surely has to have played a factor
Re:Red Hat Satellite to standardize on PostgreSQL backend by HillRat on Wednesday February 13, 2019 @11:44PM (#19159677)
Generally, if you’re going to standardize on a single data repository, a traditional RDBMS will be a better fit than a NoSQL solution, unless you really need polymorphic capabilities and have a document-centric conceptual model (such as a CMS or certain kinds of contact center solutions). So this is really less about MongoDB being bad than relational being more appropriate.

MongoDB has definitely come a long way from when they were dropping writes and hitting scaling limits, and their new tools ecosystem holds a lot of promise, but I treat them much like any other non-RDBMS store (Redis, Cassandra, Neo4J...) in that they’re very specific tools for specific needs, not something that can be kit-bashed for any general class of problem.

Re:Red Hat Satellite to standardize on PostgreSQL backend by mehrdadn on Wednesday February 13, 2019 @09:58PM (#19159278)
I'm not sure, but I've seen things like this: https://twitter.com/hackernewsonion/status/38257854706983731...