alaisi / postgres-async-driver

Asynchronous PostgreSQL Java driver
Apache License 2.0
287 stars 38 forks source link

Is it production ready? #56

Open alehatsman opened 6 years ago

alehatsman commented 6 years ago

Hi, i am really like this project and i am interesting do someone use it in production?

willks commented 6 years ago

Great question, and went unanswered for so long for a reason. Unfortunately, I've been trying to use it and it's experimental quality at best. Issues found:

1) Have to disable MD5 auth settings in pga_hba_conf to use "password" (we don't get to change AWS/GCP managed Postgres settings like this) - immediate strike out for us. 2) Shutting down connection pool results in hang (bad if you are running a docker container)

I had better luck with the fork: https://github.com/jaceksokol/postgres-async-driver

However, even under the lightest of loads (5 concurrent user clients, with 10 requests each) - doing a single query by PK, it hangs. That was with 30 pool connections, and even tried upping the thread count by multiples of 4 (quad core Mac).

I've had much better luck with this project: https://github.com/vietj/reactive-pg-client - performance wise it seems MUCH faster with no blocking issues - but the API is not as clean. But even that one has issues with the "tuple count" bindings for the reactivex and RxJava flavours.

So in summary, not ready yet. The forks seem to fix some issues, but at this time it's a strong avoid.

Happy to be corrected and shown how to use it in the real world

cretz commented 6 years ago

Shameless plug of my alternative project: https://github.com/cretz/pgnio