From: Álvaro Hernández Tortosa <aht@8kdata.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: John R Pierce <pierce@hogranch.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: RFC: Make new versions of pgjdbc Java8+
Date: Mon, 3 Apr 2017 16:32:23 +0200
Message-ID: <78dade4e-8519-7e15-c5d3-6ce2d09cd8bd@8kdata.com> (raw)
In-Reply-To: <CADK3HHKHio2boMOuAUzeLw0rwugx1QeuXK2vkbmSHr5qZ2D6ZA@mail.gmail.com>
References: <393118b3-4373-3e27-6f7e-0a7f764c9c81@8kdata.com>
<dab17d70-29b7-9445-ab0a-98a502318f0a@hogranch.com>
<c98f5172-bc5f-5987-a2c6-03766547469a@8kdata.com>
<CADK3HHKyRxDKGcagk9ooqjCL=DHnieE_rp2MLTnpCpTUOn9p+A@mail.gmail.com>
<9289bc74-5c08-c180-3a7a-943c79230824@8kdata.com>
<CADK3HHLn1Cg1yd0ymjMj4TP=ib7FvojFXVShQ_C5eL=vqjDzng@mail.gmail.com>
<4d3ad97a-ca5f-910a-2df3-1067b6b7ac19@8kdata.com>
<CADK3HHKHio2boMOuAUzeLw0rwugx1QeuXK2vkbmSHr5qZ2D6ZA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
On 03/04/17 16:19, Dave Cramer wrote:
>
>
> On 3 April 2017 at 10:05, Álvaro Hernández Tortosa <aht@8kdata.com
> <mailto: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 <mailto: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 <mailto: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 <http://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 <mailto:davec@postgresintl.com>
> www.postgresintl.com <http://www.postgresintl.com/;
>
--
Álvaro Hernández Tortosa
-----------
<8K>data
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-jdbc@postgresql.org
Cc: aht@8kdata.com, pg@fastcrypt.com, pierce@hogranch.com
Subject: Re: RFC: Make new versions of pgjdbc Java8+
In-Reply-To: <78dade4e-8519-7e15-c5d3-6ce2d09cd8bd@8kdata.com>
References: <393118b3-4373-3e27-6f7e-0a7f764c9c81@8kdata.com> <dab17d70-29b7-9445-ab0a-98a502318f0a@hogranch.com> <c98f5172-bc5f-5987-a2c6-03766547469a@8kdata.com> <CADK3HHKyRxDKGcagk9ooqjCL=DHnieE_rp2MLTnpCpTUOn9p+A@mail.gmail.com> <9289bc74-5c08-c180-3a7a-943c79230824@8kdata.com> <CADK3HHLn1Cg1yd0ymjMj4TP=ib7FvojFXVShQ_C5eL=vqjDzng@mail.gmail.com> <4d3ad97a-ca5f-910a-2df3-1067b6b7ac19@8kdata.com> <CADK3HHKHio2boMOuAUzeLw0rwugx1QeuXK2vkbmSHr5qZ2D6ZA@mail.gmail.com> <78dade4e-8519-7e15-c5d3-6ce2d09cd8bd@8kdata.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