[graalvm-users] Migrate from Nashhorn JSR 223 Scripting Engine to Graal

Christian Wirth christian.wirth at oracle.com
Fri Jun 22 07:45:41 PDT 2018


Hi Andreas,

we will investigate whether we can avoid requiring the annotation.

Did you try if it worked if you annotated it? Or is your code (or 
relevant parts of it) open-source so we can run it ourselves?


 > What we need is in fact a Nashorn replacement as a scripting engine 
as part of the JDK
 > or as a plugin into the JDK by adding it to the classpath.

Executing Graal JavaScript on a stock JDK is possible already (without 
Graal as optimizing compiler), and we are working on a fully-performant 
solution for JDK 11 (with Graal). Graal JavaScript tries to be closely 
compatible to Nashorn, but it is unrealistic that it ever provides 100% 
compatibility. Feedback like yours helps us understand what users care 
about most.


 > Nashorn’s performance is ok for us but an increase would be much
 > appreciated. Are there plans to provide that?

Graal JavaScript is significantly faster than Nashorn on most peak 
performance benchmarks (often orders of magnitude faster). But please 
note the difference: Nashorn always compiles the JavaScript code it 
executes to bytecode. Graal JavaScript requires Graal as optimizing 
compiler to achive good performance. The setup you are testing right now 
does not include Graal, so in your case, JavaScript is only interpreted, 
thus you will experience a performance impact.

Best,
Christian


Am 22.06.2018 um 16:13 schrieb Andreas Mueller:
> Hi Andreas,
>
>> 2. onTimer({execute: function(timer){}})
>> (where execute is the name of the interface method)
>> or if possible, add @FunctionalInterface to the interface
>
> I guess it’s the above. I can’t change the scripts as we have hundreds 
> of them on customer’s side. We use Nashorn as the scripting engine for 
> SwiftMQ Streams. Nashorn automatically choses the right method without 
> the need to annotate.
>
> Adding the annotation is possible but can’t you provide a kind of 
> Nashorn compatibility mode? That would make the transitioning a lot 
> easier.
>
> Concerning using GraalVM as the JVM:
>
> We use the scripting engine as an integral part of our message broker. 
> Customer’s don’t switch to GraalVM in production because we tell’em. 
> What we need is in fact a Nashorn replacement as a scripting engine as 
> part of the JDK or as a plugin into the JDK by adding it to the 
> classpath. Nashorn’s performance is ok for us but an increase would be 
> much appreciated. Are there plans to provide that?
>
> Thanks,
> Andreas
> -- 
> Andreas Mueller
> IIT Software GmbH
> http://www.swiftmq.com 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.swiftmq.com&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=TwCwf8ZdAn5bhnAsuLjir7XDckgfN3fPg7_BxpI6ejI&s=Xsylc_W7_X1n8qyu8YUic4sO1x1JwIs84rKr3pLT1kA&e=>
>
>
>
>
>
> ------------------------------------------------------------------------
> IIT Software GmbH
> Falkenhorst 11, 48155 Münster, Germany
> Phone: +49 (0)251 39 72 99 00
> Managing Director: Andreas Müller
> District Court: Amtsgericht Münster, HRB 16294
> VAT-No: DE199945912
>
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>
>
> _______________________________________________
> GraalVM-Users mailing list
> GraalVM-Users at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/graalvm-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/graalvm-users/attachments/20180622/20689d50/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swiftmq_logo_positiv.png
Type: image/png
Size: 10241 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/graalvm-users/attachments/20180622/20689d50/attachment-0001.png 


More information about the GraalVM-Users mailing list