SlideShare a Scribd company logo
1 of 65
Download to read offline
Salenda
GraalVM

with Groovy & Kotlin
Alberto De Ávila Hernández
A B O U T M E
✴ Team Lead at Salenda
✴ Groovy & Grails dev
✴ Atlassian certified
@alberto_deavila
DISCLAIMER
Goals
G O A L S
✴ Increase our JVM performance
✴ Future of JVM
✴ Programming languagues interoperability
✴ System independence
✴ Serverless
@alberto_deavila
✴ GraalVM & features
✴ Show me more code
✴ Limits using GraalVM
✴ Future
S U M M A RY
@alberto_deavila
GraalVM
@alberto_deavila
first... what is Graal?
G R A A L
@alberto_deavila
A dynamic just-in-time compiler that
improves efficiency and speed
G R A A L
@alberto_deavila
A (JIT) compiler for Java transforms
bytecode to machine code
G R A A L
@alberto_deavila Source: https://www.dynatrace.com/news/blog/new-ways-introducing-compiled-code-java-9/
G R A A LV M A R Q U I T E C T U R E
@alberto_deavila Source: https://res.infoq.com/presentations/polyglot-jvm-graal/en/slides/sl13.jpg
@alberto_deavila
then... what is GraalVM?
G R A A LV M
@alberto_deavila
Ecosystem and shared runtime offering
performance advantages to multiples
languages
G R A A LV M
@alberto_deavila Source: https://www.graalvm.org/docs/
S U P P O R T E D L A N G U A G E S
@alberto_deavila
✴ Native support: 



