Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cv320-0008T8-VD for pgsql-jdbc@arkaria.postgresql.org; Mon, 03 Apr 2017 14:32:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cv320-0003gs-6L for pgsql-jdbc@arkaria.postgresql.org; Mon, 03 Apr 2017 14:32:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cv31z-0003eK-8h for pgsql-jdbc@postgresql.org; Mon, 03 Apr 2017 14:32:31 +0000 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cv31v-0001NP-6f for pgsql-jdbc@postgresql.org; Mon, 03 Apr 2017 14:32:30 +0000 Received: by mail-wr0-x232.google.com with SMTP id k6so166919229wre.2 for ; Mon, 03 Apr 2017 07:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=8kdata-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=TW7jUidUb2QNUhprlfLcrrlrQDINa5i7/PGUfaIbIX4=; b=biIKxDLx0rJIkRtxef7Fk7r6WKaUYZ/0rS9XvXJWcjLlxm/dTHxVCQ2jgEd8nGmVkR KyR/zCNdXdr5+fgb3UVMG7IDtRRTX7KquP+4RL4YuVjPJpsza212/jn1di8txjnE/z0p g1e+zFB5uVFTe8BEYgccpsEbUyS+RJTHSH9aAe5x/LI3bvm5pURqpGtJErRppZO8WIwp E0VvAEh5SxOUcfvh/oraR0gJ4Pgpope4rS1qwrDPVn5g0fkEeo6gH6bG7n+5qxhtJslB 1At1eEZurIu+8d+urAVxL0rUK1bEwB+Ytje29IN0VYXG2X7gsBaGRnHTWL7MiUD2yHDW EJJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=TW7jUidUb2QNUhprlfLcrrlrQDINa5i7/PGUfaIbIX4=; b=mpgNmM1YIivZb5Lf/vmTkKXRZqJ94s9GXf2fVVjPaSKXHlR+qIK25bIyeU4Dt+niiz 4HRtYj8RmNGp2KyPDmPdciXMVYhcEjS+R8F/Yk744D0pfVDXWpx9sDFy3bgjHyuYPuiZ cUWkA3rVoVfGVMifNWt72yEDrIFAQHV8AWUGpmYPdoAYJckIbZe/4RN0Vb23KvTMTx1j DVhWFWwbO4CVw2RQDllTPX9rhYmOm65lb3i1UzK2V9Ugv8rkqAgpx/t1TtlQK91xBdIR swwGVD30RMk8EAb0lRh2yqBIKy7pPnOIAnhq6cdGxWXAUInGI8m/OVxGPL9ctIW2FVnW 4O5A== X-Gm-Message-State: AFeK/H2m5fGl6DLpZNFu51lkPq3PU8knHYDVGie56ei4WXFe9xF827Gf SzmXWfM/qlSVvg== X-Received: by 10.28.141.81 with SMTP id p78mr4389347wmd.123.1491229945868; Mon, 03 Apr 2017 07:32:25 -0700 (PDT) Received: from [192.168.1.130] (148.126.218.87.dynamic.jazztel.es. [87.218.126.148]) by smtp.gmail.com with ESMTPSA id q130sm29601wmd.29.2017.04.03.07.32.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 07:32:25 -0700 (PDT) Subject: Re: RFC: Make new versions of pgjdbc Java8+ To: Dave Cramer References: <393118b3-4373-3e27-6f7e-0a7f764c9c81@8kdata.com> <9289bc74-5c08-c180-3a7a-943c79230824@8kdata.com> <4d3ad97a-ca5f-910a-2df3-1067b6b7ac19@8kdata.com> Cc: John R Pierce , List From: =?UTF-8?Q?=c3=81lvaro_Hern=c3=a1ndez_Tortosa?= Message-ID: <78dade4e-8519-7e15-c5d3-6ce2d09cd8bd@8kdata.com> Date: Mon, 3 Apr 2017 16:32:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------3780E165A7611F54788A3CA1" X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multi-part message in MIME format. --------------3780E165A7611F54788A3CA1 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 03/04/17 16:19, Dave Cramer wrote: > > > On 3 April 2017 at 10:05, Álvaro Hernández Tortosa > wrote: > > > > On 03/04/17 15:57, Dave Cramer wrote: >> >> On 3 April 2017 at 07:36, Álvaro Hernández Tortosa >> > wrote: >> >> >> >> On 03/04/17 13:05, Dave Cramer wrote: >>> >>> On 2 April 2017 at 19:03, Álvaro Hernández Tortosa >>> > wrote: >>> >>> >>> >>> On 03/04/17 00:56, John R Pierce wrote: >>> >>> On 4/2/2017 3:40 PM, Álvaro Hernández Tortosa wrote: >>> >>> - Java 6 EOLed 2/2013. >>> - Java 7 EOLed 4/2015. >>> - Java 8 was released 3 years ago, and brought >>> significant improvements. >>> - Java 9 will be (may be) released this year. >>> >>> >>> isn't there a significant lag in version support by >>> things like web services (j2ee, etc, as embedded in >>> things like IBM WebSphere) ? j2ee 8 isn't even out >>> yet. Pretty sure a whole lot of that space is still >>> stuck back in Java 6 land. >>> >>> >>> >>> Those are not related things. You can perfectly run >>> J2EE 6 servers with Java 8 (and indeed, it is beneficial). >>> >>> >>> Álvaro >>> >>> -- >>> >>> Álvaro Hernández Tortosa >>> >>> >>> ----------- >>> <8K>data >>> >>> >>> Alvaro, >>> >>> >>> So why do you want to write in java 8 ? >> >> >> Not a comprehensive or ordered list, but a few reasons: >> >> - JDK comes with Base64 and cryptographic functions like >> PBKDF2 that are needed for SCRAM. In Java6 you either >> implement yourself or pull external dependencies. >> >> - You can write conciser code (which improves significantly >> readability): >> * Lambas: anonymous classes. Callback-heavy code turns >> becomes readable. >> * Streams: unnecessary for loops and other goodies. >> * Optional: unnecessary ifs. >> * Since Java7: try-with-resources, 10_000 vs 10000 etc. >> >> - Reading Javadoc doesn't hurt my eyes ^_^ >> >> - Time API, CompletableFuture. >> >> - Default and static methods in interfaces! >> >> >> Álvaro >> >> -- >> >> Álvaro Hernández Tortosa >> >> >> ----------- >> <8K>data >> >> In the interest of expediency using J8+ is acceptable for the >> first cut. However. I just checked maven stats for >> oss.sonatype.org and while j6 is not >> getting a lot of downloads, j7 is certainly significant. > > I guess you mean statistics for pgjdbc, right?] > > > Yes, sorry for the lack of clarity > > > I'm sure there may be out there still some number of Java7s. > However, my point is: those can still use any pgjdbc driver at > least up to v42. And they are mature, performant, fully featured > drivers, not a half-backed piece of software that you will be > striving to upgrade. So even if Java7s are still there, they could > be well served. But newer versions could be developed for Java8+ > and encourage users to upgrade to a non-EOLed Java platform, and > probably as a side-effect get better performance. > > OK, but the scenario where people are using the latest version of > Postgres with SCRAM and still using older versions of java is what I > am thinking about. I wonder if SCRAM will get backpatched ? If developed for Java8+, it won't (at least, I won't do it). However, I wonder if it would be such a big deal for people that are upgrading to Postgres 10 and require SCRAM not to ask them to upgrade their JVM to a non EOLed version. I think the intersection of people who go for very modern PG and non supported Java if almost 0. Regards, Álvaro > > > Dave Cramer > > davec@postgresintl.com > www.postgresintl.com > -- Álvaro Hernández Tortosa ----------- <8K>data --------------3780E165A7611F54788A3CA1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

