Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Embedding Erjang in a CEP Engine
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kresten Krab Thorup  
View profile  
 More options May 31 2011, 8:02 am
From: Kresten Krab Thorup <k...@trifork.com>
Date: Tue, 31 May 2011 14:02:24 +0200
Local: Tues, May 31 2011 8:02 am
Subject: Re: [erjang] Re: Embedding Erjang in a CEP Engine
Hi folks,

If one of you want to write up the "host interface"

        interface ErjangHost {
               InputStream getInput();
               OutputStream getOutput();
               OutputStream getErr();
               void system_exit();
               ...
       }

Then I'd be glad to help you find the places in the code where it needs to be used.  Perhaps there is more than the above (system properties, initial arguments, etc.)

Out of the box, Erjang can only run one Erlang VM per JVM.  But if you wrap it up in a separate class loader then you could run more (I did that in my Ruby VM).

Kresten

On May 31, 2011, at 12:51 PM, Jetztgradnet wrote:

> Hi Darach,

> thanks for your detailed answer!

>> I followed Kresten's recipe for embedding Erjang here:https://github.com/trifork/erjang/commit/8221f25ce2f082f405b4c06f1326...

> That's what I did as well.

>> I elected to let shutdown hang wet. The shutdown issue was a non-issue in my case as only have a
>> single instance of the erjang runtime.

> OK, so I understand you simply keep your Erjang istance around
> "forever" without shutting it down during runtime of your app.

>> I avoided IO issues as I don't use System IO at all.

> I would like to have a universal erjang wrapper, which allows IO as
> well, so I need to channel any IO to/through a configurable channel,
> which can, e.g. forwarded into a HTTP response.

>> My interface or contract with erjang and erlang modules
>> are a set of behaviours where no IO is expected or implied, in other words
>> the behaviours are assumed side-effect free.
>> As I control the integration context and define the behaviours that
>> erlang (erjang) modules are bound to I have all the control I need.

> OK, that's probably the best approach for a self-contained app.

>> In my case a lighter weight application controlled scheduler and an
>> alternative to erjang.RPC would be optimal, but mine is a niche use
>> case and my thoughts aren't yet fully formed and are at least half baked at
>> this time!

> (Why) do you consider erjang.RPC heavy weight? I plan to use this as
> well to allow control from the Java side and maybe bridge web
> requests. Also I would like to create a bridge into the OSGi world,
> which would also require RPC for Java-Erlang interaction. What might
> make it heavy weight is the (de)marshalling of Java objects in/from
> Erlang terms.

>> If you're at the Erlang Factory in London next week let's hook up.

> Would be interesing, but this is unfortunately no option for me. I'm
> currently looking into Erlang/Erjang as a hobby project, so there is
> neither time nor budget to go to a Erlang conference. But I would like
> to continue this discussion in this forum.

>> Lifecycle management is something that most folk using erjang in an embedded way will want. I'd imagine most of us deploy into a containerized environment
>> of some description so control of and hooks into lifecycle events are a shared concern and challenge for embedded erjang.

> Yes, that's why I'm looking into to biggest limits, which is currently
> the call to System.exit() at shutdown and other issues for containers,
> which support reloading, i.e. Servlet containers and OSGi
> environments.

> Again, thanks for your thoughts!

> Wolfgang


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.