Provide Java package for deployment
jserv opened this issue · comments
Current JNI build process generates shared library in the form of pearldiver driver for IRI. However, it is not convenient for deployment as RocksDB does. By providing rocksdbjni
package, maven can find and package rocksdbjni
into final IRI jar file including RocksDB C++ library.
Once we can provide similar java package (likely dcurl-jni
), we can simplify the process of validation and deployment.
The generated library file libdcurl.so
can be archived to jar
file easily.
But there are few things to do:
-
The generated
jar
file needs to be installed in the localmaven
repository.
This should be included in the building steps of theMakefile
inIRI
. -
The source code of
IRI
needs to be modified to use thelibdcurl.so
injar
file correctly.
How can a dedicated loader implemented in IRI internally? Can we reuse the codesnip taken from rocksdbjni
?
How can a dedicated loader implemented in IRI internally? Can we reuse the codesnip taken from
rocksdbjni
?
I will reference from the file of rocksDB: NativeLibraryLoader.java
The file description:
This class is used to load the RocksDB shared library from within the jar.
The shared library is extracted to a temp folder and loaded from there.