From: Rob Nikander <rob.nikander@gmail.com>
To: Postgres General <pgsql-general@postgresql.org>
Subject: Async client libraries - not worth it?
Date: Mon, 17 Jun 2019 08:34:33 +0300
Message-ID: <73BC6656-5B14-4F6A-B0FE-5A1102AEF393@gmail.com> (raw)
Hi,
I’m writing a new web app, and I’ve been experimenting with some async DB access libraries [1]. I also see some discussion online about a future Java standard to replace or supplement JDBC with an async API.
While I understand the benefits of async in some situations, it seems to me that these libraries are not going to give much performance benefit, given the architecture of a PostgreSQL server. (Nothing against PG; probably most RDBMSs are like this.)
I wonder if anyone else has looked at this and agrees, or not. ?
A client library with an async-style API may allow 100,000s of concurrent “operations”, but since the PG server itself doesn’t handle connections on that scale (and has no plans to, I assume?), the client library is really maintaining a queue of operations waiting for a connection pool. Maybe there is some performance benefit there, but the most important point - to free up the front end to handle many HTTP connections - can also happen by combining an operation queue with a synchronous API.
Rob
[1]: Mentioned here: https://github.com/pgjdbc/pgadba/issues/17=
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: rob.nikander@gmail.com
Subject: Re: Async client libraries - not worth it?
In-Reply-To: <73BC6656-5B14-4F6A-B0FE-5A1102AEF393@gmail.com>
References: <73BC6656-5B14-4F6A-B0FE-5A1102AEF393@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox