nashorn, what is the whole buzz about #4developers

27
1 CONFIDENTIAL Nashorn, what is the whole buzz about

Upload: michal-gruca

Post on 06-Aug-2015

38 views

Category:

Technology


0 download

TRANSCRIPT

1CONFIDENTIAL

Nashorn, what is the whole buzz about

3CONFIDENTIAL

I love your feedback!

@michalgruca

[email protected]

www.rits.pl

4CONFIDENTIAL

5CONFIDENTIAL

GENERALNASHORN

6CONFIDENTIAL

Background Image

logo

7CONFIDENTIAL

• yet another js runtime -> on server

built on top of Java

quite fast

EcmaScript 5.1 compatible

Nashorn is …

By Valentina Storti

8CONFIDENTIAL

Allows to build DSL

Runtime modularity

Full access from .js to JVM

A lot of developers on market

Simple language

Even your user may try it

Why to use

9CONFIDENTIAL

Or because …

logo

10CONFIDENTIAL

GENERALNASHORN :: DEMO

11CONFIDENTIAL

TWO WAY INTEROPERABILITYNASHORN :: DEMO

12CONFIDENTIAL

TESTINGNASHORN :: DEMO

13CONFIDENTIAL

VALIDATIONNASHORN :: DEMO

14CONFIDENTIAL

SCRIPTINGNASHORN :: DEMO

15CONFIDENTIAL

PROJECT AVATARNASHORN

16CONFIDENTIAL

• Project Avatar is a JavaScript service layer, that fully utilizes Nashorn Engine.

• It aims at reducing JavaScript knowledge required to start coding

• It’s a direct response to node

What avatar is

17CONFIDENTIALhttps://www.flickr.com/photos/45928872@N08/4211101808/

18CONFIDENTIAL

Meanwhile in Java land

www.techempower.com/benchmarks

19CONFIDENTIAL

CONSNASHORN

20CONFIDENTIAL

May be twice+ slower than V8

http://ariya.ofilabs.com/2014/03/nashorn-the-new-rhino-on-the-block.html

21CONFIDENTIAL

• Nashorn is much slower than Node

– But getting faster! (JDK8u20 & JDKu40)

• JDK 8 only

– JDK 7: Rhino and dynJS

• May have issues with various frameworks

• Yet another level of abstraction

– With not so many examples

https://www.threadless.com/@alanis

22CONFIDENTIAL

Can be tricky

Types– Collections

Programming modelExecution modelScopes & contextesLibrariesDevelopers

by Yoel Ben-Avraham

23CONFIDENTIAL

ITERATINGNASHORN :: DEMO

24CONFIDENTIAL

REAL WORLD EXAMPLENASHORN

25CONFIDENTIAL

My project

Soft real timeControlling thousands of devicesMultithreaded„Distributed”

26CONFIDENTIAL

27CONFIDENTIAL

I love your feedback!

@michalgruca

[email protected]

www.rits.pl