SlideShare a Scribd company logo
How and why
GraalVM is
quickly becoming
relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020, November 2020
Lucas Jellema, CTO & Architect AMIS | Conclusion
• Spaghetti recht
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
• Spaghetti gekookt
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Lifetime of a software application
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
A wonderful piece of machine
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
A wonderful piece of machine
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Cost Complexity Risk
1999 2020
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Fit, Value and Agility
Big Bowl
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
(limited) Spring Boot
support for GraalVM
native images
2017
Some history on GraalVM
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Project spun off from
Maxine VM
2012
Proof of Concept: a compiler written in Java (with all its
software engineering advantages) could generate highly
optimized code without compromising on compile times
2019
Twitter started to run its
many Scala applications
on the GraalVM JIT
Compiler to save money
and CPU cycles
20.2.0
August, 2020
WebLogic
Certified on
GraalVM
GraalVM
“productized”
at Oracle
ES2020
support
GraalVM
Advisory
Board
Spring Framework
5.3 with GraalVM
AOT support
(October 2020)
WebAssembly
support
Oracle
Database
MLE
GraalVM support in
Helidon, Micronaut &
Quarkus
Coherence
support for
GraalVM
Project Fn
GraalVM
enabled
Java 11
support
Node 12.18 and
iniitial ES2021
support
Ruby 2.6.6, Java
11.08, improved
VS Code support
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
bit.ly/graalvm-handson
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Native
Polyglot
Interoperability
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
simple
runtime
stateless, single
request | event
handling
rapid
startup
fast
execution
small
application
footprint
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
simple
runtime
stateless, single
request | event
handling
rapid
startup
fast
execution
small
application
footprint
Native?!
• a binary executable
• that runs on just a bare O/S
• possibly a minimal container or serverless function
• fast startup
• small footprint (disk & memory)
• simple environment
• fast execution
• typically short-lived stateless request or event processing
• not stateful and long running
• not happily ever faster JIT compilation but build time AOT
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Run Time
Just in Time
compilation
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Run Time
Just in Time
compilation
Ahead of Time
compilation
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Native Images (AOT) versus JVM JIT
Ahead-of-Time Compilation
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Application
Substrate VM
JDK
Libraries
All Java classes from
your application, JDK
and Substrate VM
Points-
to analysis
Run
initializations
Heap
snapshotting
Iterative analysis on all
reachable methods,
fields and classes
Machine Code
Image Heap
Native executable
Application running without
dependency on JDK
Input Analysis Output
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Program in X *)
Use my coding skills with X
Import existing code in X
Leverage libraries and native features
of X
Run on an enterprise grade, fast and
stable VM with tools to operate
*) X can be Node, Python, Ruby, R, …
(and Scala, Groovy, Kotlin)
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for youOracle Database
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
The Grass is Greener
• The other programming language …
• is so much better at …
• has great libraries for …
• is the one used by our domain experts …
• was used to implement modules we would like to reuse
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Extending the lawn by opening the fence
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Polyglot Interoperability
• Establish frictionless interaction between language contexts
• To benefit from the best of all wor(l)ds
• Call out to ‘other world’ in a native way
• Receive response in interpretable format
• Minimal hoops to jump through at design time
• Minimal performance overhead at run time
• Uncomplicated run time environment
• Despite multiple runtime execution languages
• Basically: polyglot with the ease of mono-glot
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Meta Language
(concepts, grammar,
structure)
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Abstract Syntax Tree
(variables, loops, conditions,
calls, arithmetic)
Truffle framework
GraalVM can merge and run (Java Byte) code
derived from various origins
• GraalVM provides generic objects
in all supported languages to make
Polyglot call-outs, evaluate embedded
foreign code and share data across
language contexts
• This enables interoperability
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
GraalVM
Polyglot
Fortran
Haskell
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
CODE
From Java to JavaScript
Evaluate a Simple Code Snippet
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Create Polyglot
context
Evaluate
Snippet
Import Graal
Polyglot package
From Java to JavaScript
Evaluate a JavaScript Function – then call it as Java method
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Create Polyglot
context
Evaluate
Snippet
Evaluate Snippet =>
instantiate function
Execute function
Import Graal
Polyglot package
From Java to JavaScript
Handle exception in Java thrown in JavaScript
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Create Polyglot
context
Evaluate
Snippet
Evaluate Snippet =>
instantiate function
Execute function
Handle Exception
from JS
Import Graal
Polyglot package
A Typical Java Challenge
(aided by JavaScript interaction)
• Developing a Java application
• Need to perform validations on input data
• Postal Code (various countries), Mobile Phone Numbers (many
countries), Email Address, Credit Card Number etc.
• NPM Module Validator offers
most of these OOTB
• But… it is written in JavaScript
• How does that help me?
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
A Typical Java Challenge
• Developing a Java application
• I need to perform validations on input data
• Postal Code (various countries), Mobile Phone Numbers (many
countries), Email Address, Credit Card Number etc.
• In Pseudo Code:
•
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Validator.js – a community package with dozens of
predefined validations … in JavaScript
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
JavaScript Validator Module is compatible with GraalJS
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
A Typical Java Challenge – Resolved (with GraalVM)
• Embrace GraalVM as the Java runtime
• Install npm module validator
• Install and use webpack
to create a single bundle for module validator
• Extend Java application
• Import GraalVM Polyglot package
• Create JavaScript Context
• Load validator_bundled.js into context
• Get desired JS functions from bindings map
• Execute required JS functions
as if they were Java methods
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
A Typical Java Challenge – Resolved (with GraalVM)
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Polyglot from JavaScript to other Graal Truffle Languages
• Polyglot.eval can execute any language snippet
• It returns data objects (to read/write) or functions (that can be executed)
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
GraalVM
Polyglot
Polyglot from non-JVM languages
Dutch National Police Case: Scala  (Fast)R on GraalVM
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
GraalVM
Polyglot
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Conclusion
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
source: https://www.beyondjava.net/what-about-graalvm
JIT
Native
Polyglot
Custom DSL
Interoperable
Tools
GraalVM:
Two Editions
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
GraalVM EE included
in all OCI subscriptions
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
GraalVM Enterprise is included in all Oracle Cloud
Infrastructure (OCI) subscriptions so you can use it at no
additional charge (Compute, OKE, Functions, ...)
Adopting GraalVM in your team - your first steps
• Start exploring GraalVM – download & install, play and do a PoC
• Plenty of resources available (code samples, blog articles, tutorials, ..)
• Hybrid: have some containers running GraalVM (for Java applications)
instead of your traditional JVM brand
• to try out, check if it is stable and performant and (better) manageable
• AOT/native - use GraalVM to build Java applications
as native executables as last step in the build process
and deliver that executable instead of JAR files
• create Java based Serverless Functions
with small footprint and very quick startup
• benefit from ultra fast and super small frameworks
(Quarkus, Helidon, Micronaut, , Vert.x, Spring, …)
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
Adopting GraalVM in your team - your next steps
• Start leveraging polyglot
• single runtime for different programming languages)
• interoperability (benefit in Java from 3rd party libraries in JavaScript
or Python [or vice versa] and/or make better use of the skills in your team)
• better start creating standards and guidelines around when and how to polyglot!
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
GraalVM
Polyglot
Fortran
Haskell
Thank you for your attention
DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
lucas.jellema@amis.nl | technology.amis.nl | @lucasjellema | lucas-jellema
bit.ly/graalvm-handson
https://bit.ly/...
Slides:
Katacoda Live Handson Environments

