PostgREST / postgrest

REST API for any Postgres database
https://postgrest.org
MIT License
23.5k stars 1.03k forks source link

Suggestion: Get Postgrest on the Techempower benchmarks? #1400

Open rbjorklin opened 5 years ago

rbjorklin commented 5 years ago

It would be interesting to see how this project holds up against other tech stacks. See the Techempower benchmarks for more details.

steve-chavez commented 5 years ago

@rbjorklin That is a really interesting idea!

I've been looking at the required tests. One thing that's not clear to me is if we can run our own fixtures on the db?

Responses like text/html or text/plain can be done but we'd have to be able to create some stored procedures.

rishavs commented 4 years ago

Yes to this please. Postgrest is super intriguing but I am not sure how much of the potential actually translates to web performance. Having postgrest in TE will be helpful to those like me, who are on the fence about using it for our web apps.

wolfgangwalther commented 4 years ago

I've been looking at the required tests. One thing that's not clear to me is if we can run our own fixtures on the db?

I could not find any other frameworks doing something like that. Not sure whether that would even be allowed. I have asked a question about this at https://github.com/TechEmpower/FrameworkBenchmarks/issues/6055.

wolfgangwalther commented 3 years ago

Seems like PostgREST has been added in the meantime: https://github.com/TechEmpower/FrameworkBenchmarks/pull/6162.

The results are so bad, so far, I won't even link them here. I'm not sure why, but it seems like PostgREST is the only framework that is run with docker-compose on a single machine. All other frameworks are run on separate machines from the database. Not sure whether that's beneficial or not, but I don't think so. It seems to be the currently used approach to solve the "fixtures" problem.

steve-chavez commented 3 years ago

Wow, didn't know they already got PostgREST in the benchmarks.

Their html response doesn't seem right. It has:

SET LOCAL "response.headers" = '[{"Content-Type": "text/html"}]';

Which, as known by https://github.com/PostgREST/postgrest/pull/1582, doesn't really output an html response.

The plain text might also be wrong, unless they're requesting it with an Accept: text/plain.

On the plus side, that setup gives us a baseline for the benchmark. It'd be a matter of refining the tests, I think.