Great stuff, that all sounds very impresive. A couple of comments in line...

On Fri, Feb 20, 2009 at 10:29 PM, Wojtek Janiszewski <
[email protected]> wrote:

> Hi,
> I haven't been updating you for a long time - I had really busy semester at
> my university. Happily I've passed all the exams and now it's good moment to
> continue working on what I picked some time ago, which is Erlang binding.
>
> I've created some base code which can be found under sandbox/wjaniszewski.
> It implements:
> 1. Reference side - passing messages to Erlang nodes
> 2. Reference side - RPC
> 3. Service side - RPC
>
> This code is dirty and needs much attention - especially for handling non
> standard situations. However it's already good enough to show intention and
> used mappings between Java and Erlang:
>
> Rule 1. Each reference binding may be configured to communicate using
> Erlang messaging system. Following reference can be only used to send
> messages to node "MboxServer". Node can operate many message boxes, so
> target message box name will be taken from method executed in referenced
> object.
>
> <reference name="mboxReference">
>        <tuscany:binding.erlang node="MboxServer" mbox="true"/>
> </reference>
>
> Rule 2. Each reference binding may be configured to be a RPC client to
> certain program module (which is hosted on Erlang node and one Erlang node
> may host many modules). Following reference can be only used to execute
> functions declared in "hello" module on "RPCServer" node. Module can contain
> many functions so target name will be taken from method executed in
> referenced object. To access different modules separate references should be
> created.
>
> <reference name="moduleReference">
>        <tuscany:binding.erlang node="RPCServer" module="hello"/>
> </reference>
>
> Rule 3. Each service may be configured to be RPC server. If so then it acts
> as program module on node - it's similar to rule 2, but reversed.
>
> <service name="ServiceTest" promote="ServiceTest">
>  <interface.java interface="...ServiceTestComponent" />
>    <tuscany:binding.erlang node="RPCServer" module="hello"/>
> </service>
>
> Sample uses of this binding can be found in JUnit tests in
> binding-erlang-runtime module.
>
> I also have/had some problems, which are infrastructure related:
>
> Problem 1. Erlang binding uses official jinterface library which I didn't
> found in official maven repositories. It can be added locally to maven
> repository, but it obviously breaks automation of building project. What is
> your experience for such case?


Ideally we'd get it put in the maven repository, the owner may do that if we
ask. In the mean time create a repository somewhere and define that
repository in your pom.xml, eg:

    <repositories>
       <!-- This is required to work around a bug in the JRuby pom, see
http://jira.codehaus.org/browse/JRUBY-901 -->
       <repository>
          <id>ant-jruby</id>
          <url>http://people.apache.org/~antelder/jruby-repo</url>
          <snapshots>
             <enabled>true</enabled>
          </snapshots>
       </repository>
    </repositories>

We've a repo in SVN that some are using for that -
https://svn.apache.org/repos/asf/tuscany/maven/ - I'm not sure if the ASF
infrastructure people really like us using SVN like that though.



>
>
> Problem 2. Testing-  Erlang uses Erlang Port Mapper Demon (epmd) to
> register nodes etc. Epmd is standalone, non-java program and Erlang binding
> tests needs it to be launched - it also can break automation of building and
> testing project. I don't feel like rewriting it in Java ;) Also having
> native Erlang nodes would be the best (not emulating them by jinterface) and
> to do that we need to execute native erl binary. Any thoughts?
>
>
Could you use Runtime.getRuntime().exec()?

   ...ant

Reply via email to