Saturday, June 26, 2021

Talk to me gently and how Java native interface will change in not so distant future
Jaroslaw Palka
Jaroslaw Palka
Neo4j, Performance Engineer, Team lead

Java, or JVM, has well-deserved fame as a hardware-unfriendly platform, and thus nobody sane will build database system or solutions where "mechanical sympathy" is crucial. using Java, except Apache Kafka, Elastic, Cassandra and Neo4j ;) ).

Garbage collector, speculating JIT, lack of control over "object layout", terrible support (mainly due to lack of abstraction) for functions of modern processors and operating systems.

And also JNI (who was there, I know what I'm talking about). Complex, slow, no major update since the day of release. Project Panama promises to change it. Simple, fast, safe. This talk will take a look at the state of Project Panama, focusing mainly on the foreign linker, our new interface to C world. Of course, you can expect running examples, core dumps, segfaults and other fancy things.

I will focus on two examples calling C code (from POSIX spec) from Java, and calling Java code from C. We will also touch on the topic of foreign memory as these to specs are tightly coupled together.