if perf is not an issue, use a pipe to communicate...
# arrow
p
if perf is not an issue, use a pipe to communicate instead of writing your whole JNI layer