Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.
Version 3 (modified by jcc7, 16 years ago)
added link to DBus-D

Why does Java JNI not work for TioLink?

D and Java are both using a garbage collector. These GCs are suspending threads at their will and awake them if they are done. With JNI both share the same native threads, but the D GC does not know the Java GC nor vice versa. This is why they have to conflict sooner or later. I see no solution for this.

It seems, the Java code and the D code can only exist in separated processes. JNI cannot do that. An interprocess communication (IPC) is needed.

The requirements for this IPC in TioLink are:

  • cross language Java, D
  • available for all D plattforms Win32, Linux, Max OSX
  • good performance

Alternatives

  1. pure sockets/tcp
    [-] reinvent the wheel
  2. Corba
    [-] too much to implement
    [-] performance
  3. D-Bus (see DBus-D)
    [+] meets the requirements