fastest (low latency) method for Inter Process Communication between Java and C/C++

后端 未结 10 858
隐瞒了意图╮
隐瞒了意图╮ 2020-11-29 14:45

I have a Java app, connecting through TCP socket to a \"server\" developed in C/C++.

both app & server are running on the same machine, a Solaris box (but we\'re

10条回答
  •  失恋的感觉
    2020-11-29 15:28

    Oracle bug report on JNI performance: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4096069

    JNI is a slow interface and so Java TCP sockets are the fastest method for notification between applications, however that doesn't mean you have to send the payload over a socket. Use LDMA to transfer the payload, but as previous questions have pointed out, Java support for memory mapping is not ideal and you so will want to implement a JNI library to run mmap.

提交回复
热议问题