SlideShare a Scribd company logo
1 of 76
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
S A L E N D A
S O F T WA R E D E V E L O P M E N T
Turnkey
development
Atlassian
Solution
Partner
Consulting and
support in
software
architecture and
analysis
Application
integration
Evolutionary support
of our own
developments or
inherited ones
@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
G R A A LV M FA C T O R I A L
@alberto_deavila
Groovy Class
G R A A LV M FA C T O R I A L
@alberto_deavila
Groovy Script
G R A A LV M FA C T O R I A L
@alberto_deavila
Trying to generate an image you'll get:
✴ You need some config:
G R A A LV M FA C T O R I A L
@alberto_deavila
Groovy
reflection.json
compiler.groovy
✴ Then you can compile code:

✴ And generate the image
G R A A LV M FA C T O R I A L
@alberto_deavila
Groovy
✴ Compile code

✴ Generate image
G R A A LV M FA C T O R I A L
@alberto_deavila
Kotlin
@alberto_deavila
Micronaut
✴ Generate native images from Micronaut app
✴ Java and Kotlin supported, Groovy partially
✴ Includes scripts or Dockerfile to generate it
✴ Generate automatically reflect.json
G R A A LV M + M I C R O N A U T
@alberto_deavila
✴ Create a Micronaut app
✴ Create a controller:
G R A A LV M M I C R O N A U T
@alberto_deavila
Kotlin
✴ Generate the image:
G R A A LV M M I C R O N A U T
@alberto_deavila
Kotlin
✴ Use it:
Limitations
✴ Evaluate static code at compile time
✴ No dynamic code
✴ Some strange exceptions appears
✴ Take long time to generate executable
✴ Only for Mac/Linux & 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
G R O O V Y L I M I TAT I O N S
@alberto_deavila Source: https://e.printstacktrace.blog/graalvm-and-groovy-how-to-start/
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
Thank you!
@alberto_deavila
Feedback:
https://greach.contestia.es

More Related Content

What's hot

Jumping in Jakarta Open Source Project Everything nobody tells you
Jumping in Jakarta Open Source Project  Everything nobody tells youJumping in Jakarta Open Source Project  Everything nobody tells you
Jumping in Jakarta Open Source Project Everything nobody tells youRoan Brasil Monteiro
 
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 projectsParadigma Digital
 
Git with t for teams
Git with t for teamsGit with t for teams
Git with t for teamsSven Peters
 
React native first impression
React native first impressionReact native first impression
React native first impressionAlvaro Viebrantz
 
Moderne Android Builds mit Gradle
Moderne Android Builds mit GradleModerne Android Builds mit Gradle
Moderne Android Builds mit Gradleinovex GmbH
 
Building Command Line Tools with Golang
Building Command Line Tools with GolangBuilding Command Line Tools with Golang
Building Command Line Tools with GolangTakaaki Mizuno
 
Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Codemotion
 
Developing Apps With React Native
Developing Apps With React NativeDeveloping Apps With React Native
Developing Apps With React NativeAlvaro Viebrantz
 
Improving your code design using Java
Improving your code design using JavaImproving your code design using Java
Improving your code design using JavaRoan Brasil Monteiro
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangEvan Lin
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through gitMohd Farid
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)Evan Lin
 
Building a Portable Testing Rig with GoConvey and Docker
Building a Portable Testing Rig with GoConvey and DockerBuilding a Portable Testing Rig with GoConvey and Docker
Building a Portable Testing Rig with GoConvey and DockerAlison Rowland
 
XP Days Ukraine 2013 - Architecting for Continuous Delivery
XP Days Ukraine 2013 - Architecting for Continuous DeliveryXP Days Ukraine 2013 - Architecting for Continuous Delivery
XP Days Ukraine 2013 - Architecting for Continuous DeliveryAxel Fontaine
 
Git workflow step by step
Git workflow step by stepGit workflow step by step
Git workflow step by stepBinh Quan Duc
 
Integrating react in django while staying sane and happy
Integrating react in django while staying sane and happyIntegrating react in django while staying sane and happy
Integrating react in django while staying sane and happyFröjd Interactive
 

What's hot (20)

Jumping in Jakarta Open Source Project Everything nobody tells you
Jumping in Jakarta Open Source Project  Everything nobody tells youJumping in Jakarta Open Source Project  Everything nobody tells you
Jumping in Jakarta Open Source Project Everything nobody tells you
 
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
 
Git with t for teams
Git with t for teamsGit with t for teams
Git with t for teams
 
React native first impression
React native first impressionReact native first impression
React native first impression
 
Moderne Android Builds mit Gradle
Moderne Android Builds mit GradleModerne Android Builds mit Gradle
Moderne Android Builds mit Gradle
 
