DLTcollab / dcurl

Hardware-accelerated Multi-threaded IOTA PoW, drop-in replacement for ccurl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. The generated jar file needs to be installed in the local maven repository.
    This should be included in the building steps of the Makefile in IRI.

  2. The source code of IRI needs to be modified to use the libdcurl.so in jar 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.