✴ Support with installations: Ruby, Python, R
✴ JVM languages: Groovy, Kotlin, Java...
✴ LLVM: C, C++
✴ Javascript
✴ Graal: the JIT compiler
✴ Graal Polyglot APIs: API to combine
programming languages
✴ Graal SDK: embedding Graal and configure
native images
✴ Oracle HotSpot JVM
G R A A LV M
@alberto_deavila
@alberto_deavila
License
✴ Community edition: free to use
✴ Enterprise edition: Oracle support
G R A A L L I C E N S E
@alberto_deavila
@alberto_deavila
Features
✴ Interoperate with other languages
✴ Includes consoles for JS, R...
✴ Create compiled native images
✴ Run code faster & efficiently
✴ Tools to monitor, debug, and profile code
G R A A LV M F E AT U R E S
@alberto_deavila
@alberto_deavila
Interoperability
@alberto_deavila
How can we achieve that?
@alberto_deavila
Truffle
✴ Framework
✴ Allow to create languages interpreters
✴ Based on annotations
✴ Contains common things across any
language
G R A A LV M T R U F F L E
@alberto_deavila
G R A A LV M T R U F F L E
@alberto_deavila Source: https://res.infoq.com/presentations/polyglot-jvm-graal/en/slides/sl13.jpg
G R A A LV M I N T E R O P E R A B I L I T Y
@alberto_deavila
JS RubyPython
Source: https://www.graalvm.org/docs/reference-manual/polyglot/
G R A A LV M I N T E R O P E R A B I L I T Y
@alberto_deavila
JS RubyPython
Source: https://www.graalvm.org/docs/reference-manual/polyglot/
G R A A LV M I N T E R O P E R A B I L I T Y
@alberto_deavila
JS RubyPython
Source: https://www.graalvm.org/docs/reference-manual/polyglot/
G R A A LV M I N T E R O P E R A B I L I T Y
@alberto_deavila
Node with R
Source: https://docs.google.com/presentation/d/1cBuq4rjaNTOMJOOeGvqnI2TJjWH2VBId7NtVVhXWJkY/edit#slide=id.g495524223b_0_179
✴ Use the appropiate languague for any task
✴ Use libraries from differents languagues
✴ Create apps combining languages
✴ One environment for all requirements
G R A A LV M I N T E R O P E R A B I L I T Y
@alberto_deavila
@alberto_deavila
Native images
✴ Self-contained executable
✴ Fast startup
✴ Low memory consumption
✴ Can generate binary library
✴ Useful for lambdas, containers or command
line
G R A A LV M N AT I V E I M A G E S
@alberto_deavila
G R A A LV M N AT I V E I M A G E S
@alberto_deavila
GraalVM can generate native images BUT
not yet cross platform
Source: https://github.com/oracle/graal/issues/407
@alberto_deavila
Ahead-of-time compilation
✴ Analyze statically all code
✴ Compile reachable code
✴ Generates native code
✴ Package it with SubstrateVM
G R A A LV M A O T C
@alberto_deavila
✴ Framework subset of JVM
✴ No JIT
✴ No optimization
✴ No Graal neither any related with bytecode
✴ Just runtime: GC, threads, I/O, ...
G R A A LV M S U B S T R AT E V M
@alberto_deavila
G R A A LV M N AT I V E I M A G E S
@alberto_deavila Source: https://twitter.com/cstancu/status/1103413247305166849
@alberto_deavila
Performance
✴ Depends on code optimizations
✴ Native images startup time is very fast
✴ Each languague has different perfomance
G R A A LV M P E R F O R M A N C E
@alberto_deavila
G R A A LV M P E R F O R M A N C E
@alberto_deavila Source: https://lafo.ssw.uni-linz.ac.at/pub/papers/2016_PLDI_Truffle.pdf
G R A A LV M P E R F O R M A N C E
@alberto_deavila Source: https://2017.jokerconf.com/en/2017/talks/3qdblcadmqy0me2uuieqaq/
Twitter performance using Graal
@alberto_deavila
Tools
✴ Use one debugger for all languages, like
chrome-dev-tools
✴ VisualVM to show stats about other
languages
G R A A LV M T O O L S
@alberto_deavila
G R A A LV M T O O L S
@alberto_deavila Source: https://github.com/chrisseaton/graalvm-ten-things#5-tools-that-work-across-all-languages
G R A A LV M T O O L S
@alberto_deavila Source: https://github.com/chrisseaton/graalvm-ten-things#5-tools-that-work-across-all-languages
Show me more code
@alberto_deavila
Setup
✴ Download manually
✴ Use SDKman
✴ Docker
G R A A LV M S E T U P
@alberto_deavila
@alberto_deavila
SDKMAN!
✴ Install SDKMAN!
✴ Download GraalVM
G R A A LV M S E T U P W I T H S D K M A N !
@alberto_deavila
@alberto_deavila
Factorial
Limitations
✴ Evaluate static code at compile time
✴ No dynamic code
✴ Some strange exceptions appears
✴ Take long time to generate executable
✴ Only for Mac/Linux/Win 64 bits
L I M I TAT I O N S
@alberto_deavila
@alberto_deavila
Kotlin
K O T L I N L I M I TAT I O N S
@alberto_deavila Source: https://github.com/oracle/graal/issues/366#issuecomment-383547970
✴ Almost all features work
✴ Some bugs / features to work, like:
✴ Does not support compilation of non-
reducible loops
@alberto_deavila
Groovy
✴ Sometimes requires lot of changes / rewrite
✴ No metaprogramming
✴ Closures requires manual config
✴ Grape doesn't work on standalone native
images
G R O O V Y L I M I TAT I O N S
@alberto_deavila
L I M I TAT I O N S
@alberto_deavila Source: https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md
Future
F U T U R E
@alberto_deavila
✴ More languages and tools will be available
✴ Apps with many languages working
✴ A native image compatible with all OS
✴ Better perfomance
✴ ...
M O R E I N F O
@alberto_deavila
✴ Offial Doc
✴ List of resources for Graal and related topics
✴ Videos and presentations
✴ Top 10 things to do with GraalVM
✴ Kotlin performance with GraalVM
We are hiring Groovy Devs!
Email me at:
aavila@adaptavist.com
Thank you!

More Related Content

What's hot

WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?
Weaveworks
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Weaveworks
 
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFestManageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Jarek Potiuk
 
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
Daniel Oh
 

What's hot (20)

Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
 
WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?
 
Groovy in the Cloud
Groovy in the CloudGroovy in the Cloud
Groovy in the Cloud
 