On 03/04/17 16:19, Dave Cramer wrote:


On 3 April 2017 at 10:05, Álvaro Hernández Tortosa <aht@8kdata.com> wrote:


On 03/04/17 15:57, Dave Cramer wrote:

On 3 April 2017 at 07:36, Álvaro Hernández Tortosa <aht@8kdata.com> wrote:


On 03/04/17 13:05, Dave Cramer wrote:

On 2 April 2017 at 19:03, Álvaro Hernández Tortosa <aht@8kdata.com> wrote:


On 03/04/17 00:56, John R Pierce wrote:
On 4/2/2017 3:40 PM, Álvaro Hernández Tortosa wrote:
- Java 6 EOLed 2/2013.
- Java 7 EOLed 4/2015.
- Java 8 was released 3 years ago, and brought significant improvements.
- Java 9 will be (may be) released this year.

isn't there a significant lag in version support by things like web services (j2ee, etc, as embedded in things like IBM WebSphere) ? j2ee 8 isn't even out yet.   Pretty sure a whole lot of that space is still stuck back in Java 6 land.



    Those are not related things. You can perfectly run J2EE 6 servers with Java 8 (and indeed, it is beneficial).


    Álvaro

--

Álvaro Hernández Tortosa


-----------
<8K>data

 
Alvaro,


So why do you want to write in java 8 ?


    Not a comprehensive or ordered list, but a few reasons:

- JDK comes with Base64 and cryptographic functions like PBKDF2 that are needed for SCRAM. In Java6 you either implement yourself or pull external dependencies.

- You can write conciser code (which improves significantly readability):
    * Lambas: anonymous classes. Callback-heavy code turns becomes readable.
    * Streams: unnecessary for loops and other goodies.
    * Optional: unnecessary ifs.
    * Since Java7: try-with-resources, 10_000 vs 10000 etc.

- Reading Javadoc doesn't hurt my eyes ^_^

- Time API, CompletableFuture.

- Default and static methods in interfaces!


    Álvaro

-- 

Álvaro Hernández Tortosa


-----------
<8K>data
In the interest of expediency using J8+ is acceptable for the first cut. However. I just checked maven stats for oss.sonatype.org and while j6 is not getting a lot of downloads, j7 is certainly significant.

    I guess you mean statistics for pgjdbc, right?]

Yes, sorry for the lack of clarity
 

    I'm sure there may be out there still some number of Java7s. However, my point is: those can still use any pgjdbc driver at least up to v42. And they are mature, performant, fully featured drivers, not a half-backed piece of software that you will be striving to upgrade. So even if Java7s are still there, they could be well served. But newer versions could be developed for Java8+ and encourage users to upgrade to a non-EOLed Java platform, and probably as a side-effect get better performance.

OK, but the scenario where people are using the latest version of Postgres with SCRAM and still using older versions of java is what I am thinking about. I wonder if SCRAM will get backpatched ?

    If developed for Java8+, it won't (at least, I won't do it).

    However, I wonder if it would be such a big deal for people that are upgrading to Postgres 10 and require SCRAM not to ask them to upgrade their JVM to a non EOLed version. I think the intersection of people who go for very modern PG and non supported Java if almost 0.


    Regards,

    Álvaro



   


-- 

Álvaro Hernández Tortosa


-----------
<8K>data
--------------3780E165A7611F54788A3CA1--