apache / datasketches-memory

High performance native memory access for Java.
https://datasketches.apache.org
Apache License 2.0
122 stars 29 forks source link

Support newer Java version than 8 #121

Closed jmalkin closed 3 years ago

jmalkin commented 4 years ago

Java 8 is long in the tooth. Newer versions will pose challenges for this library in particular, but the project risks being left behind over time due to incompatibility with modern JDKs.

davecromberge commented 4 years ago

I think that Project Panama may be an interesting project to follow for its ambitions to promote better native interoperability.

This could potentially allow a migration path for native calls that are no longer supported beyond Java 8, as the proposal targets version 16 of the JDK: https://openjdk.java.net/jeps/393

In particular, its foreign memory access API provides the ability to access off-heap memory in an efficient fashion: https://github.com/openjdk/panama-foreign/blob/foreign-jextract/doc/panama_memaccess.md

leerho commented 3 years ago

This does indeed look promising. But as of October, 2020, the Foreign Memory Access API is still incubating in Java 14 and 15. I have been interested in this Panama project for several years now. It has been really slow in coming into being. And, it appears, we may have to wait longer still.

It gives me hope that Java is finally trying to address the need to manage structured off-heap memory like the c struct, but alas, with 10X the verbosity! What is still missing is the power of the c union, which is used under the covers by the java compiler, but apparently still not available to java users.

davecromberge commented 3 years ago

I wanted to post an update for those following this issue - we are currently working on a multi-release JAR that should enable support for newer Java versions, together with existing users who remain on Java 8.

This will also allow us to target newer features of the language, such as the Foreign Memory Access API mentioned above - for versions that support it.

leerho commented 3 years ago

In parallel with @davecromberge, I am working on a major upgrade to the entire Java library that replaces this Memory package with the new Java Panama capabilities starting with Java 16.

As a result, Dave's work will allow us to operate the full Java Library + Memory with Java 8 through 13, and with my work, the Java Library will operate with Java 16+. We won't have a simple solution for Java 14 and 15, but those are not LTS releases. The next LTS release after 11 is 17.

leerho commented 3 years ago

With the recent release of datasketches-memory-2.0.0, which supports JDK8 through JDK13, this issue can now be closed.