News for hackers. Stuff that matters.
Re:PostgREST – REST API from any PostgreSQL database by jister on Wednesday July 22, 2015 @05:18AM (#9928496)
I'm sorry but why would I go through HTTP to query data? Why can't I just hit the database directly without the overhead of HTTP? Does a cleaner and being more standards-compliant worth the overhead of passing through HTTP?

And what happens when you start applying complex business rules that needs to scale? So many questions about this approach...

Re:PostgREST – REST API from any PostgreSQL database by caf on Wednesday July 22, 2015 @06:04AM (#9928638)
Presumably because browsers talk HTTP, but don't talk Postgres' native protocol.
Re:PostgREST – REST API from any PostgreSQL database by twistedpair on Wednesday July 22, 2015 @09:52AM (#9929625)
Just don't forget to secure it. Reminds me of when people thought it was a good idea to expose the REST API of ElasticSearch directly as their API and then got p0wned. Using "REST as an abstraction layer" isn't the same as taking someone else's OTC API, calling it your own, and exposing it to the public.
Re:PostgREST – REST API from any PostgreSQL database by scttnlsn on Wednesday July 22, 2015 @12:50PM (#9930763)
Yeah, this seems great if you want to completely eliminate the middle tier and have a client application talk directly w/ the database. I'm curious why there's an entire query API via query string parameters. Why not just expose a single POST /query endpoint where you can send some SQL?
Re:PostgREST – REST API from any PostgreSQL database by vkjv on Wednesday July 22, 2015 @02:13PM (#9931312)
You can take advantage of browser and CDN caching with a GET but not with a POST.

Throw in ETAGs and you can do a lot of cool stuff to make things scale really well.

Re:PostgREST – REST API from any PostgreSQL database by spacemanmatt on Wednesday July 22, 2015 @07:43PM (#9933100)
Squeezing the middle tier as flat as possible is my actual strategy and goal in many distributed environments. That's totally feasible with modern tools.

But sending SQL from the client is dangerous, and in this forum you'll get some interesting looks suggesting that.

Re:PostgREST – REST API from any PostgreSQL database by elchief on Wednesday July 22, 2015 @02:07PM (#9931280)
Cuz you use GET for queries with REST
Re:PostgREST – REST API from any PostgreSQL database by twistedpair on Wednesday July 22, 2015 @09:48AM (#9929602)
Amen. Whatever happened to the binary driver? Calling a Prepared Statement over a binary driver to a localhost or in rack DB and we're talking microsec level query times possible. Always annoyed when I spin up Hello World examples of all the new Rest Hotness db's to discovered that a PK query on a fresh install with only 10 rows still takes 10ms!

Quite unclear why you'd layer all the HTTP and marshalling overhead on backend service calls, other than to ensure you always have slow requests.

Re:PostgREST – REST API from any PostgreSQL database by mooreds on Wednesday July 22, 2015 @05:29AM (#9928531)
To force yourself to go through a service. To abstract away underlying implementation details.

More here in the value of services (Yegge's rant): https://plus.google.com/+RipRowan/posts/eVeouesvaVX

Re:PostgREST – REST API from any PostgreSQL database by swah on Wednesday July 22, 2015 @09:26AM (#9929458)
Re:PostgREST – REST API from any PostgreSQL database by javaJake on Wednesday July 22, 2015 @08:59AM (#9929310)
Incredible read. Thank you for sharing that post.
Re:PostgREST – REST API from any PostgreSQL database by bpicolo on Wednesday July 22, 2015 @12:09PM (#9930469)
And by doing so you remove all the performance from what's hopefully the most-performant part of your stack. =/

A database IS a service. It's just not a 'restful web service'. Making it one doesn't gain you any useful abstraction for SOA.

Re:PostgREST – REST API from any PostgreSQL database by sitkack on Wednesday July 22, 2015 @11:22PM (#9933799)
Not true, I now can get read only data using curl inside of a cronjob. This is really powerful. Someone now needs to make a similar system for Redis.