Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hcpup-0005ql-DH for pgsql-general@arkaria.postgresql.org; Mon, 17 Jun 2019 11:35:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hcpuo-0006AY-6Z for pgsql-general@arkaria.postgresql.org; Mon, 17 Jun 2019 11:35:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hcpun-00067R-NX for pgsql-general@lists.postgresql.org; Mon, 17 Jun 2019 11:35:09 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hcpul-0002NG-DH for pgsql-general@postgresql.org; Mon, 17 Jun 2019 11:35:08 +0000 Received: by mail-wr1-x42e.google.com with SMTP id x17so9543655wrl.9 for ; Mon, 17 Jun 2019 04:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=UCttB/flBCuCPN2BCBKx+++1NQH4RRVLgnvTiqd5+t0=; b=U2IgQf+ACPDfTBS9cOlKAqO6+MxphrZYDToHlsvnGozkRXlmazG8+8z9ajs8PjaNFN FP4HEf2bImMRAsZL1/35k1V/aa0bAI7c/kZsoWP6BsbUZ/peRTZWQH1cgjwH+bPQPPaN V9YxjfW3f9lO6fRL6mvfZ7z4t8+ZxTKii94dGP4tyIEUNGG4o/hU91tCnIM+MRYKMpHJ GeAbJMi9e2vdR1cNU5qiSgw0KXNNEGGgASeQCr0KM5bk4I2J5szBw5BXaGZmlHlSs/lS c9uxHFaH89Z3fpowWJLOK/PrfXDW0vOTE7RWAoHHIvgwLRuNEv6cuVqJt1D9ba/gIIAj e/rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=UCttB/flBCuCPN2BCBKx+++1NQH4RRVLgnvTiqd5+t0=; b=rR2fU1dGoanteAKETvtHNolUTDgX8cIqDJ6VoYu8sdrSLrw1dJcygNZIsJqk17P5fq eXOGShU6WLU6/L89xsiYMll+gdn1OBFyGfOUHi13T7lej7Vir//hReSUpYurGoyQJ1rX 0QGkocU7oLamA/L4e53uCRb/6RoW3iIvvpxeaxeqzSDjzAiYCDlycE0k10AmF0CcKcd+ mHhUtmEPUdJMQqhddVwVoZEcKQ3dcbgnuBM3EajKKC0ChUc3TQwRREU2Zb/U1elELtym rpkA94PjLh5u6hJcPn1nw7MaL+KsY38rLXig9rmHCLlec1B9oPhx0t59u/nrSvY87QOi 012g== X-Gm-Message-State: APjAAAWWN6Dd2VooiDHdmicXCj57q8wznjhwSHbj9pYolgP+uPQguZRj hFXwAROsmMymWlu0qbU7W3XbCVYe52t2jA== X-Google-Smtp-Source: APXvYqzkekm9Pp3J0T3qALvmsv2Qy53PPw1+mCGL60eymOUSgPhIkqZ7mDNWEaAZIr8V8t0rIC+r5A== X-Received: by 2002:a5d:430c:: with SMTP id h12mr523402wrq.163.1560771304433; Mon, 17 Jun 2019 04:35:04 -0700 (PDT) Received: from roberts-mbp.lan ([37.6.201.131]) by smtp.gmail.com with ESMTPSA id l16sm10621454wrw.42.2019.06.17.04.35.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 04:35:03 -0700 (PDT) From: Rob Nikander Content-Type: multipart/alternative; boundary="Apple-Mail=_131F498E-17F9-4E3C-B2F1-488719C98A07" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Async client libraries - not worth it? Date: Mon, 17 Jun 2019 14:35:02 +0300 References: <73BC6656-5B14-4F6A-B0FE-5A1102AEF393@gmail.com> To: Postgres General In-Reply-To: Message-Id: <8E022FF4-1C5E-4373-B962-E1662AE722C6@gmail.com> X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_131F498E-17F9-4E3C-B2F1-488719C98A07 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 17, 2019, at 1:12 PM, Dave Cramer wrote: >=20 > https://www.techempower.com/benchmarks/#section=3Ddata-r17&hw=3Dph&test=3D= db = >=20 > Seems to be worth it. >=20 > Now it appears that ADBA is going to die on the vine, R2DBC and vertx = seem to be pretty good The =E2=80=9Casync=E2=80=9D frameworks are faster, but I think they = might be getting the performance gain not from the async DB API, but = from the fact that they don=E2=80=99t block OS threads that are handling = frontend HTTP requests. They may be using an async DB API to achieve = that, but they *could* (I think) also use traditional JDBC and other = general purpose concurrency tools from Java=E2=80=99s standard library. = That way would be easier to reason about, in my opinion. I may just have to write something both ways and wait to get real world = experience with it to see how it goes. --Apple-Mail=_131F498E-17F9-4E3C-B2F1-488719C98A07 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Jun 17, 2019, at 1:12 PM, Dave Cramer <pg@fastcrypt.com> = wrote:


Seems to be worth it.

Now it appears that ADBA is going to = die on the vine, R2DBC and vertx seem to be pretty = good

The = =E2=80=9Casync=E2=80=9D frameworks are faster, but I think they might be = getting the performance gain not from the async DB API, but from the = fact that they don=E2=80=99t block OS threads that are handling frontend = HTTP requests. They may be using an async DB API to achieve that, but = they *could* (I think) also use traditional JDBC and other general = purpose concurrency tools from Java=E2=80=99s standard library. =  That way would be easier to reason about, in my = opinion.

I may just have to write = something both ways and wait to get real world experience with it to see = how it goes.




= --Apple-Mail=_131F498E-17F9-4E3C-B2F1-488719C98A07--