Giter Site home page Giter Site logo

graal-containers's Introduction

graal-containers

Intro

This repo will walk you through building containerised apps with GraalVM Native Image

We will be using a Spring Boot application as our test-bed. This is a fairly simple app that genertes nonse verse, in the style of the poem Jabberwocky (by Lewis Carrol). To dthis remarkable fet it uses a Markov hain to model the text of the original poem and this model is then used to generate random text that appear to be like the original.

Build the App

A shell script has been added that builds the Java (using mvn) and then builds a docker image

$ ./step0.sh

You can see the docker image with:

$ docker images
REPOSITORY                                     TAG               IMAGE ID       CREATED        SIZE
localhost/jibber                               jdk.0.1           ff10601f53a3   17 hours ago   598MB

You can now build a GraalVM Native Image version of this app and generate a docker image from it with the following script:

$ ./step1.sh

Running the App

A Docker Compose has ben provided that will start the contianer, plus cAdvisor and Prometheus. These other tools will allow us to generate pretty graphs of the RSS (Resident Set Size) for the application running in the container.

This will now start the folloing versions of the apps, on differnt ports:

$ docker-compose up -d

Reviewing the Performance

You can access the app over the following URL (depending on where you run it you may need to setup port forwarding):

Jibber Endpoint

Run the followinf script to get som efun stats on the container, start-up times and latency for the end point:

$ ./stats.sh

Stopping the App

$ docker-compose stop

graal-containers's People

Contributors

czelabueno avatar krisfoster avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.