
Postgres pipelines from the JVM with Bpdbi
Every time your JVM app talks to Postgres, something wasteful happens. Your code sends a query, waits for the response, sends the next query, waits again. Each wait is a full network round-trip with a typical latency of 0.5-2ms in a cloud environment. For a simple transaction with a few queries, that's 8-10ms of just... waiting. This problem is exacerbated by the additional queries that are commonly added when using Postgres' Row-Level Security (RLS). For instance when using Supabase , roles and JWT claims need to be set before executing the actual query. This usually needs to happen more than once for each HTTP request, as some db queries need to be executed with different roles than others. Bpdbi is a new JVM database library for the Postgres database. It exposes pipelining , a feature that's been part of the Postgres wire protocol since version 14. JDBC cannot do it. Bpdbi can . Where this came from Bpdbi started as a port of the Vert.x SQL Client — the database layer behind Quarkus
Continue reading on Dev.to
Opens in a new tab