More Related Content

PDF
Polyglot on the JVM with Graal (Japanese)
PDF
Processing Terabytes of data every day … and sleeping at night (infiniteConf ...
PDF
Processing TeraBytes of data every day and sleeping at night
PDF
Processing TeraBytes of data every day and sleeping at night
PDF
Serverless architectures with Fn Project
PDF
Comparing JVM Web Frameworks - February 2014
PDF
Future of Grails
PPTX
Spring Boot & Spring Cloud on k8s and PCF
Polyglot on the JVM with Graal (Japanese)
Processing Terabytes of data every day … and sleeping at night (infiniteConf ...
Processing TeraBytes of data every day and sleeping at night
Processing TeraBytes of data every day and sleeping at night
Serverless architectures with Fn Project
Comparing JVM Web Frameworks - February 2014
Future of Grails
Spring Boot & Spring Cloud on k8s and PCF

What's hot (20)

PDF
Cloud Native Java:GraalVM
PPTX
Cloud Native CI/CD with Spring Cloud Pipelines
PPTX
Microservices chassis
PDF
Front-end for Java developers Devoxx France 2018
PDF
OSGi for outsiders - Milen Dyankov
PDF
In defense of GWT-RPC By Colin Alworth
PDF
Curious Coders Java Web Frameworks Comparison
PDF
Containers and Kubernetes without limits
KEY
Enterprise Architectures with Ruby (and Rails)
PDF
JFokus Java 9 contended locking performance
ODP
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
PDF
Building Translate on Glass
PPTX
Testing Java Microservices: From Development to Production
PPTX
(java2days) Is the Future of Java Cloudy?
PDF
GitOps is the best modern practice for CD with Kubernetes
PPTX
Neo4J and Grails
PDF
賣 K8s 的人不敢告訴你的事 (Secrets that K8s vendors won't tell you)
PPT
GWT + Gears : The browser is the platform
PDF
Free GitOps Workshop + Intro to Kubernetes & GitOps
PDF
Why every startup built with Ruby on Rails has an upper hand over their compe...
Cloud Native Java:GraalVM
Cloud Native CI/CD with Spring Cloud Pipelines
Microservices chassis
Front-end for Java developers Devoxx France 2018
OSGi for outsiders - Milen Dyankov
In defense of GWT-RPC By Colin Alworth
Curious Coders Java Web Frameworks Comparison
Containers and Kubernetes without limits
Enterprise Architectures with Ruby (and Rails)
JFokus Java 9 contended locking performance
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
Building Translate on Glass
Testing Java Microservices: From Development to Production
(java2days) Is the Future of Java Cloudy?
GitOps is the best modern practice for CD with Kubernetes
Neo4J and Grails
賣 K8s 的人不敢告訴你的事 (Secrets that K8s vendors won't tell you)
GWT + Gears : The browser is the platform
Free GitOps Workshop + Intro to Kubernetes & GitOps
Why every startup built with Ruby on Rails has an upper hand over their compe...
Ad

Similar to How and why GraalVM is quickly becoming relevant for you (DOAG 2020) (20)

PPTX
How and Why GraalVM is quickly becoming relevant for developers (ACEs@home - ...
PPTX
HOW AND WHY GRAALVM IS QUICKLY BECOMING RELEVANT FOR YOU
PDF
PDF
General Capabilities of GraalVM by Oleg Selajev @shelajev
PDF
Graalvm with Groovy and Kotlin - Madrid GUG 2019
PDF
Polyglot Applications with GraalVM
PDF
Graalvm with Groovy and Kotlin - Greach 2019
PPTX
JVM++: The Graal VM
PPTX
GraalVM how to speedup & lover footprint of your app by doing nothing*
PDF
Javantura v4 - JVM++ The GraalVM - Martin Toshev
PDF
Graal Tutorial at CGO 2015 by Christian Wimmer
PDF
GraalVM - OpenSlava 2019-10-18
PDF
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
PDF
GraalVM - MadridJUG 2019-10-22
PDF
GraalVM - JBCNConf 2019-05-28
PDF
Polygot Java EE on the GraalVM
PDF
Graal VM: Multi-Language Execution Platform
PDF
The need for speed. What is GraalVM? – 4Developers Wrocław 2019
PDF
GraalVM: Run Programs Faster Everywhere
How and Why GraalVM is quickly becoming relevant for developers (ACEs@home - ...
HOW AND WHY GRAALVM IS QUICKLY BECOMING RELEVANT FOR YOU
General Capabilities of GraalVM by Oleg Selajev @shelajev
Graalvm with Groovy and Kotlin - Madrid GUG 2019
Polyglot Applications with GraalVM
Graalvm with Groovy and Kotlin - Greach 2019
JVM++: The Graal VM
GraalVM how to speedup & lover footprint of your app by doing nothing*
Javantura v4 - JVM++ The GraalVM - Martin Toshev
Graal Tutorial at CGO 2015 by Christian Wimmer
GraalVM - OpenSlava 2019-10-18
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
GraalVM - MadridJUG 2019-10-22
GraalVM - JBCNConf 2019-05-28
Polygot Java EE on the GraalVM
Graal VM: Multi-Language Execution Platform
The need for speed. What is GraalVM? – 4Developers Wrocław 2019
GraalVM: Run Programs Faster Everywhere
Ad

More from Lucas Jellema (20)

PPTX
Introduction to web application development with Vue (for absolute beginners)...
PPTX
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
PPTX
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
PPTX
Apache Superset - open source data exploration and visualization (Conclusion ...
PPTX
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
PPTX
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
PPTX
Op je vingers tellen... tot 1000!
PPTX
IoT - from prototype to enterprise platform (DigitalXchange 2022)
PPTX
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
PPTX
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
PPTX
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
PPTX
Introducing Dapr.io - the open source personal assistant to microservices and...
PPTX
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
PPTX
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
PPTX
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
PPTX
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
PPTX
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
PPTX
Tech Talks 101 - DevOps (jan 2022)
PPTX
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
PPTX
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Introduction to web application development with Vue (for absolute beginners)...
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
Apache Superset - open source data exploration and visualization (Conclusion ...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
Op je vingers tellen... tot 1000!
IoT - from prototype to enterprise platform (DigitalXchange 2022)
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Introducing Dapr.io - the open source personal assistant to microservices and...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Tech Talks 101 - DevOps (jan 2022)
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...

Recently uploaded (20)

PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
L1 - Introduction to python Backend.pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Introduction to Artificial Intelligence
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Nekopoi APK 2025 free lastest update
PDF
medical staffing services at VALiNTRY
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
history of c programming in notes for students .pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
ai tools demonstartion for schools and inter college
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
AI in Product Development-omnex systems
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Choose the Right IT Partner for Your Business in Malaysia
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
L1 - Introduction to python Backend.pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
top salesforce developer skills in 2025.pdf
Odoo Companies in India – Driving Business Transformation.pdf
Introduction to Artificial Intelligence
wealthsignaloriginal-com-DS-text-... (1).pdf
Reimagine Home Health with the Power of Agentic AI​
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Nekopoi APK 2025 free lastest update
medical staffing services at VALiNTRY
Design an Analysis of Algorithms II-SECS-1021-03
history of c programming in notes for students .pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
ai tools demonstartion for schools and inter college
Upgrade and Innovation Strategies for SAP ERP Customers
AI in Product Development-omnex systems

How and why GraalVM is quickly becoming relevant for you (DOAG 2020)

  • 1. How and why GraalVM is quickly becoming relevant for you DOAG 2020 | How and why GraalVM is quickly becoming relevant for you DOAG 2020, November 2020 Lucas Jellema, CTO & Architect AMIS | Conclusion
  • 2. • Spaghetti recht DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 3. • Spaghetti gekookt DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 4. Lifetime of a software application DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 5. A wonderful piece of machine DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 6. A wonderful piece of machine DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 7. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Cost Complexity Risk 1999 2020
  • 8. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Fit, Value and Agility
  • 9. Big Bowl DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 10. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 11. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 12. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 13. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 14. (limited) Spring Boot support for GraalVM native images 2017 Some history on GraalVM DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Project spun off from Maxine VM 2012 Proof of Concept: a compiler written in Java (with all its software engineering advantages) could generate highly optimized code without compromising on compile times 2019 Twitter started to run its many Scala applications on the GraalVM JIT Compiler to save money and CPU cycles 20.2.0 August, 2020 WebLogic Certified on GraalVM GraalVM “productized” at Oracle ES2020 support GraalVM Advisory Board Spring Framework 5.3 with GraalVM AOT support (October 2020) WebAssembly support Oracle Database MLE GraalVM support in Helidon, Micronaut & Quarkus Coherence support for GraalVM Project Fn GraalVM enabled Java 11 support Node 12.18 and iniitial ES2021 support Ruby 2.6.6, Java 11.08, improved VS Code support
  • 15. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you bit.ly/graalvm-handson
  • 16. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 17. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Native Polyglot Interoperability
  • 18. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 19. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you simple runtime stateless, single request | event handling rapid startup fast execution small application footprint
  • 20. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you simple runtime stateless, single request | event handling rapid startup fast execution small application footprint
  • 21. Native?! • a binary executable • that runs on just a bare O/S • possibly a minimal container or serverless function • fast startup • small footprint (disk & memory) • simple environment • fast execution • typically short-lived stateless request or event processing • not stateful and long running • not happily ever faster JIT compilation but build time AOT DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 22. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Run Time Just in Time compilation
  • 23. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Run Time Just in Time compilation Ahead of Time compilation
  • 24. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Native Images (AOT) versus JVM JIT
  • 25. Ahead-of-Time Compilation DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Application Substrate VM JDK Libraries All Java classes from your application, JDK and Substrate VM Points- to analysis Run initializations Heap snapshotting Iterative analysis on all reachable methods, fields and classes Machine Code Image Heap Native executable Application running without dependency on JDK Input Analysis Output
  • 26. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 27. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 28. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Program in X *) Use my coding skills with X Import existing code in X Leverage libraries and native features of X Run on an enterprise grade, fast and stable VM with tools to operate *) X can be Node, Python, Ruby, R, … (and Scala, Groovy, Kotlin)
  • 29. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 30. DOAG 2020 | How and why GraalVM is quickly becoming relevant for youOracle Database
  • 31. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 32. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 33. The Grass is Greener • The other programming language … • is so much better at … • has great libraries for … • is the one used by our domain experts … • was used to implement modules we would like to reuse DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 34. Extending the lawn by opening the fence DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 35. Polyglot Interoperability • Establish frictionless interaction between language contexts • To benefit from the best of all wor(l)ds • Call out to ‘other world’ in a native way • Receive response in interpretable format • Minimal hoops to jump through at design time • Minimal performance overhead at run time • Uncomplicated run time environment • Despite multiple runtime execution languages • Basically: polyglot with the ease of mono-glot DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 36. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Meta Language (concepts, grammar, structure)
  • 37. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Abstract Syntax Tree (variables, loops, conditions, calls, arithmetic) Truffle framework
  • 38. GraalVM can merge and run (Java Byte) code derived from various origins • GraalVM provides generic objects in all supported languages to make Polyglot call-outs, evaluate embedded foreign code and share data across language contexts • This enables interoperability DOAG 2020 | How and why GraalVM is quickly becoming relevant for you GraalVM Polyglot Fortran Haskell
  • 39. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you CODE
  • 40. From Java to JavaScript Evaluate a Simple Code Snippet DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Create Polyglot context Evaluate Snippet Import Graal Polyglot package
  • 41. From Java to JavaScript Evaluate a JavaScript Function – then call it as Java method DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Create Polyglot context Evaluate Snippet Evaluate Snippet => instantiate function Execute function Import Graal Polyglot package
  • 42. From Java to JavaScript Handle exception in Java thrown in JavaScript DOAG 2020 | How and why GraalVM is quickly becoming relevant for you Create Polyglot context Evaluate Snippet Evaluate Snippet => instantiate function Execute function Handle Exception from JS Import Graal Polyglot package
  • 43. A Typical Java Challenge (aided by JavaScript interaction) • Developing a Java application • Need to perform validations on input data • Postal Code (various countries), Mobile Phone Numbers (many countries), Email Address, Credit Card Number etc. • NPM Module Validator offers most of these OOTB • But… it is written in JavaScript • How does that help me? DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 44. A Typical Java Challenge • Developing a Java application • I need to perform validations on input data • Postal Code (various countries), Mobile Phone Numbers (many countries), Email Address, Credit Card Number etc. • In Pseudo Code: • DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 45. Validator.js – a community package with dozens of predefined validations … in JavaScript DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 46. JavaScript Validator Module is compatible with GraalJS DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 47. A Typical Java Challenge – Resolved (with GraalVM) • Embrace GraalVM as the Java runtime • Install npm module validator • Install and use webpack to create a single bundle for module validator • Extend Java application • Import GraalVM Polyglot package • Create JavaScript Context • Load validator_bundled.js into context • Get desired JS functions from bindings map • Execute required JS functions as if they were Java methods DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 48. A Typical Java Challenge – Resolved (with GraalVM) DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 49. Polyglot from JavaScript to other Graal Truffle Languages • Polyglot.eval can execute any language snippet • It returns data objects (to read/write) or functions (that can be executed) DOAG 2020 | How and why GraalVM is quickly becoming relevant for you GraalVM Polyglot
  • 50. Polyglot from non-JVM languages Dutch National Police Case: Scala  (Fast)R on GraalVM DOAG 2020 | How and why GraalVM is quickly becoming relevant for you GraalVM Polyglot
  • 51. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 52. Conclusion DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 53. DOAG 2020 | How and why GraalVM is quickly becoming relevant for you source: https://www.beyondjava.net/what-about-graalvm JIT Native Polyglot Custom DSL Interoperable Tools
  • 54. GraalVM: Two Editions DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 55. GraalVM EE included in all OCI subscriptions DOAG 2020 | How and why GraalVM is quickly becoming relevant for you GraalVM Enterprise is included in all Oracle Cloud Infrastructure (OCI) subscriptions so you can use it at no additional charge (Compute, OKE, Functions, ...)
  • 56. Adopting GraalVM in your team - your first steps • Start exploring GraalVM – download & install, play and do a PoC • Plenty of resources available (code samples, blog articles, tutorials, ..) • Hybrid: have some containers running GraalVM (for Java applications) instead of your traditional JVM brand • to try out, check if it is stable and performant and (better) manageable • AOT/native - use GraalVM to build Java applications as native executables as last step in the build process and deliver that executable instead of JAR files • create Java based Serverless Functions with small footprint and very quick startup • benefit from ultra fast and super small frameworks (Quarkus, Helidon, Micronaut, , Vert.x, Spring, …) DOAG 2020 | How and why GraalVM is quickly becoming relevant for you
  • 57. Adopting GraalVM in your team - your next steps • Start leveraging polyglot • single runtime for different programming languages) • interoperability (benefit in Java from 3rd party libraries in JavaScript or Python [or vice versa] and/or make better use of the skills in your team) • better start creating standards and guidelines around when and how to polyglot! DOAG 2020 | How and why GraalVM is quickly becoming relevant for you GraalVM Polyglot Fortran Haskell
  • 58. Thank you for your attention DOAG 2020 | How and why GraalVM is quickly becoming relevant for you lucas.jellema@amis.nl | technology.amis.nl | @lucasjellema | lucas-jellema bit.ly/graalvm-handson https://bit.ly/... Slides: Katacoda Live Handson Environments

Editor's Notes

  • #6: Java JIT CC uit 1999? Java applications run faster over time because Hotspot VM JIT (C2 compiler) will compile hottest code paths to machine code to take over from interpreted code execution
  • #7: Java JIT CC uit 1999? Java applications run faster over time because Hotspot VM JIT (C2 compiler) will compile hottest code paths to machine code to take over from interpreted code execution
  • #11: new JIT compiler for modern Java/JVM languages
  • #15: https://openjdk.java.net/projects/graal/
  • #23: Two execution paths program (java), compile (bytes/.class) , build (war/jar) (once) => run on JVM (JDK), JIT compilation (very often – in cloud native/serverless scenarios, not so much for long running, stateful Java Enterprise applications program (java), compile (bytes/.class) => AOT into native (once per deploy) => run executable on OS (very often)
  • #24: Two execution paths program (java), compile (bytes/.class) , build (war/jar) (once) => run on JVM (JDK), JIT compilation (very often – in cloud native/serverless scenarios, not so much for long running, stateful Java Enterprise applications program (java), compile (bytes/.class) => AOT into native (once per deploy) => run executable on OS (very often)
  • #26: So let's see what is all happening in this Ahead of Time compiler in order to produce a native image. At first step as input, GraalVM is taking everything that is consumed by the Java application, meaning the libraries, the JDK libraries, also resource like SubstrateVM, and what it does is a Closed World Analysis. Closed World Analysis is an analysis of all reachable methods, fields and classes from the main class of the application. Because when you create this package binary, you don't want to include every JDK class there is, you don't want to include every library class there is. You want to package only what is used by your application, so Graal does a point-to analysis of what is reachable from the entry point of the application. Graal runs some of the static initializers and creates heap snapshots. Then, we put everything together in a single binary. We put all the code AOT compiled code into the machine code section, and we write down a snapshot of the Java application as it was when initialized into the image heap section. This allows us to pre-initialize certain values or configuration parameters of the application, and we don't need to load them again when we start this binary. This binary has a GC inside, so it still has some run-time system but it does no longer contain interpreter nor JIT compiler. AOT has a less advanced GC comparing it with JIT GC and no profiling data is collected for further improvement like in JIT Startup time is probably the area where the Ahead of Time compilation is beating the JIT compilation by the largest margin
  • #27: mature stable, reliable, hardened runs anywhere leverage modern hardware envy of the world of other programming languages
  • #29: dream in X program X code or script leverage skills existing code X’s libraries and USPs run on enterprise grade runtime VM similar to JVM languages such as Groovy, Scala, Kotlin, Clojure and many more JVM-implementations of other languages
  • #35: GraalVM opens the fence – that grass becomes part of your lawn
  • #41: https://www.npmjs.com/package/validator
  • #42: https://www.npmjs.com/package/validator
  • #43: https://www.npmjs.com/package/validator
  • #44: https://www.npmjs.com/package/validator
  • #45: https://www.npmjs.com/package/validator
  • #46: https://www.npmjs.com/package/validator https://www.graalvm.org/docs/reference-manual/compatibility/#validator
  • #47: https://www.npmjs.com/package/validator https://www.graalvm.org/docs/reference-manual/compatibility/#validator
  • #48: https://www.npmjs.com/package/validator https://www.graalvm.org/docs/reference-manual/compatibility/#validator
  • #49: https://www.npmjs.com/package/validator
  • #54: https://www.beyondjava.net/what-about-graalvm
  • #55: https://www.graalvm.org/docs/reference-manual/tools
  • #56: Spaghetti… Hotspot C2 compiler for runtime optimizations had gotten very complicated and very hard to maintain. It does not support optimization for modern code patterns. The C++ code had gotten out of hand
  • #57: https://blogs.oracle.com/graalvm/accelerating-oci-applications-with-graalvm-enterprise  For OCI user workloads, GraalVM Enterprise can be used in the following deployment scenarios: Bare Metal and Virtual Machines (OCI Compute) Containers (Oracle Container Engine for Kubernetes) Functions (Oracle Functions)
  • #58: https://visualvm.github.io/graal.html https://github.com/oracle/graal/tree/master/vscode/graalvm https://www.graalvm.org/docs/reference-manual/tools/#visual-studio-code-extensions-for-graalvm https://www.graalvm.org/docs/reference-manual/tools/