TAMULib / cantaloupe

High-performance dynamic IIIF image server in Java
https://medusa-project.github.io/cantaloupe/
Other
0 stars 0 forks source link

Cantaloupe: Update Java/JDK Version #13

Open devangm opened 2 weeks ago

devangm commented 2 weeks ago

As a Developer I want to upgrade the Java/JDK version used in the Cantaloupe image server So that I can leverage more up-to-date image processing features, improve performance, and ensure long-term support for the platform.

Acceptance Criteria: Upgrade to JDK22

  1. Explore upgrading the JDK used in Cantaloupe’s Docker container to JDK22 for long-term support.
  2. Ensure the Docker container can be configured to download and use JDK22 via wget.
  3. Modify the Dockerfile accordingly to support the selected version and ensure proper configuration.

Evaluate Image I/O and Metadata Handling:

  1. Test image processing improvements, especially related to Java's Image I/O JPEG plugin to mitigate issues like "Inconsistent metadata read from stream."
  2. Verify if upgrading to the latest JRE version resolves image read issues as mentioned in the Cantaloupe processor documentation.

Garbage Collector Configuration:

  1. Investigate the use of modern Garbage Collectors (e.g., G1 GC, ZGC, Shenandoah) introduced in newer Java versions to optimize memory management and reduce latency.
  2. Allow for testing different GCs by passing relevant command-line arguments and assess performance gains or stability improvements.

Ensure JPF File Format Compatibility:

  1. Ensure the upgraded JDK supports JPF (JPEG2000 Part 1 File Format) for proper image format handling.
  2. Verify that the failsafe functionality of Java is working properly in cases where other image processors like Kakadu or OpenJPG are unavailable.

Documentation and Testing:

  1. Document the steps involved in upgrading the JDK and configuring garbage collection options.
  2. Conduct performance benchmarks and image processing tests to validate improvements and confirm that no regression occurs.

Existing Issue: https://github.com/TAMULib/cantaloupe/issues/7

markpbaggett commented 1 week ago

I didn't realize until today that the ideas from the HTJ2k card (JPH) didn't make it over into these new cards (my fault). Based on research, the fastest and most efficient JP2s should be JPH. Right now, dev throws this error when attempting to decode.

501 Not Implemented Unsupported source format

https://api-dev.library.tamu.edu/iiif/2/ZmVkb3JhOjBhL2ViLzAwLzdkLzBhZWIwMDdkLTY4YmMtNGMzMS1iZWNlLTUwODExMmU2ZjljNy90b2RkLWxvc3N5Ml9vYmplY3RzLzYvcGFnZXMvcGFnZV8wL2ZpbGVzLzQyX0luZl9SYWluYm93X0Rpdl8yLmpwaA==/info.json

Oddly, with 3 year old kdu_expand on my local machine, I have no issues with expansion. Just adding even though we may have to leave this out of our investigation.

kaladay commented 1 week ago

The 8.0.3 version of kakadu binaries from Cantalupe are 4 years old:

markpbaggett commented 1 week ago

I've asked for thoughts on cantaloupe-dev:

https://iiif.slack.com/archives/C0719FRG5EK/p1728315561699939