project nashorn, why should we care #js.next()
TRANSCRIPT
![Page 1: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/1.jpg)
Excellence inSoftware Engineering
Project Nashorn – why should we care
@michalgruca
![Page 2: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/2.jpg)
Excellence in Software Engineering
![Page 3: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/3.jpg)
Excellence in Software Engineering @michalgruca 3
What is Nashorn
![Page 4: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/4.jpg)
Excellence in Software Engineering @michalgruca 4
Whats the fuss all about
● Yet another js runtime -> on server
● Quite fast
● Built on top of Java
● EcmaScript 5.1 compatible
![Page 5: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/5.jpg)
Excellence in Software Engineering @michalgruca 5
But Node
● Mature
● Tested
● Has ecosystem (modules)
● Fast!
V8 powered
![Page 6: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/6.jpg)
Excellence in Software Engineering @michalgruca 6
It's different architecture than Node!
![Page 7: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/7.jpg)
Excellence in Software Engineering @michalgruca 7
Threads!
![Page 8: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/8.jpg)
Excellence in Software Engineering @michalgruca 8
But WHY to use it?!
![Page 9: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/9.jpg)
Excellence in Software Engineering @michalgruca 9
Access to JVM!
JVM
![Page 10: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/10.jpg)
Excellence in Software Engineering @michalgruca 10
Really
Java
http://lustich.de/bilder/tiere/really-dog/
![Page 11: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/11.jpg)
Excellence in Software Engineering @michalgruca 11
Avatar.js
Avatar.js is a project to Avatar.js is a project to bring the nodebring the node programming model, APIs and module ecosystem programming model, APIs and module ecosystem to the Java platformto the Java platform, enabling a new class of , enabling a new class of hybrid server applications that can leverage two of hybrid server applications that can leverage two of the most popular programming languages and the most popular programming languages and ecosystems today. ecosystems today.
These These Java+JavaScriptJava+JavaScript applications can applications can leverageleverage capabilities of capabilities of both environmentsboth environments - - access the latest access the latest node frameworksnode frameworks while taking while taking advantage of the advantage of the Java platform's scalability, Java platform's scalability, manageability, toolsmanageability, tools, and extensive collection of , and extensive collection of Java Java librarieslibraries and middleware. and middleware.
https://avatar-js.java.net/
![Page 12: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/12.jpg)
Excellence in Software Engineering @michalgruca 12
Avatar.js
https://avatar-js.java.net/
![Page 13: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/13.jpg)
Excellence in Software Engineering @michalgruca 13
Compatible with existing Java applications
![Page 14: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/14.jpg)
Excellence in Software Engineering @michalgruca 14
Allows to create Java in Js
DEMOhttps://github.com/mgruca/nashorn_example/blob/master/src/main/test/pl/rits/Runner.java#L19https://github.com/mgruca/nashorn_example/blob/master/src/main/test/pl/rits/Runner.java#L25
![Page 15: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/15.jpg)
Excellence in Software Engineering @michalgruca 15
EnterpriseEnterprisereadyready
By Takashi Hososhima
![Page 16: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/16.jpg)
Excellence in Software Engineering @michalgruca 16
Enterprise?
![Page 17: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/17.jpg)
Excellence in Software Engineering @michalgruca 17
Big stuff
![Page 18: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/18.jpg)
Excellence in Software Engineering @michalgruca 18
Libs
![Page 19: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/19.jpg)
Excellence in Software Engineering @michalgruca 19
Security & Crypto
X.509X.509
PKIPKI
S/MIMES/MIME
Open/PGPOpen/PGP
PKCS#10 PKCS#10 PKCS#12PKCS#12
Hashing algorithmsHashing algorithms
![Page 20: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/20.jpg)
Excellence in Software Engineering @michalgruca 20
XML!
● SAX● Dom● STaX● ...● ...● Bindings● You name it!
![Page 21: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/21.jpg)
Excellence in Software Engineering @michalgruca 21
Office support
![Page 22: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/22.jpg)
Excellence in Software Engineering @michalgruca 22
Desktop
By Moriline: http://en.wikipedia.org/wiki/NetBeans#mediaviewer/File:Gui-builder.png
![Page 23: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/23.jpg)
Excellence in Software Engineering @michalgruca 23
Allows OS scripting!
DEMOhttps://github.com/mgruca/nashorn_example/blob/master/scripts/fx.shhttps://github.com/mgruca/nashorn_example/blob/master/scripts/sample.sh
![Page 24: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/24.jpg)
Excellence in Software Engineering @michalgruca 24
IO
● Channels
● Streams
● Buffers
● Readers / Writers
● Blocking / Non blocking
![Page 25: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/25.jpg)
Excellence in Software Engineering @michalgruca 25
Testing and verification
DEMOhttps://github.com/mgruca/nashorn_example/blob/master/src/main/test/pl/rits/Runner.java#L48
![Page 26: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/26.jpg)
Excellence in Software Engineering @michalgruca 26
Access to all platforms and H/W
![Page 27: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/27.jpg)
Excellence in Software Engineering @michalgruca 27
Polyglot enabled
![Page 28: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/28.jpg)
Excellence in Software Engineering @michalgruca 28
cons
By Hans Hillewaert
![Page 29: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/29.jpg)
Excellence in Software Engineering @michalgruca 29
Slower than Node
May be twice+ slower than V8http://ariya.ofilabs.com/2014/03/nashorn-the-new-rhino-on-the-block.html
![Page 30: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/30.jpg)
Excellence in Software Engineering
Mean tim
e in Java land
Mean tim
e in Java land
www.techempower.com/benchmarks
![Page 31: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/31.jpg)
Excellence in Software Engineering @michalgruca 31
Java experts necessary
2
![Page 32: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/32.jpg)
Excellence in Software Engineering @michalgruca 32
Can be tricky
By Yoel Ben-Avraham
Demo: https://github.com/mgruca/nashorn_example/blob/master/src/main/test/pl/rits/Runner.java#L42
![Page 33: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/33.jpg)
Excellence in Software Engineering @michalgruca 33
Real world examples
What can we do with it?What can we do with it?
![Page 34: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/34.jpg)
Excellence in Software Engineering @michalgruca 34
My project
![Page 35: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/35.jpg)
Excellence in Software Engineering @michalgruca 35
Questions
By Xurblehttps://www.flickr.com/photos/xurble/376588066/
![Page 36: Project Nashorn, why should we care #js.next()](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a78d4e1a28ab306e8b48a7/html5/thumbnails/36.jpg)
Excellence in Software Engineering @michalgruca 36
I love feedback! :)
@michalgruca
www.rits.pl