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
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
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
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