X

Oracle GraalVM

Recent Posts

Developing Microservices with GraalVM Enterprise Edition + Micronaut on Oracle Cloud

  Microservices have been one of the emerging technologies and are beginning to get mainstream adoption thanks to several other emerging technologies like containerization, cloud but most importantly the business demands to be agile, scalable and fast. A well-written article — Why Microservices Will Become a Core Business Strategy for Most Organizations by Dion Hinchcliffe gives a good summary on the business impact of Microservices. Why Oracle GraalVM Enterprise Edition?   GraalVM Enterprise Edition 19.0 is a new product released by Oracle after putting in years of investments in research and productization and now it is ready for production deployment. GraalVM Enterprise Edition is a high-performance, embeddable, polyglot Virtual Machine for running applications written in JavaScript, Python, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++ and allows efficient interoperability between programming languages. A list of benefits of GraalVM Enterprise Edition can be viewed on GraalVM Enterprise Edition's website. Where do GraalVM Enterprise Edition and Microservices come together? One of the features of GraalVM Enterprise Edition is native-images (available as an early adopter at the point of writing this) that works with many Java microservices frameworks. Projects such as Quarkus, Micronaut and Helidon have accepted this technology as native-images significantly reduce runtime memory requirements and startup time. What are we going to do ? In this article, we will be showing how we can develop microservices with GraalVM Enterprise Edition and Micronaut on Oracle Cloud Infrastructure (OCI). The diagram below depicts the cloud services we are using in this setup and how each of the cloud services interact with one another. Let’s Get Started (Working with Windows 10) Steps Summary Summary of steps in this hands-on exercise Step 1: Software Installation IntelliJ CE for Windows (I prefer this) Plugins: GIT, Terraform, Docker Docker for Windows 10 (increase the memory allocation to Docker if system exit during native-image generation) Micronaut KubeCtl OCI Tool for Windows Step 2: Create a project in ODCS Create a Project and setup a GIT repository Project provisioning on ODCS Clone the sample project from GitHub to ODCS If you are working in a team, add your team members and give them appropriate rights. Step 3 (Optional): Using IntelliJ for your development. If you are not making any changes to the codes or configurations, proceed directly to Step 4. Check out project IntelliJ → VCS | Checkout from Version Control | Git Step 4: Setup Docker Repository on OCIR Create a repository — the name will be used to make the changes in the wercker.yml / kubernetes_deployment.template.yaml Ensure that it is set to public (this is to save a few more steps to setup secrets, if you know how to deal with K8S secrets, go ahead and make this private) Step 5: Setting up OKE instance There are 2 ways that you can setup OKE — using the web UI (follow this tutorial) or terraform scripts. Upon successful creation of your OKE instance, get the values needed for the Wercker’s environment in Step 8. Ensure your Kubernetes are running by following this set of instruction. Download your kubeconfig Run your Kubernetes Dashboard Step 6: Setup Wercker After login into Wercker, Click on (+) and “Add Application”. Go through the wizard. Select the “User”, and SCM → Oracle Developer Cloud Service Select the repository you have created for this project and complete the setup wizard. Step 7: Creating the Wercker Pipeline In the sample code, there are 2 pipelines in the workflow (build, deploy-to-oke). This pipeline will be triggered once a new check-in is pushed to the Master branch. The build pipeline will compile the codes, create a docker image and push it to the image repository and the deploy-to-oke will then take the newly created image from the OCIR to be deployed on OKE. A good example of Wercker in general can be found here. Step 8: Define the Wercker Environment These environment variables are important for the tutorial. For the Wercker pipeline these are the key variables needed. Step 9: Modify the config files and Start the Wercker Pipeline Make a modification to your the wercker.yml and kubernetes_deployment.template.yaml (Edit lines marked with #TODO:) Commit and push the to files to the master branch to trigger the Wercker pipeline Step 10: Check your K8s dashboard and access the application Enter: http://<external_endpoints>/meetup/random on your browser (Random conferences) Enter: http://<external_endpoints>/abs/java/<number> (Absolute number)   Try GraalVM Enterprise Edition now:  GraalVM Enterprise Edition is free for development and evaluation usage from the Oracle Technology Network.  GraalVM Enterprise Edition is available for purchase and is free on Oracle Cloud. The full documentation for GraalVM Enterprise Edition is now available on the Oracle documentation page.   Keep an eye out for more information via blog posts on graalvm.org. Credit to Joseph Che for the codes

  Microservices have been one of the emerging technologies and are beginning to get mainstream adoption thanks to several other emerging technologies like containerization, cloud but most importantly...

