News for hackers. Stuff that matters.
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?