Building Command Line Tools with Golang
Building Command Line Tools with GolangBuilding Command Line Tools with Golang
Building Command Line Tools with Golang
 
Project52
Project52Project52
Project52
 
Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017
 
Developing Apps With React Native
Developing Apps With React NativeDeveloping Apps With React Native
Developing Apps With React Native
 
Improving your code design using Java
Improving your code design using JavaImproving your code design using Java
Improving your code design using Java
 
Your First Slack Ruby Bot
Your First Slack Ruby BotYour First Slack Ruby Bot
Your First Slack Ruby Bot
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through git
 
Golang online course
Golang online courseGolang online course
Golang online course
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
 
Building a Portable Testing Rig with GoConvey and Docker
Building a Portable Testing Rig with GoConvey and DockerBuilding a Portable Testing Rig with GoConvey and Docker
Building a Portable Testing Rig with GoConvey and Docker
 
XP Days Ukraine 2013 - Architecting for Continuous Delivery
XP Days Ukraine 2013 - Architecting for Continuous DeliveryXP Days Ukraine 2013 - Architecting for Continuous Delivery
XP Days Ukraine 2013 - Architecting for Continuous Delivery
 
Git workflow step by step
Git workflow step by stepGit workflow step by step
Git workflow step by step
 
All you need is front
All you need is frontAll you need is front
All you need is front
 
Integrating react in django while staying sane and happy
Integrating react in django while staying sane and happyIntegrating react in django while staying sane and happy
Integrating react in django while staying sane and happy
 

Similar to Graalvm with Groovy and Kotlin - Greach 2019

Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentationMack Hardy
 
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, againKiwamu Okabe
 
JavaScript All The Things
JavaScript All The ThingsJavaScript All The Things
JavaScript All The ThingsJordan Yaker
 
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 '18Alberto De Ávila Hernández
 
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' 18Alberto Barón Cuevas
 
Grails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleyGrails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleySven Haiges
 
Gear up for Continuous Integration with Salesforce DX, Circle CI and Clayton
Gear up for Continuous Integration with Salesforce DX, Circle CI and ClaytonGear up for Continuous Integration with Salesforce DX, Circle CI and Clayton
Gear up for Continuous Integration with Salesforce DX, Circle CI and ClaytonDaniel Stange
 
GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0Tobias Meixner
 
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...Alberto De Ávila Hernández
 
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-1808Cisco DevNet
 