For Building Programs That Run Faster Anywhere: Oracle GraalVM Enterprise Edition

Today, Oracle is announcing Oracle GraalVM Enterprise Edition. GraalVM Enterprise is built on the global standard for enterprise-class application development, Java SE.  GraalVM Enterprise is a multilingual virtual machine, and delivers even higher efficiency, better isolation and greater agility for enterprises in cloud and hybrid environments. GraalVM is ideal for cloud native environments because it starts services up to 100X faster and reduces memory usage up to 5X by compiling programs, including Java applications, ahead-of-time. Fast startup and low footprint makes GraalVM excellent for running microservices, Function-as-a-Service and service mesh.   Running a Netty.io microservice without GraalVM Enterprise and with GraalVM Enterprise Native Image.   GraalVM core features include: GraalVM Native Image, available as an early access feature –– allows scripted applications to be compiled ahead of time into a native machine-code binary GraalVM Compiler –– generates compiled code to run applications on a JVM, standalone, or embedded in another system Polyglot Capabilities –– supports Java, Scala, Kotlin, JavaScript, and Node.js Language Implementation Framework –– enables implementing any language for the GraalVM environment LLVM Runtime –– permits native code to run in a managed environment in GraalVM Enterprise Oracle GraalVM Enterprise Edition High-level Architecture   Efficiency GraalVM Enterprise contains optimization algorithms that seek out opportunities to accelerate application processes by rearranging compiled code. The addition of these, and other, algorithms typically provide an additional 20% application performance improvement, while at the same time reducing the memory footprint.  Examples include: Path Duplication –– specializes optimizations for each code path based on profiling Aggressive Method Inlining and Escape Analysis –– removes more unnecessary function calls in the GraalVM Enterprise Compiler than any other compiler Advanced Vectorization –– uses optimistic aliasing and high-level map/reduce/fill vector analysis to vectorize complex loops GraalVM Enterprise shows up to 3x performance improvements on a wide variety of measurements in the new JVM benchmark called “Renaissance,” which was accepted at the most prestigious programming language conference — PLDI.  The benchmark and performance results are maintained by Charles University in Prague. Security GraalVM Enterprise also includes security features to address some of the common sources of security application vulnerabilities, including buffer overflows in native code. Most real-world applications today in managed languages like Java, JavaScript or Python include native libraries to improve performance of compute-intensive code.  However, these native libraries may form a back-door that could enable an attacker to bypass VM-level isolation features like bounds-checks and garbage collection, which increases the potential for security vulnerabilities for your application. Considering those issues, GraalVM Enterprise includes a “managed mode” for native libraries based on our LLVM bitcode runtime.  Safe Mode compiles even those portions of the application implemented in C code to use managed memory, garbage collection and bounds-checks, which help protect against common security applications vulnerabilities like buffer overflows.  In addition, GraalVM Native Image improves security by reducing your application attack surface by putting only the code needed by your application into the runtime, removing unused code that expands the attack surface. Agility The multilingual capabilities of GraalVM allow legacy applications to be modernized and new ones to be built faster. The open source library ecosystem for all of the supported GraalVM languages is available to your application, not just the one for the language in which you wrote the application. Legacy applications can be rewritten one piece at a time rather than all-at-once and new cloud microservices can mix multiple languages with no performance overhead. Developers can use diagnostic tools, including GraalVM Visual VM, NetBeans and Chrome debugging across language boundaries, resulting in faster diagnosis and development. GraalVM is designed to be embeddable in any other server or runtime with virtualized interfaces for any access points.  For example, GraalVM Enterprise is integrated into in Oracle Netsuite and the Oracle RDBMS Multilingual Engine. Try GraalVM Enterprise now:  GraalVM Enterprise is free for development and evaluation usage from the Oracle Technology Network.   GraalVM Enterprise is available for purchase and is free on Oracle Cloud. The full documentation for GraalVM Enterprise is now available on the Oracle documentation page.   Keep an eye out for more information via blog posts on graalvm.org.

Today, Oracle is announcing Oracle GraalVM Enterprise Edition. GraalVM Enterprise is built on the global standard for enterprise-class application development, Java SE.  GraalVM Enterprise is a...