Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cv2cx-00071r-Hv for pgsql-jdbc@arkaria.postgresql.org; Mon, 03 Apr 2017 14:06:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cv2cw-00066F-UJ for pgsql-jdbc@arkaria.postgresql.org; Mon, 03 Apr 2017 14:06:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cv2cQ-0004G8-8J for pgsql-jdbc@postgresql.org; Mon, 03 Apr 2017 14:06:06 +0000 Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cv2cI-0007Kt-RM for pgsql-jdbc@postgresql.org; Mon, 03 Apr 2017 14:06:05 +0000 Received: by mail-wr0-x234.google.com with SMTP id k6so165875071wre.2 for ; Mon, 03 Apr 2017 07:05:58 -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=zCcc9ybRQrZPTI8hleI9+aujFmErw3aDAMTAjeCkCZM=; b=eTzWKzxJu30BJV9L2WOT/2+KPHpdTbH2BJbEVT4S4UFv2N6ZnpYRoDvjzsxYWLpSAR +6MQlUqN7GSrcX8dNcFnoFAMYCvsxdgsyaLp4PwjU+hRwaNX6kvC5fu/0lhxNlgRwe3Y BU1BZ6Wehj+V3B0XMA27j3Mzwj60QBQSaANWhFpZKCikaNkk1+Jy1fjkCds8VYrxTe3h +9go5nGcLDPP4xtE87luc0g9cO15CU1XLo/Mh0HCfp+gxbQTHLETQoGHvOqwHYrvvywo pXzy7HdGYrYeSsv/L1atbCCGc2EgzW6UEZkjUfoOj8yAL3t2O3uXgPJSIebZPOG+GsYK hN2g== 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=zCcc9ybRQrZPTI8hleI9+aujFmErw3aDAMTAjeCkCZM=; b=Irujror87sHHp7jqq6cb0e7a2xuhJZGps7eJOOY9blld0voiglajCj/URu3yJPhiQk 8pceDIT5TJuuZ7Fso7nBGtK1IRtkH9ApJMysHhZZoW+WTgJ1AyZKe1Pf63LOYGoZ6VPn 2EhD2+9DMMQ7Fj+jOHM7+zrV0Q7o++NJ6xVYLr7/YKu1ty/TWzlJrzcK5NzD2cN2M5Ae DPNcExA37DsI+9f83vwzLqUmXh+3FvUQHUbpWA3o59KDGP+zjtYZxQJEGmORgin2oU7c zHgTv+vLFctH1wtXOm1O8utVpXIxRj+IPZA7G1sVoQYzUHFUNuDnQEu33Libt0xjjI4K O15A== X-Gm-Message-State: AFeK/H1U5PojVdCF+bODUiXHjMUpycmnyjT1N02PWKKj8MkBo5n7lPdFyUqq2edBqXo3TA== X-Received: by 10.28.109.214 with SMTP id b83mr10221908wmi.21.1491228355828; Mon, 03 Apr 2017 07:05:55 -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 j138sm4455396wmg.10.2017.04.03.07.05.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 07:05:55 -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> Cc: John R Pierce , List From: =?UTF-8?Q?=c3=81lvaro_Hern=c3=a1ndez_Tortosa?= Message-ID: <4d3ad97a-ca5f-910a-2df3-1067b6b7ac19@8kdata.com> Date: Mon, 3 Apr 2017 16:05:53 +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="------------4D2CD7BC97271DBDAA8ED590" 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. --------------4D2CD7BC97271DBDAA8ED590 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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? 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. We're not talking about past, but just future developments ;) Álvaro -- Álvaro Hernández Tortosa ----------- <8K>data --------------4D2CD7BC97271DBDAA8ED590 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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?

    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.

    We're not talking about past, but just future developments ;)

    Álvaro


-- 

Álvaro Hernández Tortosa


-----------
<8K>data
--------------4D2CD7BC97271DBDAA8ED590--