Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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.

Oleg Šelajev

February 22, 2018
Tweet

More Decks by Oleg Šelajev

Other Decks in Programming

Transcript

  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

    View Slide

  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

    View Slide

  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

    View Slide

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

    View Slide

  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.

    View Slide

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

    View Slide

  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.

    View Slide

  8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 8
    http://chrisseaton.com/rubytruffle/pldi17-truffle/pldi17-truffle.pdf

    View Slide

  9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 9
    Java HotSpot VM
    Graal Compiler

    View Slide

  10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 10
    Java HotSpot VM
    Graal Compiler
    Truffle Framework
    Sulong (LLVM)

    View Slide

  11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 11
    Fast Java & Polyglot

    View Slide

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

    View Slide

  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.

    View Slide

  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

    View Slide

  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!

    View Slide

  16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 16
    Low Footprint & Fast Startup

    View Slide

  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

    View Slide

  18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 18
    Some already run some parts of Graal in production

    View Slide

  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:
    [email protected]
    [email protected]
    • Graal embedded in Oracle RDBMS
    – oracle.com/technetwork/database/multilingual-engine
    19

    View Slide

  20. View Slide