はじめての JFrog Artifactory
はじめての JFrog Artifactoryはじめての JFrog Artifactory
はじめての JFrog Artifactory
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipeline
 
Future of Grails
Future of GrailsFuture of Grails
Future of Grails
 
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFestManageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
 
Gradle how to's
Gradle how to'sGradle how to's
Gradle how to's
 
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
 
Up GitLab Presentation 2015
Up GitLab Presentation 2015Up GitLab Presentation 2015
Up GitLab Presentation 2015
 
Writing Commits for You, Your Friends, and Your Future Self
Writing Commits for You, Your Friends, and Your Future SelfWriting Commits for You, Your Friends, and Your Future Self
Writing Commits for You, Your Friends, and Your Future Self
 
Gerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerGerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and Docker
 
Golang Microservices meetup
Golang Microservices meetupGolang Microservices meetup
Golang Microservices meetup
 
OCTO On-Site Off-Site Update on D8 Roadmap
OCTO On-Site Off-Site Update on D8 RoadmapOCTO On-Site Off-Site Update on D8 Roadmap
OCTO On-Site Off-Site Update on D8 Roadmap
 
GitLab as an Alternative Development Platform for Github.com
GitLab as an Alternative Development Platform for Github.comGitLab as an Alternative Development Platform for Github.com
GitLab as an Alternative Development Platform for Github.com
 
GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)
 
Terraform GitOps on Codefresh
Terraform GitOps on CodefreshTerraform GitOps on Codefresh
Terraform GitOps on Codefresh
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 

Similar to Graalvm with Groovy and Kotlin - Madrid GUG 2019

Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web Apps
James Williams
 
Gopenflow demo v1 (english)
Gopenflow demo v1 (english)Gopenflow demo v1 (english)
Gopenflow demo v1 (english)
Hiroaki Kawai
 

Similar to Graalvm with Groovy and Kotlin - Madrid GUG 2019 (20)

Graalvm with Groovy and Kotlin - Greach 2019
Graalvm with Groovy and Kotlin - Greach 2019Graalvm with Groovy and Kotlin - Greach 2019
Graalvm with Groovy and Kotlin - Greach 2019
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
Intro. to Git and Github
Intro. to Git and GithubIntro. to Git and Github
Intro. to Git and Github
 
Emacs verilog-mode is coming to Debian, again
Emacs verilog-mode is coming to Debian, againEmacs verilog-mode is coming to Debian, again
Emacs verilog-mode is coming to Debian, again
 
Nitro for your Grails App: How to improve performance!! Greach' 18
Nitro for your Grails App: How to improve performance!!  Greach' 18Nitro for your Grails App: How to improve performance!!  Greach' 18
Nitro for your Grails App: How to improve performance!! Greach' 18
 
Nitro for your Grails App: how to improve performance. Greach '18
Nitro for your Grails App: how to improve performance. Greach '18Nitro for your Grails App: how to improve performance. Greach '18
Nitro for your Grails App: how to improve performance. Greach '18
 
Grails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleyGrails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon Valley
 
Technical Product Owner or How to build technical backing for services
Technical Product Owner or How to build technical backing for servicesTechnical Product Owner or How to build technical backing for services
Technical Product Owner or How to build technical backing for services
 
Velocity London - Chaos Engineering Bootcamp
Velocity London - Chaos Engineering Bootcamp Velocity London - Chaos Engineering Bootcamp
Velocity London - Chaos Engineering Bootcamp
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
 