(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.aviSeongJae Park
 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciAtlassian
 
Gopenflow demo v1 (english)
Gopenflow demo v1 (english)Gopenflow demo v1 (english)
Gopenflow demo v1 (english)Hiroaki Kawai
 
Cross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitWittawas Wisarnkanchana
 
No more conflicts - Jamstack that works for developers & business users with ...
No more conflicts - Jamstack that works for developers & business users with ...No more conflicts - Jamstack that works for developers & business users with ...
No more conflicts - Jamstack that works for developers & business users with ...Arisa Fukuzaki
 
Let’s be productive with spring boot
Let’s be productive with spring bootLet’s be productive with spring boot
Let’s be productive with spring bootJUGBD
 
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 projectsFátima Casaú Pérez
 
Monitoring at a SAAS Startup: Tradeoffs and Tools
Monitoring at a SAAS Startup: Tradeoffs and ToolsMonitoring at a SAAS Startup: Tradeoffs and Tools
Monitoring at a SAAS Startup: Tradeoffs and Toolsbridgetkromhout
 

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

Graalvm with Groovy and Kotlin - Madrid GUG 2019
Graalvm with Groovy and Kotlin - Madrid GUG 2019Graalvm with Groovy and Kotlin - Madrid GUG 2019
Graalvm with Groovy and Kotlin - Madrid GUG 2019
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
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
 
JavaScript All The Things
JavaScript All The ThingsJavaScript All The Things
JavaScript All The Things
 
Intro. to Git and Github
Intro. to Git and GithubIntro. to Git and Github
Intro. to Git and Github
 
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
 
Gear up for Continuous Integration with Salesforce DX, Circle CI and Clayton
Gear up for Continuous Integration with Salesforce DX, Circle CI and ClaytonGear up for Continuous Integration with Salesforce DX, Circle CI and Clayton
Gear up for Continuous Integration with Salesforce DX, Circle CI and Clayton
 
GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0
 
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...
 
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
 
(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
 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola Paolucci
 
Gopenflow demo v1 (english)
Gopenflow demo v1 (english)Gopenflow demo v1 (english)
Gopenflow demo v1 (english)
 
Cross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkit
 
No more conflicts - Jamstack that works for developers & business users with ...
No more conflicts - Jamstack that works for developers & business users with ...No more conflicts - Jamstack that works for developers & business users with ...
No more conflicts - Jamstack that works for developers & business users with ...
 
Let’s be productive with spring boot
Let’s be productive with spring bootLet’s be productive with spring boot
Let’s be productive with spring boot
 
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
 
Monitoring at a SAAS Startup: Tradeoffs and Tools
Monitoring at a SAAS Startup: Tradeoffs and ToolsMonitoring at a SAAS Startup: Tradeoffs and Tools
Monitoring at a SAAS Startup: Tradeoffs and Tools
 

Recently uploaded

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

Graalvm with Groovy and Kotlin - Greach 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
  • 3. S A L E N D A
  • 4. S O F T WA R E D E V E L O P M E N T Turnkey development Atlassian Solution Partner Consulting and support in software architecture and analysis Application integration Evolutionary support of our own developments or inherited ones @alberto_deavila
  • 7. G O A L S ✴ Increase our JVM performance ✴ Future of JVM ✴ Programming languagues interoperability ✴ System independence ✴ Serverless @alberto_deavila
  • 8. ✴ GraalVM & features ✴ Show me more code ✴ Limits using GraalVM ✴ Future S U M M A RY @alberto_deavila
  • 11. G R A A L @alberto_deavila A dynamic just-in-time compiler that improves efficiency and speed
  • 12. G R A A L @alberto_deavila A (JIT) compiler for Java transforms bytecode to machine code
  • 13. G R A A L @alberto_deavila Source: https://www.dynatrace.com/news/blog/new-ways-introducing-compiled-code-java-9/
  • 14. 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
  • 16. G R A A LV M @alberto_deavila Ecosystem and shared runtime offering performance advantages to multiples languages
  • 17. G R A A LV M @alberto_deavila Source: https://www.graalvm.org/docs/
  • 18. 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
  • 19. ✴ 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
  • 21. ✴ Community edition: free to use ✴ Enterprise edition: Oracle support G R A A L L I C E N S E @alberto_deavila
  • 23. ✴ 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
  • 27. ✴ 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
  • 28. 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
  • 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 JS RubyPython Source: https://www.graalvm.org/docs/reference-manual/polyglot/
  • 31. 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/
  • 32. 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
  • 33. ✴ 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
  • 35. ✴ 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
  • 36. 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
  • 38. ✴ 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
  • 39. ✴ 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
  • 40. 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
  • 42. ✴ 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
  • 43. 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
  • 44. 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
  • 46. ✴ 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
  • 47. 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
  • 48. 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
  • 49. Show me more code
  • 51. ✴ Download manually ✴ Use SDKman ✴ Docker G R A A LV M S E T U P @alberto_deavila
  • 53. ✴ 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
  • 55. G R A A LV M FA C T O R I A L @alberto_deavila Groovy Class
  • 56. G R A A LV M FA C T O R I A L @alberto_deavila Groovy Script
  • 57. G R A A LV M FA C T O R I A L @alberto_deavila Trying to generate an image you'll get:
  • 58. ✴ You need some config: G R A A LV M FA C T O R I A L @alberto_deavila Groovy reflection.json compiler.groovy
  • 59. ✴ Then you can compile code:
 ✴ And generate the image G R A A LV M FA C T O R I A L @alberto_deavila Groovy
  • 60. ✴ Compile code
 ✴ Generate image G R A A LV M FA C T O R I A L @alberto_deavila Kotlin
  • 62. ✴ Generate native images from Micronaut app ✴ Java and Kotlin supported, Groovy partially ✴ Includes scripts or Dockerfile to generate it ✴ Generate automatically reflect.json G R A A LV M + M I C R O N A U T @alberto_deavila
  • 63. ✴ Create a Micronaut app ✴ Create a controller: G R A A LV M M I C R O N A U T @alberto_deavila Kotlin
  • 64. ✴ Generate the image: G R A A LV M M I C R O N A U T @alberto_deavila Kotlin ✴ Use it:
  • 66. ✴ Evaluate static code at compile time ✴ No dynamic code ✴ Some strange exceptions appears ✴ Take long time to generate executable ✴ Only for Mac/Linux & 64 bits L I M I TAT I O N S @alberto_deavila
  • 68. 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
  • 70. ✴ 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
  • 71. G R O O V Y L I M I TAT I O N S @alberto_deavila Source: https://e.printstacktrace.blog/graalvm-and-groovy-how-to-start/
  • 72. L I M I TAT I O N S @alberto_deavila Source: https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md
  • 74. 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 ✴ ...
  • 75. 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