GraalVM can be used as a drop-in replacement for the JDK to run Java programs. It includes the Graal just-in-time compiler which can provide better performance than the default HotSpot compiler. GraalVM also allows ahead-of-time compilation of Java bytecode into native images using SubstrateVM, eliminating the overhead of interpretation and compilation at runtime. These native images have minimal dependencies and fast startup times, making them suitable for containerized microservices and cloud applications.
GraalVM can be used as a drop-in replacement for the JDK to run Java programs. It includes the Graal just-in-time compiler which can provide better performance than the default HotSpot compiler. GraalVM also includes the native-image tool which can compile Java bytecode ahead-of-time to native executables without dependencies, improving startup time significantly. This enables using Java for more dynamic workloads like microservices that require fast startup. Reflection and dynamic proxies require additional configuration for native images. Docker images can also be built from native executables to distribute applications.
GraalVM is a new polyglot virtual machine that allows running JVM languages as well as other languages like JavaScript, Python, and R. It provides several advantages over traditional JVMs including being a drop-in replacement for OpenJDK that can improve performance, the ability to ahead-of-time compile Java programs into native images for faster startup times, seamless interoperability between supported languages, and common debugging and monitoring interfaces. Key features include running as a replacement JVM, including Graal as an alternative JIT compiler in OpenJDK 11, ahead-of-time compilation to native images, support for additional languages via Truffle, and allowing Java programs to be used as native libraries from other languages.
HOW AND WHY GRAALVM IS QUICKLY BECOMING RELEVANT FOR YOULucas Jellema
This document provides an overview of GraalVM, including what it is, its key features, and how it can be used. GraalVM is a polyglot virtual machine that allows running applications written in multiple languages. It includes a just-in-time (JIT) compiler that can speed up Java applications, an ahead-of-time (AOT) compiler to create native binaries, and language interoperability features. The document demonstrates how GraalVM allows Java applications to leverage code and modules written in other languages like JavaScript, and how it enables building polyglot applications that combine languages. It also discusses using GraalVM's AOT compiler to package polyglot applications into standalone executables.
GraalVM is a high-performance runtime for dynamic, static, and native languages. GraalVM 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. In this session we'll talk about the performance boost you can get from running your code on GraalVM, look at the examples of running typical web-applications with it, enhancing them with code in other languages, creating native images for incredibly fast startup and low memory overhead for your services. GraalVM offers you the opportunity to write the code in the language you want, and run the resulting program really fast.
The document discusses integrating a language-agnostic garbage collection toolkit into various programming language runtimes. It describes how the garbage collector components have been decoupled from the J9 JVM and refactored. It also outlines the process for integrating the garbage collector, including implementing a few required glue APIs to provide language-specific information. Examples of integrating the garbage collector into the CSOM (C implementation of Smalltalk) runtime are also provided.
Highly Surmountable Challenges in Ruby+OMR JIT CompilationMatthew Gaudet
The Ruby+OMR JIT compiler adds a JIT to CRuby. However, it has challenges to surmount before it will provide broad improvement to Ruby applications that aren’t micro-benchmarks. This talk will cover some of those challenges, along with some brainstorming about potential ways to tackle them.
The Ruby+OMR JIT compiler is one way to add JIT compilation to the CRuby interpreter. However, it has a number of challenges to surmount before it will provide broad improvement to Ruby applications that aren’t micro-benchmarks. This talk will cover some of those challenges, along with some brainstorming about potential ways to tackle them.
GraalVM can be used as a drop-in replacement for the JDK to run Java programs. It includes the Graal just-in-time compiler which can provide better performance than the default HotSpot compiler. GraalVM also includes the native-image tool which can compile Java bytecode ahead-of-time to native executables without dependencies, improving startup time significantly. This enables using Java for more dynamic workloads like microservices that require fast startup. Reflection and dynamic proxies require additional configuration for native images. Docker images can also be built from native executables to distribute applications.
GraalVM is a new polyglot virtual machine that allows running JVM languages as well as other languages like JavaScript, Python, and R. It provides several advantages over traditional JVMs including being a drop-in replacement for OpenJDK that can improve performance, the ability to ahead-of-time compile Java programs into native images for faster startup times, seamless interoperability between supported languages, and common debugging and monitoring interfaces. Key features include running as a replacement JVM, including Graal as an alternative JIT compiler in OpenJDK 11, ahead-of-time compilation to native images, support for additional languages via Truffle, and allowing Java programs to be used as native libraries from other languages.
HOW AND WHY GRAALVM IS QUICKLY BECOMING RELEVANT FOR YOULucas Jellema
This document provides an overview of GraalVM, including what it is, its key features, and how it can be used. GraalVM is a polyglot virtual machine that allows running applications written in multiple languages. It includes a just-in-time (JIT) compiler that can speed up Java applications, an ahead-of-time (AOT) compiler to create native binaries, and language interoperability features. The document demonstrates how GraalVM allows Java applications to leverage code and modules written in other languages like JavaScript, and how it enables building polyglot applications that combine languages. It also discusses using GraalVM's AOT compiler to package polyglot applications into standalone executables.
GraalVM is a high-performance runtime for dynamic, static, and native languages. GraalVM 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. In this session we'll talk about the performance boost you can get from running your code on GraalVM, look at the examples of running typical web-applications with it, enhancing them with code in other languages, creating native images for incredibly fast startup and low memory overhead for your services. GraalVM offers you the opportunity to write the code in the language you want, and run the resulting program really fast.
The document discusses integrating a language-agnostic garbage collection toolkit into various programming language runtimes. It describes how the garbage collector components have been decoupled from the J9 JVM and refactored. It also outlines the process for integrating the garbage collector, including implementing a few required glue APIs to provide language-specific information. Examples of integrating the garbage collector into the CSOM (C implementation of Smalltalk) runtime are also provided.
Highly Surmountable Challenges in Ruby+OMR JIT CompilationMatthew Gaudet
The Ruby+OMR JIT compiler adds a JIT to CRuby. However, it has challenges to surmount before it will provide broad improvement to Ruby applications that aren’t micro-benchmarks. This talk will cover some of those challenges, along with some brainstorming about potential ways to tackle them.
The Ruby+OMR JIT compiler is one way to add JIT compilation to the CRuby interpreter. However, it has a number of challenges to surmount before it will provide broad improvement to Ruby applications that aren’t micro-benchmarks. This talk will cover some of those challenges, along with some brainstorming about potential ways to tackle them.
Eclipse OMR: a modern toolkit for building language runtimesMark Stoodley
Eclipse OMR is a modern toolkit for building language runtimes that provides high quality runtime ingredients like a porting library, threading library, garbage collection framework, and JIT compiler tools. It has no language semantics of its own and is designed to be integrated into various language runtimes. The presentation demonstrates how OMR has already been used successfully in Ruby, Python, and Smalltalk runtimes and provides performance benefits. It invites others to get involved in the open source project.
This document discusses GraalVM, a universal virtual machine that enables high performance and interoperability between programming languages. It introduces key concepts like JIT compilation, AOT compilation, C2 JIT, Graal JIT, and Substrate VM. It provides examples of using Graal JIT and AOT compilers on a sample Java application and compares the performance. Finally, it summarizes the capabilities and future directions of GraalVM, including running existing applications more efficiently across languages and embedding languages in native applications.
Debugging of CPython processes with gdb
Slides for the PyconPL 2016 talk on how to use gdb for debugging of complex issues that might happen with CPython
Blog post version: http://podoliaka.org/2016/04/10/debugging-cpython-gdb/
Porting and Maintaining your C++ Game on Android without losing your mindBeMyApp
Presentation from David Wingrove & Katie Merrill from Golden Hammer Software http://www.goldenhammersoftware.com/
From the Barcelona Android User Group meetup: http://www.meetup.com/Barcelona-Android-User-Group/events/166734982/
Python is gaining popularity as a scripting language, with its usage share growing from 4.7% to 5% between September 2007 and September 2008. There are multiple implementations of Python including CPython, Jython, and IronPython. Sun is working on tools like NBPython to improve the Python development experience in NetBeans, as well as modifying the JVM through projects like JSR-292 and invokedynamic to better support dynamic languages like Python. Challenges for Python's growth include migration, packaging, performance, concurrency, and marketing.
This document summarizes a presentation about JRuby, an implementation of the Ruby programming language that runs on the Java Virtual Machine. It discusses what JRuby is, how to get started with it, details of its implementation including compilation and threading, and how it addresses various issues with Ruby like performance, memory management, and integration with Java. It also covers some JRuby projects and potential future directions.
The document summarizes key points about migrating from Java to Ruby for application development. It discusses that Java has become too complex with many frameworks and poor performance. Ruby is an emerging language that offers higher productivity through dynamic typing, simpler syntax, and frameworks like Rails. The document recommends starting with a small pilot project in Ruby to demonstrate benefits over Java before undertaking a larger migration. Risks of adopting Ruby include the language and community being less mature than Java.
Migration Spring Boot PetClinic REST to Quarkus 1.2.0Jonathan Vila
In this presentation I will introduce Quarkus and also show which were the steps followed to migrate Spring PetClinic application to Quarkus using the standard libraries : resteasy, microprofile metrics, hibernate, openapi, .... GraalVM
JRuby allows Ruby code to run on the Java Virtual Machine. This provides benefits like improved performance due to Java's highly optimized JVM, ability to take advantage of Java libraries and tools, and ability to truly leverage multiple cores through Java threading. The document discusses using JRuby for Rails applications in an enterprise setting, including packaging applications as WAR files, using database migration tools like Liquibase, and integrating with Java.
The document discusses implementing dynamic programming languages in virtual machines. It argues against directly writing virtual machines in low-level languages like C, which can limit flexibility, maintainability and performance. Instead, it advocates writing interpreters in high-level languages and using meta-programming techniques to automatically generate virtual machines from these interpreters through translation. This approach aims to achieve flexibility, simplicity and performance together for language implementations.
This document discusses using Golang for building command line tools. It begins with introductions and background on the speaker and their company Innovatube. Golang is described as being used for non-HTML heavy web development, API servers, and mobile app backends. Common use cases for Golang include web services, mobile apps, game backends, daemons/services, and command line tools. Several popular command line tools built with Golang are listed, and libraries for building CLI tools in Golang are provided. The document demonstrates using the gcli library to generate a skeleton for a Golang CLI tool. It concludes with some tips for coloring text and building dashboards in Golang CLI tools.
PyPy is a Python implementation that uses a just-in-time (JIT) compiler. It is written in RPython, a restricted subset of Python, and uses a translation framework to generate C code from RPython programs. This allows PyPy to run programs faster than the standard CPython implementation while also supporting features like lazy evaluation, pluggable object spaces, and stackless concurrency.
The core idea of PyPy is to produce a flexible and fast implementation of the Python programming language. The talk will cover the interpreter, translator and jit parts of the code and their relationships and the fundamental ways in which PyPy differs from other virtual machine implementations.
TheEdge 2012 - AlphaCSP's 5th annual Java event, bringing news and the future of Java to the Java community, took place on the 29th of March 2012, at the Avenue Convention Center. Once again, AlphaCSP's Java experts, together with leading Java speakers from around the world, presented cutting-edge Java technologies.
This one is about Rich Ajax Platform
This document discusses how to write plugins for Atlassian products using languages other than Java. It begins by introducing polyglot plugin development and the audience. It then discusses using Scala and JRuby to write plugins by embedding the Scala and JRuby runtimes. Key points covered include deployment options when size is a concern, dealing with different language conventions, and examples of plugins written in Scala and JRuby. The document emphasizes that while plugins can't be fully written in languages like Ruby, these languages can still be used within plugins by leveraging language runtimes.
The new runtime which Google is started implementing as developers view to implement or not which has advantages over the previous Dalvik runtime and more...
Compilers have been improving programmer productivity ever since IBM produced the first FORTRAN compiler in 1957. Today, we mostly take them for granted but even after more than 60 years, compiler researchers and practitioners continue to push the boundaries for what compilers can achieve as well as how easy it is to leverage the sophisticated code bases that encapsulate those six decades of learning in this field. In this talk, I want to highlight how industry trends like the migration to cloud infrastructures and data centers as well as the rise of flexibly licensed open source projects like LLVM and Eclipse OMR are paving the way towards even more effective and powerful compilation infrastructures than have ever existed: compilers with the opportunity to contribute to programmer productivity in even more ways than simply better hardware instruction sequences, and with simpler APIs so they can be readily used in scenarios where even today's most amazing Just In Time compilers are not really practical.
Challenges in Debugging Bootstraps of Reflective KernelsESUG
- Bootstrapping is generating a system using a previous version of itself to create a small reflective kernel for IoT applications with limited resources.
- Defects in the language definition can cause failures during bootstrap generation, loading, or execution. Defects are classified as structural or semantic.
- A taxonomy of errors and solutions is proposed, including static analysis tests, a hybrid debugger, and simulated execution to debug at different stages of the bootstrap process. This aims to help debug the Pharo bootstrap process.
Think beyond frameworks, The real gems are in the languagesNaresha K
This document discusses the importance of learning programming languages over frameworks. It argues that frameworks reflect the opinions of their underlying languages, and languages with fewer opinions give users more flexibility. The document uses Groovy and Grails to illustrate how language evolution influences framework evolution. It provides examples of how Groovy leverages concepts like static typing, meta-programming, domain-specific languages, and inheritance vs. composition to increase productivity. The key message is that frameworks enable productivity but learning languages unleashes more potential for innovation.
GraalVM is a high-performance runtime that can accelerate applications written in Java and other JVM languages. It includes a new just-in-time (JIT) compiler called Graal that can compile code ahead-of-time into a standalone native image executable. This ahead-of-time compilation allows applications to start faster and use less memory compared to the traditional HotSpot JVM. GraalVM is best suited for applications that benefit from fast startup times and a small memory footprint like command-line tools, containerized services, and embedded systems.
GraalVM is a universal virtual machine that allows applications written in Java and other languages like JavaScript, Python, Ruby, and R to be compiled into self-contained binaries. This improves performance by reducing startup time and memory usage compared to the traditional JVM. The main features of GraalVM include a modern compiler that converts bytecode into native images, polyglot interoperability between multiple languages, and the ability to implement custom languages. While Scala Native is a competitor that focuses on optimizing Scala code ahead of time, GraalVM supports a wider range of languages and has a larger community behind it.
Eclipse OMR: a modern toolkit for building language runtimesMark Stoodley
Eclipse OMR is a modern toolkit for building language runtimes that provides high quality runtime ingredients like a porting library, threading library, garbage collection framework, and JIT compiler tools. It has no language semantics of its own and is designed to be integrated into various language runtimes. The presentation demonstrates how OMR has already been used successfully in Ruby, Python, and Smalltalk runtimes and provides performance benefits. It invites others to get involved in the open source project.
This document discusses GraalVM, a universal virtual machine that enables high performance and interoperability between programming languages. It introduces key concepts like JIT compilation, AOT compilation, C2 JIT, Graal JIT, and Substrate VM. It provides examples of using Graal JIT and AOT compilers on a sample Java application and compares the performance. Finally, it summarizes the capabilities and future directions of GraalVM, including running existing applications more efficiently across languages and embedding languages in native applications.
Debugging of CPython processes with gdb
Slides for the PyconPL 2016 talk on how to use gdb for debugging of complex issues that might happen with CPython
Blog post version: http://podoliaka.org/2016/04/10/debugging-cpython-gdb/
Porting and Maintaining your C++ Game on Android without losing your mindBeMyApp
Presentation from David Wingrove & Katie Merrill from Golden Hammer Software http://www.goldenhammersoftware.com/
From the Barcelona Android User Group meetup: http://www.meetup.com/Barcelona-Android-User-Group/events/166734982/
Python is gaining popularity as a scripting language, with its usage share growing from 4.7% to 5% between September 2007 and September 2008. There are multiple implementations of Python including CPython, Jython, and IronPython. Sun is working on tools like NBPython to improve the Python development experience in NetBeans, as well as modifying the JVM through projects like JSR-292 and invokedynamic to better support dynamic languages like Python. Challenges for Python's growth include migration, packaging, performance, concurrency, and marketing.
This document summarizes a presentation about JRuby, an implementation of the Ruby programming language that runs on the Java Virtual Machine. It discusses what JRuby is, how to get started with it, details of its implementation including compilation and threading, and how it addresses various issues with Ruby like performance, memory management, and integration with Java. It also covers some JRuby projects and potential future directions.
The document summarizes key points about migrating from Java to Ruby for application development. It discusses that Java has become too complex with many frameworks and poor performance. Ruby is an emerging language that offers higher productivity through dynamic typing, simpler syntax, and frameworks like Rails. The document recommends starting with a small pilot project in Ruby to demonstrate benefits over Java before undertaking a larger migration. Risks of adopting Ruby include the language and community being less mature than Java.
Migration Spring Boot PetClinic REST to Quarkus 1.2.0Jonathan Vila
In this presentation I will introduce Quarkus and also show which were the steps followed to migrate Spring PetClinic application to Quarkus using the standard libraries : resteasy, microprofile metrics, hibernate, openapi, .... GraalVM
JRuby allows Ruby code to run on the Java Virtual Machine. This provides benefits like improved performance due to Java's highly optimized JVM, ability to take advantage of Java libraries and tools, and ability to truly leverage multiple cores through Java threading. The document discusses using JRuby for Rails applications in an enterprise setting, including packaging applications as WAR files, using database migration tools like Liquibase, and integrating with Java.
The document discusses implementing dynamic programming languages in virtual machines. It argues against directly writing virtual machines in low-level languages like C, which can limit flexibility, maintainability and performance. Instead, it advocates writing interpreters in high-level languages and using meta-programming techniques to automatically generate virtual machines from these interpreters through translation. This approach aims to achieve flexibility, simplicity and performance together for language implementations.
This document discusses using Golang for building command line tools. It begins with introductions and background on the speaker and their company Innovatube. Golang is described as being used for non-HTML heavy web development, API servers, and mobile app backends. Common use cases for Golang include web services, mobile apps, game backends, daemons/services, and command line tools. Several popular command line tools built with Golang are listed, and libraries for building CLI tools in Golang are provided. The document demonstrates using the gcli library to generate a skeleton for a Golang CLI tool. It concludes with some tips for coloring text and building dashboards in Golang CLI tools.
PyPy is a Python implementation that uses a just-in-time (JIT) compiler. It is written in RPython, a restricted subset of Python, and uses a translation framework to generate C code from RPython programs. This allows PyPy to run programs faster than the standard CPython implementation while also supporting features like lazy evaluation, pluggable object spaces, and stackless concurrency.
The core idea of PyPy is to produce a flexible and fast implementation of the Python programming language. The talk will cover the interpreter, translator and jit parts of the code and their relationships and the fundamental ways in which PyPy differs from other virtual machine implementations.
TheEdge 2012 - AlphaCSP's 5th annual Java event, bringing news and the future of Java to the Java community, took place on the 29th of March 2012, at the Avenue Convention Center. Once again, AlphaCSP's Java experts, together with leading Java speakers from around the world, presented cutting-edge Java technologies.
This one is about Rich Ajax Platform
This document discusses how to write plugins for Atlassian products using languages other than Java. It begins by introducing polyglot plugin development and the audience. It then discusses using Scala and JRuby to write plugins by embedding the Scala and JRuby runtimes. Key points covered include deployment options when size is a concern, dealing with different language conventions, and examples of plugins written in Scala and JRuby. The document emphasizes that while plugins can't be fully written in languages like Ruby, these languages can still be used within plugins by leveraging language runtimes.
The new runtime which Google is started implementing as developers view to implement or not which has advantages over the previous Dalvik runtime and more...
Compilers have been improving programmer productivity ever since IBM produced the first FORTRAN compiler in 1957. Today, we mostly take them for granted but even after more than 60 years, compiler researchers and practitioners continue to push the boundaries for what compilers can achieve as well as how easy it is to leverage the sophisticated code bases that encapsulate those six decades of learning in this field. In this talk, I want to highlight how industry trends like the migration to cloud infrastructures and data centers as well as the rise of flexibly licensed open source projects like LLVM and Eclipse OMR are paving the way towards even more effective and powerful compilation infrastructures than have ever existed: compilers with the opportunity to contribute to programmer productivity in even more ways than simply better hardware instruction sequences, and with simpler APIs so they can be readily used in scenarios where even today's most amazing Just In Time compilers are not really practical.
Challenges in Debugging Bootstraps of Reflective KernelsESUG
- Bootstrapping is generating a system using a previous version of itself to create a small reflective kernel for IoT applications with limited resources.
- Defects in the language definition can cause failures during bootstrap generation, loading, or execution. Defects are classified as structural or semantic.
- A taxonomy of errors and solutions is proposed, including static analysis tests, a hybrid debugger, and simulated execution to debug at different stages of the bootstrap process. This aims to help debug the Pharo bootstrap process.
Think beyond frameworks, The real gems are in the languagesNaresha K
This document discusses the importance of learning programming languages over frameworks. It argues that frameworks reflect the opinions of their underlying languages, and languages with fewer opinions give users more flexibility. The document uses Groovy and Grails to illustrate how language evolution influences framework evolution. It provides examples of how Groovy leverages concepts like static typing, meta-programming, domain-specific languages, and inheritance vs. composition to increase productivity. The key message is that frameworks enable productivity but learning languages unleashes more potential for innovation.
GraalVM is a high-performance runtime that can accelerate applications written in Java and other JVM languages. It includes a new just-in-time (JIT) compiler called Graal that can compile code ahead-of-time into a standalone native image executable. This ahead-of-time compilation allows applications to start faster and use less memory compared to the traditional HotSpot JVM. GraalVM is best suited for applications that benefit from fast startup times and a small memory footprint like command-line tools, containerized services, and embedded systems.
GraalVM is a universal virtual machine that allows applications written in Java and other languages like JavaScript, Python, Ruby, and R to be compiled into self-contained binaries. This improves performance by reducing startup time and memory usage compared to the traditional JVM. The main features of GraalVM include a modern compiler that converts bytecode into native images, polyglot interoperability between multiple languages, and the ability to implement custom languages. While Scala Native is a competitor that focuses on optimizing Scala code ahead of time, GraalVM supports a wider range of languages and has a larger community behind it.
Micronaut is a framework for building microservices that uses compile-time dependency injection and supports reactive programming and cloud native features. It can be used with GraalVM, an open source project that compiles Java applications ahead-of-time to native images for faster startup times and reduced memory usage. Together, Micronaut and GraalVM provide a lightweight and high-performance solution for building microservices that is well-suited for cloud environments.
The new GraalVM from Oracle supports multiple language including JavaScript, Python, Ruby, R, C++ as well as Java and other JVM languages. This opens up interesting possibilities for polygot enterprise applications. Now you can use a Node library in a Java application or call an R statistical function from an EJB. Previously, this type of integration was extremely challenging. This session will provide recipes to get up and running along with best practices and some cool demos.
Code: https://github.com/rcuprak/graalvm_jee
HOW TO CREATE AWESOME POLYGLOT APPLICATIONS USING GRAALVMOwais Zahid
Key to creating world-class solutions lies in the effectivity of cross-team collaboration and lead time. When multiple teams involved in a project, it is critical to take cross-platform and cross-language aspects into account. Introducing GraalVM, a universal virtual machine created to address an issue of teams struggling to collaborate because of varying preference of programming languages.
In this session, we will look at how you can use GraalVM to create polyglot applications with ease. It is a hands-on live coding session where we will look at Ruby, NodeJS & Java interoperability.
Run Scala Faster with GraalVM on any Platform / GraalVMで、どこでもScalaを高速実行しよう by...scalaconfjp
This document discusses using GraalVM to run Scala faster on any platform. It provides an overview of GraalVM, how it can be used to compile Scala faster than the default compiler, and how GraalVM's native image feature allows building native executables from Scala code for low overhead startup and memory usage. It also discusses how GraalVM could enable building cross-platform mobile apps using Scala and JavaFX that run on iOS and Android.
The document provides an overview of the Graal VM, which is a new just-in-time (JIT) compiler for the Java Virtual Machine (JVM) that brings high performance to scripting languages via the Truffle API. It discusses how Graal generates machine code from an optimized AST rather than bytecode, and how the Truffle API allows creation of language interpreters in Graal. Performance benchmarks show Graal improving performance for languages like JavaScript, Ruby, and R compared to other implementations. Future directions include supporting more languages and compiler optimizations in Graal's extensible framework.
Everything you need to know about GraalVM Native ImageAlina Yurenko
GraalVM Native Image allows compiling Java programs into standalone native executables. It performs static analysis to identify all reachable code from the entry point. This results in instant startup times, low memory footprints, and is well-suited for cloud deployments. Native Image builds applications ahead-of-time during the build process, resulting in optimized machine code and no just-in-time compilation overhead at runtime. Reflection must be configured explicitly. Native Images provide benefits such as reduced memory usage compared to the JVM and increased security due to the static nature of the compiled application.
Discussing open sourcing the IBM J9 JVM GC technology as part of a language agnostic toolkit. It has demos showing how easy it is to use the GC in another language as well as results on our MRI example
How the HotSpot and Graal JVMs execute Java CodeJim Gough
When Java was released in 1995 it was slow, a reputation it has carried for many years… Today Java can give performance that is comparable to C++ and can emit instructions that are more optimal than code which is statically compiled. But how?
This talk will explore practical examples and the subsystems that are involved in interpreting, compiling and executing a simple Hello World Application. We will dive into JIT compilation and the arrival of the JVM Compiler Interface (JVMCI) to explore how optimisations are applied to boost the performance of our application. We will discuss HotSpot, explore Graal and the JVM ecosystem to discover performance benefits of a platform 25 years in the making.
This document provides a high-level summary of GraalVM and its capabilities for running applications and languages on the Java Virtual Machine. Specifically, it discusses how GraalVM allows running JavaScript, Python, Ruby, R, Java and C/C++ efficiently on the JVM through projects like Truffle and Substrate. It also summarizes GraalVM's polyglot capabilities for interoperability between languages and ahead-of-time compilation of Java into native binaries.
Simple tweaks to get the most out of your JVMJamie Coleman
Many developers don’t think about the JVM level when creating applications. It is something that just simply works. Now more applications are becoming cloud-native and we have JVM’s running in every microservice container, each performance gain can have massive benefits when scaled up. Some tweaks are very easy to implement and can have huge impacts on start-up time and performance of your applications. This talk will go through all the different JVM options and give you some easy and simple advice on how to get the most out of your JVM to save not only money but also energy on the cloud.
Efficient DevOps Tooling with Java and GraalVMQAware GmbH
The document discusses using Java and GraalVM to build efficient DevOps tooling. It describes how GraalVM can eliminate extraneous cognitive load through polyglot programming and ahead-of-time compilation. It provides examples of using Picocli and GraalVM to build command line interfaces for operations tasks like container orchestration and managing Kubernetes deployments through operators.
DCSF19 Docker Containers & Java: What I Wish I Had Been ToldDocker, Inc.
Mohammed Aboullaite, xHub
Nowadays, containers are more than a cool new tool to play with - they've revolutionized the way we develop, architect and ship software and have become part of our day-to-day operations. On the other hand, Java has been around for more than 2 decades, dominating the entreprise world. Both advocate the "RUN anywhere" principal, but, is it that easy? No! Your perfect working local container will most probably fail on production because of MEMORY &/or CPU issues, since jvm apps assume they OWN the server they are running on.
This session will look at the gotchas of running JVM apps in containers & how to avoid costly pitfalls. We will cover:
_ what updates Java 10 brought to the table to improve container awareness and the issues related to prior versions, including how to address each one of them to avoid the mess.
- tips and tricks to obtain smaller images & best practices while writing your DockerFiles
- some plugins to helps non-containers experts integrate docker in their development process; and
- the concept of "Distroless" Docker Images and how to benefit from it.
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5David Voyles
The video for this talk can be found here:https://channel9.msdn.com/Blogs/raw-tech/Getting-started-with-Emscripten--Transpiling-C--C-to-JavaScript--HTML5
I cover how to transpile code from C/C++ to HTML5/JS using Emscripten, an open source compiler tool from Mozilla and Alon Zakai.
Simple tweaks to get the most out of your jvmJamie Coleman
Many developers don’t think about the JVM level when creating applications. It is something that just simply works. Now more applications are becoming cloud-native and we have JVM’s running in every microservice container, each performance gain can have massive benefits when scaled up. Some tweaks are very easy to implement and can have huge impacts on start-up time and performance of your applications. This talk will go through all the different JVM options and give you some easy and simple advice on how to get the most out of your JVM to save not only money but also energy on the cloud.
The document outlines Mark Proctor's journey working with Drools, jBPM and OptaPlanner over 20 years, including the evolution of the products from early Drools in 2000 to the current focus on cloud-native applications using Quarkus, GraalVM and Kubernetes. It also discusses recent efforts under the Submarine project to develop domain-specific services for decisions, processes, events and optimizations using a canonical executable model and polyglot capabilities. The engineering team for Drools and jBPM has quadrupled in size since 2011 to support these initiatives.
GraalVMs native-image ermöglicht es, JVM Bytecode direkt in Maschinencode zu übersetzen. Das daraus resultierende Executable benötigt keine JVM zum Laufen, startet schneller und verbraucht weniger Speicher als eine traditionelle JVM-Anwendung – ein Segen für Cloud Computing, bei dem jeder CPU-Cycle und Megabyte an RAM bezahlt werden muss. Wäre es nicht großartig, wenn unser Lieblingsframework, Spring Boot, GraalVM direkt out of the box unterstützen würde? In diesem Talk zeigt Moritz Halbritter, Spring Boot committer, was mit Spring Boot 3 und Spring Framework 6 alles möglich sein wird und erlaubt auch einen Blick unter die Motorhaube, um zu sehen, wie das alles implementiert ist.
The document discusses cloud-native architectures and principles. It describes how cloud-native applications are built to run on cloud platforms, consume cloud services, and use modern development and delivery processes. Some key characteristics of cloud-native applications are that they are containerized, microservices-based, leverage infrastructure as code principles, and can automatically scale on demand. The document also contrasts cloud-native and cloud-migrant approaches, with cloud-natives fully leveraging the cloud and cloud-migrants taking a more transitional approach.
Este documento presenta las principales características de GraalVM. GraalVM es una máquina virtual políglota que puede ejecutar programas en Java y otros lenguajes como JavaScript, Python y R. También permite compilar código Java a nativo, interoperabilidad entre lenguajes, y usar programas Java como librerías nativas en otros lenguajes. El documento describe nueve casos de uso clave de GraalVM como reemplazo del JDK, compilador en el JDK, Java nativo, VM políglota, interoperabilidad, VM para lenguajes nativos, depur
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Oracle Code One ...Jorge Hidalgo
Conference session from Oracle Code One San Francisco 2018 - In the brave new world of microservices, the need for polyglot solutions is growing, making it harder to standardize continuous delivery pipelines across many different languages and runtimes. Tasks like compiling, packaging, profiling or verifying software components, are now more diverse and our toolbelt as developers does not cease to grow. Thankfully, there are ways to prescribe and standardize without losing freedom and flexibility. In this talk we will showcase. from a very pragmatic and hands-on point of view, an architectural approach based on real-world project experiences, unleashing the power of Jenkins, Jenkinsfile declarative pipelines, Jenkins libraries, Docker and Kubernetes as the universal runtime platform, for continuously delivering polyglot components at ease.
Multilanguage pipelines with Jenkins, Docker and Kubernetes (DevOpsDays Riga ...Jorge Hidalgo
Ignite talk from DevOpsDays Riga 2018 -- In the brave new world of microservices, the need for polyglot solutions is growing, making it harder to standardize continuous delivery pipelines across many different languages and runtimes. Tasks like compiling, packaging, profiling or verifying software components, are now more diverse and our toolbelt as developers does not cease to grow. Thankfully, there are ways to prescribe and standardize without losing freedom and flexibility. In this talk we will showcase. from a very pragmatic and hands-on point of view, an architectural approach based on real-world project experiences, unleashing the power of Jenkins, Jenkinsfile declarative pipelines, Jenkins libraries, Docker and Kubernetes as the universal runtime platform, for continuously delivering polyglot components at ease.
DevOps Te Cambia la Vida - eComputing 2018-07-03Jorge Hidalgo
Presentación (en español) de la charla "DevOps Te Cambia la Vida" durante las jornadas eComputing celebradas en Barcelona los días 2 y 3 de julio de 2018.
This document provides 9 tips for using Selenium best practices and patterns for testing Java applications. It discusses using JSON for configuration, managing nodes with VisGrid, creating an ephemeral grid, managing driver binaries with WebDriverManager, alternatives to XPath such as providing predictable IDs, using the ISelect interface effectively, how the Action Builder can help, continuous testing for microservices using Jenkins as an orchestrator, and considering Selenium tests as their own application. Credits are provided for related GitHub repositories and a previous presentation on the topic.
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power ToolsJorge Hidalgo
The document discusses various code inspection, testing, and security testing tools that can be used to improve code quality. It recommends profiling code with static analysis tools to check for coding standards and best practices. It also suggests measuring code coverage and using mutation testing to understand which parts of the code are not being tested. Finally, it emphasizes the importance of security testing with tools that can check for vulnerabilities both in code and dependencies. Mocking tools are also recommended to make tests independent of the environment.
All Your Faces Belong to Us - Opensouthcode 2017-05-06Jorge Hidalgo
Slides from the talk "All Your Faces Belong to Us" about vision recognition with open source technologies, for Opensouthcode 2017 conference (Malaga, 6th May 2017).
Por qué DevOps, por qué ahora @ CHAPI 2017Jorge Hidalgo
Este documento describe los principios y beneficios de DevOps. Explica que DevOps promueve la colaboración entre equipos de desarrollo y operaciones para acelerar el tiempo de lanzamiento y entrega continua de valor a través de la automatización, arquitecturas de microservicios, despliegues frecuentes y métricas integrales. También menciona algunas herramientas comunes como Jenkins, Ansible y Prometheus que apoyan la integración continua, despliegues automáticos y monitoreo.
La JVM y el Internet de las Cosas @ MálagaJUG 2016-11-17Jorge Hidalgo
The document discusses Java and the Internet of Things (IoT). It describes how IoT connects physical objects through sensors to the internet and shares data. It provides examples of IoT applications in smart cities, healthcare, manufacturing, wearables, automobiles, and homes. It also discusses challenges of IoT like energy, connectivity, security, interoperability and scalability. Finally, it outlines how Java platforms can be used to build IoT applications and provides demos.
JavaOne 2016 - CON3080 - Testing Java Web Applications with Selenium: A CookbookJorge Hidalgo
By Jorge Hidalgo & Vicente Gonzalez, September 21st, 2016.
Automating tests of Java web applications should not be hard. Selenium is a well-known open source tool for automating user interactions within a browser that enables you to run the same test scripts across multiple browser types and operating systems unmodified. This session presents several recipes for working effectively with Selenium: multibrowser selectable tests, patterns for working with asynchronous calls, the page object pattern, and others. Armed with these recipes, developers will increase their proficiency in Selenium test automation and become even more productive in their day-to-day job.
JavaOne 2015 - CON6489 - Smart Open Spaces Powered by Low Cost ComputersJorge Hidalgo
By Jorge Hidalgo & Julio Palma. San Francisco Oct 27th, 2015.
Single-board computers such as the Raspberry Pi are cheap, small, and cute, but they have also shown that they are powerful enough to drive interesting ideas at a fraction of the cost of other, more “traditional” hardware solutions. This session covers how Java ME and Java SE technologies can power solutions for managing open spaces (such as museums, department stores, hypermarkets, airports, train stations, and offices) in a cost-effective manner. Combining Java, the Raspberry Pi, and Bluetooth LE and other sensors makes it easy to build a platform to track personal devices as they are carried through an area and analyze movement patterns, hot zones, and real-time 3-D information to help drive better visitor/customer/user interactions.
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...Jorge Hidalgo
Slides from JavaOne 2014 conference session CON2013
The Java compiler and annotation processors are powerful tools within the Java platform, and both, combined, unleash great power in developers’ hands, as this session illustrates. Triggered during the Java compilation process, APs can be used to generate new sources and configuration from metadata present in the class source. Why expend time creating a BeanInfo class or dealing with boring XML configuration files when you can have them easily created at compilation time? Moreover, APs are compatible with IDEs and build tools, and hence they are virtually everywhere your Java code is. Unleash the power of annotation processors, and let them do the hard work for you
Slides for my talk at OpenSlava conference 2013-10-11.
Abstract: Integrated Development Environments are at the neuralgic centre of developer activities. For many of us it’s unconceivable to work in complex developments leveraging multiple heterogeneous tools for design, build and test activities without the IDE connecting them all.
IDEs are powerful tools, capable of handling many types of tasks. In many cases, IDEs are perceived as a commodity but this is a naïve approach that ignores the many brilliant features that IDEs can be used for: debugging, code generation, test automation, version control, quality assurance, task & issue management, etc.
During this talk, participants will get an overview of what IDEs mean today, for the newbie, the enterprise and the hard-core developer, will get introduced to key IDE features that every one of us should be using, and will participate on an open discussion about what next-generation IDEs should look like.
WhatsApp offers simple, reliable, and private messaging and calling services for free worldwide. With end-to-end encryption, your personal messages and calls are secure, ensuring only you and the recipient can access them. Enjoy voice and video calls to stay connected with loved ones or colleagues. Express yourself using stickers, GIFs, or by sharing moments on Status. WhatsApp Business enables global customer outreach, facilitating sales growth and relationship building through showcasing products and services. Stay connected effortlessly with group chats for planning outings with friends or staying updated on family conversations.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...kalichargn70th171
A dynamic process unfolds in the intricate realm of software development, dedicated to crafting and sustaining products that effortlessly address user needs. Amidst vital stages like market analysis and requirement assessments, the heart of software development lies in the meticulous creation and upkeep of source code. Code alterations are inherent, challenging code quality, particularly under stringent deadlines.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
DDS Security Version 1.2 was adopted in 2024. This revision strengthens support for long runnings systems adding new cryptographic algorithms, certificate revocation, and hardness against DoS attacks.
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
Odoo ERP software
Odoo ERP software, a leading open-source software for Enterprise Resource Planning (ERP) and business management, has recently launched its latest version, Odoo 17 Community Edition. This update introduces a range of new features and enhancements designed to streamline business operations and support growth.
The Odoo Community serves as a cost-free edition within the Odoo suite of ERP systems. Tailored to accommodate the standard needs of business operations, it provides a robust platform suitable for organisations of different sizes and business sectors. Within the Odoo Community Edition, users can access a variety of essential features and services essential for managing day-to-day tasks efficiently.
This blog presents a detailed overview of the features available within the Odoo 17 Community edition, and the differences between Odoo 17 community and enterprise editions, aiming to equip you with the necessary information to make an informed decision about its suitability for your business.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Artificia Intellicence and XPath Extension Functions
GraalVM - OpenSlava 2019-10-18
1. GRAALVM
Three languages for the Elven fullstack developers under the sky,
Seven for the Dwarf backend developers in their halls of stone,
(*) Nine for the Mortal frontend developers doomed to die,
One for the Compiler Lord on his AST throne
In the Land of Bytecodes where the programs lie.
One VM to rule them all,
One VM to find them,
One VM to bring them all,
And in Bytecodes bind them,
In the Land of Bytecodes where the programs lie.
(*) The languages are doomed to die, not the developers!
3. WHO AM I
JORGE HIDALGO
Senior Manager – Senior Technology Architect
Accenture Technology – Global Java Practice Lead
Advanced Technology Center in Spain – Open Engineering Lead
Málaga JUG Lead
Father of two, husband, whistle player, video gamer, sci-fi *.*, Lego,
Star Wars, Star Trek, Starcraft, Halo, Borderlands, Raspberry Pi, Arduino… LLAP!
4. TL;DR
Examples are adapted from Chris Seaton’s workshop in
Oracle Code One 2018
Thanks to Chris for allowing us to reuse them
All examples can be found here:
https://github.com/deors/workshop-graalvm
4
5. GRAALVM
GraalVM – https://graalvm.org/
• Brand new polyglot virtual machine by Oracle Labs
• JVM languages, and much more!
• Written in Java -- easier to hack and to evolve
• Faster, leaner, production-ready for certain use cases
• Two flavours:
• Open source (community edition)
• Enterprise edition with further enhancements
In this session we will show some of GraalVM use cases
5
6. GRAALVM
This is the high-level internal architecture of GraalVM
Java HotSpot VM
SubstrateVMJVM Compiler Interface
Graal Compiler
Truffle Framework
Sulong
6
7. GRAALVM
AGENDA
1. GraalVM as a drop-in replacement for JDK
2. Graal as a compiler in JDK
3. Java native images
4. Polyglot VM
5. Seamless language interop
6. VM for native languages
7. Common debugging interface
8. Common monitoring interface
9. Java programs as native libraries
7
9. GRAALVM
1. GraalVM as a drop-in replacement for JDK
• GraalVM can be used simply as an alternate VM
to run JVM programs
• 1.8 at the moment, with 11 coming soon
• It is a drop-in replacement, including all the expected tools
and the same familiar command line arguments
• New tools and commands for GraalVM specific features
9
10. GRAALVM
1. GraalVM as a drop-in replacement for JDK
• GraalVM has multiple components, being the Graal
compiler one of them, running on top of the HotSpot VM
thanks to the JVM Compiler Interface (JVMCI)
• Graal is written in Java, easier to maintain and to evolve
• In many cases, programs executed with Graal have better
performance and memory footprint out of the box
10
11. GRAALVM
1. GraalVM as a drop-in replacement for JDK
Image from Chris Thalinger’s talk on Joker 2017 conference –
“Twitter’s Quest for a Wholly Graal Runtime”
https://2017.jokerconf.com/en/2017/talks/3qdblcadmqy0me
2uuieqaq/
11
12. GRAALVM
1. GraalVM as a drop-in replacement for JDK
# add GraalVM to path
export PATH=~/code/tools/graalvm-ce-19.2.0.1/Contents/Home/bin:$PATH
# explore version info
java -version
12
13. GRAALVM
1. GraalVM as a drop-in replacement for JDK
# a simple test – program which counts words in a file
cd ~/graalvm/topten
javac TopTen.java
# running with Graal compiler (activated by default in GraalVM)
time java TopTen quick-brown-fox.txt
time java TopTen alice-in-wonderland.txt
time java TopTen war-and-peace.txt
# same program but with Graal compiler disabled
time java -XX:-UseJVMCICompiler TopTen war-and-peace.txt
13
14. GRAALVM
1. GraalVM as a drop-in replacement for JDK
• In a simple program, where code is executed only once or
a few times, performance improvement is small or null
• The JIT compiler in Graal, as happens with C1/C2, works
better with time, translating bytecodes into native code by
applying multiple optimizations which are fine-tuned as
execution progresses
• Using GraalVM in long running programs is the best way to
check whether Graal is improving performance or not
14
15. GRAALVM
1. GraalVM as a drop-in replacement for JDK
# another test, operating with complex numbers in large
cd ~/graalvm/value-types
mvn package
# running with Graal compiler (activated by default in GraalVM)
# this test uses JMH microbenchmarks
java -jar target/benchmarks.jar -prof gc
# same program but with Graal compiler disabled
java -XX:-UseJVMCICompiler -jar target/benchmarks.jar -prof gc
15
17. GRAALVM
2. Graal as a compiler in JDK
• Graal compiler is also included with OpenJDK 11+
• It is not the latest version, so its performance is not on par
with GraalVM yet, but will be updated in forthcoming
OpenJDK releases
• It can be used as an
alternate compiler to
C1/C2 activating it
with JVM flags
17
Java HotSpot VM
SubstrateVMJVM Compiler Interface
Graal Compiler
Truffle Framework
Sulong
18. GRAALVM
2. Graal as a compiler in JDK
# repeat the test which counts words on a file
# with OpenJDK 11+ standard compiler
cd ~/graalvm/topten
time java TopTen war-and-peace.txt
# with OpenJDK 11+ Graal compiler
time java -XX:+UnlockExperimentalVMOptions
-XX:+EnableJVMCI
-XX:+UseJVMCICompiler
TopTen war-and-peace.txt
Enables JVMCI and uses JVMCI compiler by
default in OpenJDK
It is not necessary to specify Graal, as it is
the only JVMCI-compliant compiler
available in the modulepath/classpath
18
19. GRAALVM
2. Graal as a compiler in JDK
# repeat the test which operates with complex numbers
# with OpenJDK 11+ standard compiler
cd ~/graalvm/value-types
java -jar target/benchmarks.jar -prof gc
# with OpenJDK 11+ Graal compiler
java -XX:+UnlockExperimentalVMOptions
-XX:+EnableJVMCI
-XX:+UseJVMCICompiler
-jar target/benchmarks.jar -prof gc
19
21. GRAALVM
3. Java native images… Yes! NATIVE JAVA!!
• JVM JIT (just in time) compiler optimisation while on
runtime has a ramp up curve and a larger resource
consumption which pays off on long running processes,
like batch, big data, scientific comp. and app servers
• But not very good for short lived processes, like CLI or
functions in the cloud-native world where startup time is a
major concern
21
22. GRAALVM
3. Java native images
• Graal can be used as an AOT (ahead of time) compiler to
create native images of JVM bytecodes…
• …But with some caveats:
• Reflection needs extra configuration
• Dynamic proxies need extra configuration
• No InvokeDynamic (except for lambdas)
• No bytecode generation
22
23. GRAALVM
3. Java native images
# native images are not installed by default with GraalVM
# SubstrateVM, which is the component that does the AOT magic
# must be installed first as an add-on
gu install native-image
Java HotSpot VM
SubstrateVMJVM Compiler Interface
Graal Compiler
Truffle Framework
Sulong
23
24. GRAALVM
3. Java native images
# run again a simple, short live program with GraalVM
cd ~/graalvm/topten
time java TopTen quick-brown-fox.txt
# create the native image with AOT compiler (no bytecodes were harmed!)
native-image TopTen
# run the native image
time ./topten quick-brown-fox.txt
# examine dependencies – self-contained, no GraalVM or OpenJDK in sight
otool -L topten
24
25. GRAALVM
3. Java native images
# a more complex scenario with reflection
cd ~/graalvm/reflection
mvn compile
# run the example bytecodes in GraalVM
java -cp target/classes graalvm.reflection.ReflectionExample
# create the native image
native-image -cp target/classes graalvm.reflection.ReflectionExample
# run the native image
./graalvm.reflection.ReflectionExample
25
26. GRAALVM
3. Java native images
# another example with reflection
# (class names configured in a properties file)
java -cp target/classes graalvm.reflection.ReflectionPropsExample
# create the native image
native-image -cp target/classes
graalvm.reflection.ReflectionPropsExample
# run the fallback native image (it stills need the JDK to work!)
./graalvm.reflection.ReflectionPropsExample
26
27. GRAALVM
3. Java native images
# use the tracing agent to record dynamic behaviour
mkdir target/native-image
java -agentlib:native-image-agent=config-output-dir=target/native-image
-cp target/classes graalvm.reflection.ReflectionPropsExample
# create the native image using the recorded traces
native-image -H:ReflectionConfigurationFiles=target/native-image/reflect-config.json
-H:ResourceConfigurationFiles=target/native-image/resource-config.json
-cp target/classes
graalvm.reflection.ReflectionPropsExample
# run the perfectly generated native image
./graalvm.reflection.ReflectionPropsExample
27
28. GRAALVM
3. Java native images
• GraalVM native images are excellent to build Docker
images for processes that require a fast startup time
• As native images have minimal dependencies and do not
need the JDK, the image size is very small
• To build the Docker image, the native executable has to be
generated within a container to ensure portability
28
30. GRAALVM
3. Java native images
# create the native image within the container
docker run -it --rm
--mount type=bind,source=$PWD,target=/opt/graalvm
graalvm-native-image
"--static"
"-H:ReflectionConfigurationFiles=target/native-image/reflect-config.json"
"-H:ResourceConfigurationFiles=target/native-image/resource-config.json"
"-cp" "target/classes"
"graalvm.reflection.ReflectionPropsExample"
# the executable is a Linux exec and may not work on your machine
./graalvm.reflection.reflectionpropsexample
30
31. GRAALVM
3. Java native images
# create the Docker image to run the program (Alpine Linux is enough)
docker build -t reflectionpropsexample
-f reflectionspropsexample.Dockerfile .
docker images | grep reflectionpropsexample
# run the native image within a container
docker run -it --rm reflectionpropsexample
31
32. GRAALVM
3. Java native images
• These huge performance improvements on startup time
represent a major milestone for the JVM ecosystem
• Paves the way for the “faster, leaner Java” movement:
• Micronaut
• Quarkus
• Spring (*)
• Serverless computing
32
(*) https://github.com/spring-projects/spring-framework/wiki/GraalVM-native-image-support
34. GRAALVM
4. Polyglot VM
• GraalVM, thanks to Truffle framework, provides support for
non-JVM languages
• JavaScript implementations, js and node, are
production-ready
• Other languages are
still experimental:
Ruby, Python and R
Java HotSpot VM
SubstrateVMJVM Compiler Interface
Graal Compiler
Truffle Framework
Sulong
34
35. GRAALVM
4. Polyglot VM
# GraalVM own implementation of JavaScript
js --version
# GraalVM own implementation of Node.js
node --version
# it also includes npm
npm --version
35
36. GRAALVM
4. Polyglot VM
# simple web app running with Node.js and Express
cd ~/graalvm/hello-express
npm install express
node hello-express.js
36
37. GRAALVM
4. Polyglot VM
# install experimental languages (not included by default)
gu install ruby && ruby --version
gu install python && graalpython --version
gu install R && R --version
# list enabled extensions
gu list
# rebuild polyglot native images (highly recommended)
gu rebuild-images polyglot libpolyglot js llvm python ruby
37
38. GRAALVM
4. Polyglot VM
# run a simple Ruby program with GraalVM
cd ~/graalvm/hello-ruby
ruby hello-ruby.rb
# run a simple Python program with GraalVM
cd ~/graalvm/hello-python
graalpython hello-python.py
38
40. GRAALVM
5. Seamless language interop
• Being polyglot is cool, but being able to bring seamless
interoperability across all supported languages is
awesome!
• Every language implementation is actually processing
bytecodes, optimizing them as the execution progresses,
in a common pipeline – same JIT compiler, same
underlying VM – so it’s feasible to make this happen
40
41. 5. Seamless language interop
# example of a Ruby program calling Java
cd ~/graalvm/interop
ruby --jvm ruby-java.rb
# example of a Python program calling Java
graalpython --jvm python-java.rb
GRAALVM
The --jvm flag enables the interop
with JVM languages
41
42. GRAALVM
5. Seamless language interop
# example of a Ruby program calling JavaScript
ruby --jvm --polyglot ruby-javascript.rb
To call other languages, the extra
--polyglot param is needed
42
43. GRAALVM
5. Seamless language interop
# example of a Node.js program calling R
cd ~/graalvm/cloudplot
npm install express
node --jvm --polyglot cloudplot.js
# renders in browser
http://localhost:8080
http://localhost:8080/js
43
45. GRAALVM
6. VM for native languages
• GraalVM also has an interpreter for LLVM, named Sulong
• With this interpreter Truffle translates into bytecodes any
language with a compiler capable of emitting LLVM codes
• C, C++, Rust
– maybe others, too
• Very experimental
– performance still far
from desirable
Java HotSpot VM
SubstrateVMJVM Compiler Interface
Graal Compiler
Truffle Framework
Sulong
45
46. GRAALVM
6. VM for native languages
# compile a C program in the normal way, and emitting LLVM
cd ~/graalvm/gzip
clang gzip.c -o gzip
clang -c -emit-llvm gzip.c
# execute the C native program
time ./gzip -d war-and-peace.txt.gz &&
time ./gzip war-and-peace.txt
# execute the program with Sulong (GraalVM LLVM bitcode interpreter)
time lli gzip.bc -d war-and-peace.txt.gz &&
time lli gzip.bc war-and-peace.txt
46
48. GRAALVM
7. Common debugging interface
• A consequence of running multiple languages in the same
compiler framework it to have a common debugging
interface
• Even for programs with language interop
• Extremely useful as not all languages have debuggers, or
have them but not so good as we are used with JVM
languages
48
49. GRAALVM
7. Common debugging interface
# debugging a Ruby program
cd ~/graalvm/fizzbuzz
ruby --inspect fizzbuzz.rb
# debugging a Python program
graalpython --inspect fizzbuzz.py
# debugging an R program
R --inspect -f fizzbuzz.r
# debugging a JavaScript program
js --inspect fizzbuzz.js
49
51. GRAALVM
8. Common monitoring interface
• In the JVM world we are used to tools like VisualVM or
Mission Control to monitor applications and connect with
JMX metrics and actions
• With GraalVM, it is possible to leverage all those tools in
any supported languages
• Command-line options to enable tracing are available, too
• Invaluable as not all languages have monitoring tools, or
they are far from what it is common in the JVM
51
52. GRAALVM
8. Common monitoring interface
# monitoring a Ruby program
cd ~/graalvm/infloop
ruby --jvm infloop.rb
# in a separate console
jvisualvm
52
54. GRAALVM
9. Java programs as native libraries
• GraalVM enables us to run programs in many languages
• We can interop across those languages
• We can convert to native image
• It is also possible to run Java programs from any native
program, or programs with foreign function interfaces (FF),
like Ruby, Python, Rust, Go, Haskell, Dart, etc.
54
55. GRAALVM
9. Java programs as native libraries
• Many advantages to Java (and others) developers:
• Interfaces are automatically generated
• Very simple API
• Library is automatically generated
• Access to the Java ecosystem from anywhere
• Like JNI... but much, much, much easier than JNI!
55
56. GRAALVM
9. Java programs as native libraries
# program which calculates distances with Apache SIS
cd ~/graalvm/distance
javac -cp sis.jar Distance.java
java -cp sis.jar:. Distance 51.507222 -0.1275 40.7127 -74.0059
# create native image
native-image -cp sis.jar:. Distance
./distance 51.507222 -0.1275 40.7127 -74.0059
56
58. GRAALVM
9. Java programs as native libraries
# creates a native library from the same program
native-image -cp sis.jar:. --shared -H:Name=libdistance Distance
# interfaces and library are automatically generated
ls -l libdistance*
# the Apache SIS Java library is now used from a C program
clang -I. -L. -ldistance distance.c -o distancec
otool -L distancec
./distancec 51.507222 -0.1275 40.7127 -74.0059
😍 58
60. CONCLUSIONS
GraalVM – https://graalvm.org/
• Freedom of choice of language
• Access to multiple ecosystems
• JVM or native images
• Full interop across languages
• Debugging and monitoring tools
• With better performance in many cases
• ‘ONE VM TO RULE THEM ALL’ J
60