Testing Grails 3, the goob (unit), the bad (integration) and the ugly (functi...
Testing Grails 3, the goob (unit), the bad (integration) and the ugly (functi...Testing Grails 3, the goob (unit), the bad (integration) and the ugly (functi...
Testing Grails 3, the goob (unit), the bad (integration) and the ugly (functi...
 
Feedback en continu grâce au TDD et au AsCode
Feedback en continu grâce au TDD et au AsCodeFeedback en continu grâce au TDD et au AsCode
Feedback en continu grâce au TDD et au AsCode
 
zebra & openconfigd Introduction
zebra & openconfigd Introductionzebra & openconfigd Introduction
zebra & openconfigd Introduction
 
Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web Apps
 
Use Groovy&Grails in your spring boot projects
Use Groovy&Grails in your spring boot projectsUse Groovy&Grails in your spring boot projects
Use Groovy&Grails in your spring boot projects
 
Gopenflow demo v1 (english)
Gopenflow demo v1 (english)Gopenflow demo v1 (english)
Gopenflow demo v1 (english)
 
Use groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projectsUse groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projects
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for Docker
 
(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi
 
Isolating GPU Access in its Own Process
Isolating GPU Access in its Own ProcessIsolating GPU Access in its Own Process
Isolating GPU Access in its Own Process
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Graalvm with Groovy and Kotlin - Madrid GUG 2019

  • 1. Salenda GraalVM
 with Groovy & Kotlin Alberto De Ávila Hernández
  • 2. A B O U T M E ✴ Team Lead at Salenda ✴ Groovy & Grails dev ✴ Atlassian certified @alberto_deavila
  • 5. G O A L S ✴ Increase our JVM performance ✴ Future of JVM ✴ Programming languagues interoperability ✴ System independence ✴ Serverless @alberto_deavila
  • 6. ✴ GraalVM & features ✴ Show me more code ✴ Limits using GraalVM ✴ Future S U M M A RY @alberto_deavila
  • 9. G R A A L @alberto_deavila A dynamic just-in-time compiler that improves efficiency and speed
  • 10. G R A A L @alberto_deavila A (JIT) compiler for Java transforms bytecode to machine code
  • 11. G R A A L @alberto_deavila Source: https://www.dynatrace.com/news/blog/new-ways-introducing-compiled-code-java-9/
  • 12. G R A A LV M A R Q U I T E C T U R E @alberto_deavila Source: https://res.infoq.com/presentations/polyglot-jvm-graal/en/slides/sl13.jpg
  • 14. G R A A LV M @alberto_deavila Ecosystem and shared runtime offering performance advantages to multiples languages
  • 15. G R A A LV M @alberto_deavila Source: https://www.graalvm.org/docs/
  • 16. S U P P O R T E D L A N G U A G E S @alberto_deavila ✴ Native support: 
 
 ✴ Support with installations: Ruby, Python, R ✴ JVM languages: Groovy, Kotlin, Java... ✴ LLVM: C, C++ ✴ Javascript
  • 17. ✴ Graal: the JIT compiler ✴ Graal Polyglot APIs: API to combine programming languages ✴ Graal SDK: embedding Graal and configure native images ✴ Oracle HotSpot JVM G R A A LV M @alberto_deavila
  • 19. ✴ Community edition: free to use ✴ Enterprise edition: Oracle support G R A A L L I C E N S E @alberto_deavila
  • 21. ✴ Interoperate with other languages ✴ Includes consoles for JS, R... ✴ Create compiled native images ✴ Run code faster & efficiently ✴ Tools to monitor, debug, and profile code G R A A LV M F E AT U R E S @alberto_deavila
  • 25. ✴ Framework ✴ Allow to create languages interpreters ✴ Based on annotations ✴ Contains common things across any language G R A A LV M T R U F F L E @alberto_deavila
  • 26. G R A A LV M T R U F F L E @alberto_deavila Source: https://res.infoq.com/presentations/polyglot-jvm-graal/en/slides/sl13.jpg
  • 27. G R A A LV M I N T E R O P E R A B I L I T Y @alberto_deavila JS RubyPython Source: https://www.graalvm.org/docs/reference-manual/polyglot/
  • 28. G R A A LV M I N T E R O P E R A B I L I T Y @alberto_deavila JS RubyPython Source: https://www.graalvm.org/docs/reference-manual/polyglot/
  • 29. G R A A LV M I N T E R O P E R A B I L I T Y @alberto_deavila JS RubyPython Source: https://www.graalvm.org/docs/reference-manual/polyglot/
  • 30. G R A A LV M I N T E R O P E R A B I L I T Y @alberto_deavila Node with R Source: https://docs.google.com/presentation/d/1cBuq4rjaNTOMJOOeGvqnI2TJjWH2VBId7NtVVhXWJkY/edit#slide=id.g495524223b_0_179
  • 31. ✴ Use the appropiate languague for any task ✴ Use libraries from differents languagues ✴ Create apps combining languages ✴ One environment for all requirements G R A A LV M I N T E R O P E R A B I L I T Y @alberto_deavila
  • 33. ✴ Self-contained executable ✴ Fast startup ✴ Low memory consumption ✴ Can generate binary library ✴ Useful for lambdas, containers or command line G R A A LV M N AT I V E I M A G E S @alberto_deavila
  • 34. G R A A LV M N AT I V E I M A G E S @alberto_deavila GraalVM can generate native images BUT not yet cross platform Source: https://github.com/oracle/graal/issues/407
  • 36. ✴ Analyze statically all code ✴ Compile reachable code ✴ Generates native code ✴ Package it with SubstrateVM G R A A LV M A O T C @alberto_deavila
  • 37. ✴ Framework subset of JVM ✴ No JIT ✴ No optimization ✴ No Graal neither any related with bytecode ✴ Just runtime: GC, threads, I/O, ... G R A A LV M S U B S T R AT E V M @alberto_deavila
  • 38. G R A A LV M N AT I V E I M A G E S @alberto_deavila Source: https://twitter.com/cstancu/status/1103413247305166849
  • 40. ✴ Depends on code optimizations ✴ Native images startup time is very fast ✴ Each languague has different perfomance G R A A LV M P E R F O R M A N C E @alberto_deavila
  • 41. G R A A LV M P E R F O R M A N C E @alberto_deavila Source: https://lafo.ssw.uni-linz.ac.at/pub/papers/2016_PLDI_Truffle.pdf
  • 42. G R A A LV M P E R F O R M A N C E @alberto_deavila Source: https://2017.jokerconf.com/en/2017/talks/3qdblcadmqy0me2uuieqaq/ Twitter performance using Graal
  • 44. ✴ Use one debugger for all languages, like chrome-dev-tools ✴ VisualVM to show stats about other languages G R A A LV M T O O L S @alberto_deavila
  • 45. G R A A LV M T O O L S @alberto_deavila Source: https://github.com/chrisseaton/graalvm-ten-things#5-tools-that-work-across-all-languages
  • 46. G R A A LV M T O O L S @alberto_deavila Source: https://github.com/chrisseaton/graalvm-ten-things#5-tools-that-work-across-all-languages
  • 47. Show me more code
  • 49. ✴ Download manually ✴ Use SDKman ✴ Docker G R A A LV M S E T U P @alberto_deavila
  • 51. ✴ Install SDKMAN! ✴ Download GraalVM G R A A LV M S E T U P W I T H S D K M A N ! @alberto_deavila
  • 54. ✴ Evaluate static code at compile time ✴ No dynamic code ✴ Some strange exceptions appears ✴ Take long time to generate executable ✴ Only for Mac/Linux/Win 64 bits L I M I TAT I O N S @alberto_deavila
  • 56. K O T L I N L I M I TAT I O N S @alberto_deavila Source: https://github.com/oracle/graal/issues/366#issuecomment-383547970 ✴ Almost all features work ✴ Some bugs / features to work, like: ✴ Does not support compilation of non- reducible loops
  • 58. ✴ Sometimes requires lot of changes / rewrite ✴ No metaprogramming ✴ Closures requires manual config ✴ Grape doesn't work on standalone native images G R O O V Y L I M I TAT I O N S @alberto_deavila
  • 59. L I M I TAT I O N S @alberto_deavila Source: https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md
  • 61. F U T U R E @alberto_deavila ✴ More languages and tools will be available ✴ Apps with many languages working ✴ A native image compatible with all OS ✴ Better perfomance ✴ ...
  • 62. M O R E I N F O @alberto_deavila ✴ Offial Doc ✴ List of resources for Graal and related topics ✴ Videos and presentations ✴ Top 10 things to do with GraalVM ✴ Kotlin performance with GraalVM
  • 63.
  • 64. We are hiring Groovy Devs! Email me at: aavila@adaptavist.com