Graal VM: High-Performance Polyglot Runtime [DevNexus`18]

Graal VM: High-Performance Polyglot Runtime [DevNexus`18]

We present how the Graal project enhances the Java ecosystem with an integrated, polyglot, high-performance execution environment for dynamic, static, and native languages. Graal supports Java, Scala, Kotlin, Groovy, and other JVM-based languages. At the same time, it can run the dynamic scripting languages JavaScript including node.js, Ruby, R, and Python. Furthermore, it integrates C, C++, and other LLVM-based native languages into the same runtime environment. Graal can either run embedded in the Java HotSpot VM or as a standalone alternative with low footprint and fast startup for embedded or serverless computing environments. This talk covers the architecture of Graal and gives live demonstrations of its unique capabilities.

5d01eb7205b787b5991db85a11ee5e68?s=128

Oleg Šelajev

February 22, 2018
Tweet

Transcript

  1. 1.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | Graal VM:
 High-Performance Polyglot Runtime Oleg Šelajev Lead Developer Advocate, Graal team, Oracle Labs @shelajev DevNexus 2018
  2. 2.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | Safe Harbor Statement The following is intended to provide some insight into a line of research in Oracle Labs. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described in connection with any Oracle product or service remains at the sole discretion of Oracle. Any views expressed in this presentation are my own and do not necessarily reflect the views of Oracle. 2
  3. 3.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 3 The World Is Polyglot! Programming Language Popularity (TOP 20 Languages From May 2017 Tiobe INDEX) Others Scratch PL/SQL Delphi/Object Pascal MATLAB Go ObjecTve-C R SwiW VB Ruby Perl PHP Assembly language JavaScript VB.NET C# Python C++ C Java
  4. 5.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 5 Only languages with high industry attention achieve high performance. Languages require different tools for configuring, debugging, profiling… Languages execute in their own boxes with costly serialization between.
  5. 7.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 7 High performance for all languages Language-level virtualization layer for shared tooling Zero overhead interoperability between languages Only languages with high industry attention achieve high performance. Languages require different tools for configuring, debugging, profiling… Languages execute in their own boxes with costly serialization between.
  6. 8.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 8 http://chrisseaton.com/rubytruffle/pldi17-truffle/pldi17-truffle.pdf
  7. 10.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 10 Java HotSpot VM Graal Compiler Truffle Framework Sulong (LLVM)
  8. 13.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 13 High performance, polyglot, language-level virtualization layer… embeddable across the stack in native and JVM-based applications.
  9. 14.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 14 Substrate VM • Full AOT compilation to machine code • Works with memory management • Secure execution (e.g., bounds checks) • Embeddable with native applications
  10. 15.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 15 Graal VM is a hybrid of static & dynamic runtimes • Precompile core parts of application, but still allow extensibility!
  11. 17.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 17 Graal Embeddings * * Java JavaScript Ruby R Python C/C++. FORTRAN, … HotSpot JVM MySQL Oracle RDBMS Spark nginx … Optimizations Tooling Interoperability Your Code
  12. 18.

    Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

    | 18 Some already run some parts of Graal in production
  13. 19.

    Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

    | Resources on Graal • OTN product page including download: – oracle.com/technetwork/oracle-labs/program-languages • Graal projects on github: – github.com/graalvm • Mailing lists: – graalvm-dev@oss.oracle.com – graalvm-users@oss.oracle.com • Graal embedded in Oracle RDBMS – oracle.com/technetwork/database/multilingual-engine 19
  14. 20.