You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Tyson Norris <tn...@adobe.com> on 2014/06/04 17:36:27 UTC

python via java+scriptengine+jython

Hi - 
I’ve seen several people attempting to run python bolts via multilang, and wondered if anyone has tried and can compare with running some python functions via java ScriptEngine? That is uses a normal java bolt that calls python functions via ScriptEngine.

We are experimenting with this approach (script engine), but don’t have anything useful built yet.

Thanks
Tyson

Re: python via java+scriptengine+jython

Posted by Tyson Norris <tn...@adobe.com>.
Yes, just wondering if anyone has compared performance.
I have been sidetracked and have not completed our prototype yet, but was curious if anyone else had pursued with good or bad results, aside from jython compatibility issues etc.

Thanks
Tyson

On Jun 5, 2014, at 3:25 PM, Andrew Montalenti <an...@parsely.com>> wrote:

Don't see why this wouldn't be possible. I assume a ScriptEngine implementation would be using jython, so the usual caveats about jython apply (e.g. you don't have access to all 3rd-party libraries and you tend to be behind in Python versions). What kind of comparison are you looking for, a performance-oriented one? It's bound to be faster, I suppose, because it can avoid multi-lang serialization/deserialization, although jython isn't exactly widely-renowned for its interpreter speed.


On Wed, Jun 4, 2014 at 11:36 AM, Tyson Norris <tn...@adobe.com>> wrote:
Hi -
I’ve seen several people attempting to run python bolts via multilang, and wondered if anyone has tried and can compare with running some python functions via java ScriptEngine? That is uses a normal java bolt that calls python functions via ScriptEngine.

We are experimenting with this approach (script engine), but don’t have anything useful built yet.

Thanks
Tyson



Re: python via java+scriptengine+jython

Posted by Andrew Montalenti <an...@parsely.com>.
Don't see why this wouldn't be possible. I assume a ScriptEngine
implementation would be using jython, so the usual caveats about jython
apply (e.g. you don't have access to all 3rd-party libraries and you tend
to be behind in Python versions). What kind of comparison are you looking
for, a performance-oriented one? It's bound to be faster, I suppose,
because it can avoid multi-lang serialization/deserialization, although
jython isn't exactly widely-renowned for its interpreter speed.


On Wed, Jun 4, 2014 at 11:36 AM, Tyson Norris <tn...@adobe.com> wrote:

> Hi -
> I've seen several people attempting to run python bolts via multilang, and
> wondered if anyone has tried and can compare with running some python
> functions via java ScriptEngine? That is uses a normal java bolt that calls
> python functions via ScriptEngine.
>
> We are experimenting with this approach (script engine), but don't have
> anything useful built yet.
>
> Thanks
> Tyson