Robert
- What exactly is the use case of your Java app server talking to the
Erlang nodes? What is the topology of the distributed system? Where and
how does the Java app server fit in?
- Is it necessary to wire at the lower level? Or would it be better to
go for REST services?
- Is it really necessary to map millions of lightweight Erlang processes
to just hundreds / thousands of Java threads? Or if these numbers aren't
relevant, why have a complex distributed Erlang node infrastructure?
- Which Java specifics would you like to use in your Erlang code? I can
think of library, e.g. calendar transformations and whatnot, but where
is the need on the Erlang side to make use of them?
- Is it more simple to run the whole thing on the JVM, including your
Java artefacts as well as a web application with an embedded Erjang and
your transformed Erlang code, which is also possible?
- Is it necessary to talk in both directions?
- Which practical value does have Mnesia usage outside Erlang, where
loads of distributed data stores with quality non-native interfaces
already exist?
When you have answered all these questions, you match your answers with
the possible Erlang/Java integration ways:
- jinterface means you have a pseudo Erlang node in your distributed
node topology, which is known by epmd. You can talk with and from it as
a normal Erlang node, but you are using Java threads in it, so you can't
bomb it with millions of parallel requests
- Erjang is here to run your Erlang code on the JVM. For things where
you have loads of C code behind your Erlang solution which is very
usual, it wouldn't help you much since it wouldn't auto-convert your C
code. When you have Erlang code only and are fixed to the JVM for
whatever operational reason, Erjang can help you
- There are still good old web services to integrate both worlds, and
neither jinterfacce nor Erjang compete with them - for the reasonable
use cases
Maybe it helps somehow.
pb