Skip to content

Samples comparing popular Java frameworks: Spring, Quarkus, Micronaut, Helidon

License

Notifications You must be signed in to change notification settings

DataStax-Examples/java-framework-compare

Repository files navigation

A comparison of Java frameworks

This repo contains a microbenchmark that collects the compile time, startup time, memory usage, and load time of simple "Hello World"-like apps in Spring, Quarkus, Micronaut, and Helidon.

As always, you should do your own experimentation using samples that represent your real application.

Background

This is an adaptation of Matthias Graf’s original work.

This original work led to responses from the project maintainers, worth a view!

Running

Make sure you do all of the Prerequisites first!

To run the microbenchmark, execute the script in this repo measure.sh

cd <path-to-this-repo>/compare
./measure.sh

Prerequisites

DataStax Astra

  1. Create a free-forever Cassandra Database with DataStax Astra. Use the keyspace name ks1 and the username/password combo datastax/datastax when creating the db to make things easy. click here to get started 🚀

  2. Download the Secure Connect Bundle from the UI to your machine. link: docs

  3. Set the ENV variable ASTRA_DB_BUNDLE to the location of the secure connect bundle on your machine.

export ASTRA_DB_BUNDLE=<path-to-your-secure-connect-db.zip>

Apache JMeter

Install the jmeter tool and make it available via global jmeter command on your machine.

This repo is using jmeter for load-testing, i.e: jmeter -n -t loadtest.jmx -j jmeter.out -l jmeter.log To see more info on how to install JMeter, visit the installation guide.

If you are on Mac OSX you can leverage the brew tool:

brew install jmeter

Java

Install Java JDK (at least 1.8)

Docker

Install Docker: it is used to run the all microservices in this project:

GraalVM

If you want to run and collect measurements for quarkus-graal project, you need to have GraalVM installed:

  • Install GraalVM;

  • Install platform C developer tools:

    • Linux:

      • Make sure header files are installed on your system.

        • On Fedora sudo dnf install zlib-devel;

        • Otherwise sudo apt-get install libz-dev;

    • macOS:

      • xcode-select --install;

  • Set GRAALVM_HOME to your GraalVM Home directory e.g. /opt/graalvm on Linux or /path/to/GraalVM/Contents/Home on macOS;

About

Samples comparing popular Java frameworks: Spring, Quarkus, Micronaut, Helidon

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published