27
1 CONFIDENTIAL Nashorn, what is the whole buzz about

4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

  • Upload
    proidea

  • View
    166

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

1CONFIDENTIAL

Nashorn, what is the

whole buzz about

Page 2: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

2CONFIDENTIAL

Ask questions

By The U.S. Army

Page 3: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

3CONFIDENTIAL

I love your feedback!

@michalgruca

[email protected]

www.rits.pl

Page 4: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

4CONFIDENTIAL

Page 5: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

5CONFIDENTIAL

GENERAL

NASHORN

Page 6: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

6CONFIDENTIAL

Page 7: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

7CONFIDENTIAL

• yet another js runtime -> on server

built on top of Java

quite fast

EcmaScript 5.1 compatible

Nashorn is …

By Valentina Storti

Page 8: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

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

Page 9: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

9CONFIDENTIAL

Or because …

Page 10: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

10CONFIDENTIAL

GENERAL

NASHORN :: DEMO

Page 11: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

11CONFIDENTIAL

TWO WAY INTEROPERABILITY

NASHORN :: DEMO

Page 12: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

12CONFIDENTIAL

TESTING

NASHORN :: DEMO

Page 13: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

13CONFIDENTIAL

VALIDATION

NASHORN :: DEMO

Page 14: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

14CONFIDENTIAL

SCRIPTING

NASHORN :: DEMO

Page 15: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

15CONFIDENTIAL

PROJECT AVATAR

NASHORN

Page 16: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

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

Page 17: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

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

Page 18: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

18CONFIDENTIAL

www.techempower.com/benchmarks

Page 19: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

19CONFIDENTIAL

CONS

NASHORN

Page 20: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

20CONFIDENTIAL

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

Page 21: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

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

Page 22: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

22CONFIDENTIAL

Can be tricky

• Types

– Collections

• Programming model

• Execution model

• Scopes & contextes

• Libraries

• Developers

by Yoel Ben-Avraham

Page 23: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

23CONFIDENTIAL

ITERATING

NASHORN :: DEMO

Page 24: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

24CONFIDENTIAL

REAL WORLD EXAMPLE

NASHORN

Page 25: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

25CONFIDENTIAL

My project

• Soft real time

• Controlling thousands of devices

• Multithreaded

• „Distributed”

Page 26: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

26CONFIDENTIAL

Page 27: 4Developers 2015: Nashorn - o co ten cały szum - Michał Gruca

27CONFIDENTIAL

I love your feedback!

@michalgruca

[email protected]

www.rits.pl