Slide 1

Slide 1 text

GraalVM An Introduction

Slide 2

Slide 2 text

Disclaimer Presentations are intended for educational purposes only and not to replace independent professional judgement. The views and opinions expressed in this prsentation do not necessarily reflect the official policy or position of blibli.com. Audience discretion is advised.

Slide 3

Slide 3 text

What is a VM? an efficient, isolated duplicate of the real machine Popek, Gerald J.; Goldberg, Robert P. (1974). "Formal requirements for virtualizable third generation architectures" “ “”

Slide 4

Slide 4 text

Java Virtual Machine Class Loader Runtime Data Area Execution Engine JNI Native Mehtod Library Java Scala Kotlin Clojure Loads, links, initialize *.class at runtime Store bytecode, runtime data, native stacks Executes bytecode Interaction with native libs

Slide 5

Slide 5 text

GraalVM GraalVM Tuffle JVM Languages (java, kotlin, etc) JS Ruby R LLVM bc JVM Node.JS OracleDB Native Program

Slide 6

Slide 6 text

GraalVM: Performance GraalVM Tuffle JVM Languages (java, kotlin, etc) JS Ruby R LLVM bc JVM Node.JS OracleDB Native Program

Slide 7

Slide 7 text

GraalVM: Performance • Better JIT • Fast startup • Lower footprint • AOT Compiler

Slide 8

Slide 8 text

GraalVM Performance: Demo

Slide 9

Slide 9 text

GraalVM: Polyglot GraalVM Tuffle JVM Languages (java, kotlin, etc) JS Ruby R LLVM bc JVM Node.JS OracleDB Native Program

Slide 10

Slide 10 text

GraalVM: Polyglot • Pass values between languages • Executes code from other language(s) • No copying or marshalling

Slide 11

Slide 11 text

GraalVM Polyglot: How? • Interoperability protocol • Communicates via set of agreed data types and structure • Details: https://chrisseaton.com/rubytruffle/dls15-interop/dls15- interop.pdf

Slide 12

Slide 12 text

Polyglot: Demo

Slide 13

Slide 13 text

GraalVM: Cross Language Tool GraalVM Tuffle JVM Languages (java, kotlin, etc) JS Ruby R LLVM bc JVM Node.JS OracleDB Native Program

Slide 14

Slide 14 text

Cross Lang Tools: Demo

Slide 15

Slide 15 text

Code at: https://github.com/bertzzie/graalvm-example Slides at: https://speakerdeck.com/bertzzie/introduction-to-graalvm QA and Closing