<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 01/10/2012 12:15 PM, Robert Raschke wrote:
<blockquote
cite="mid:CAH+xwdDwS70noQBVuoHT1xHgjiMVdB5Q2N3S4+EnQRWzVzw_qw@mail.gmail.com"
type="cite"><br>
<div class="gmail_quote">On Mon, Jan 9, 2012 at 5:44 PM, ilya
goberman <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:goberman@msn.com">goberman@msn.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div>
<div dir="ltr">
<div>Hello,</div>
We are a market data API vendor. We have APIs to consume
market data in Java, .Net, and C++. One of the clients
indicated interest in using our API from Erlang.
<div>So I would like to find out if it is possible to
interface with any of these language APIs from Erlang.<br>
<div><br>
</div>
<div>I looked briefly at jinterface, but it appears to
be designed to make calls from Java to Erlang, but not
in the other directions.</div>
<div>I have found a post <a moz-do-not-send="true"
href="http://www.javalimit.com/2010/06/a-java-api-for-erjang.html"
style="font-size: 10pt;" target="_blank">http://www.javalimit.com/2010/06/a-java-api-for-erjang.html</a> for
the Erlang-java calls, but it does not seem to be a
finished product.</div>
<div><br>
</div>
<div>What is the best bet to accomplish the integration?
</div>
<div>Any advice is appreciated.</div>
<div>Thanks</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
Erlang uses message passing as it's primary communication
mechanism. Thus you could write a small Java program utilising
the Jinterface library to enable it to receive messages from
Erlang, marshalling to your API and sending results back using
the messaging again.<br>
<br>
</div>
</div>
</blockquote>
You could also take a look at the JavaErlang library which tries to
reduce the amount of boilerplate code you have to write to call Java
from Erlang.<br>
See <a class="moz-txt-link-freetext" href="https://github.com/fredlund/JavaErlang">https://github.com/fredlund/JavaErlang</a>.<br>
<br>
We use it internally here to test student libraries written in Java.<br>
<br>
<br>
Greetings,<br>
Lars-Åke<br>
<br>
</body>
</html>