Git Product home page Git Product logo

quarkus-surmiser-app's Introduction

Surmiser

build-test Codacy Badge Quality Gate Status Maintainability Rating Reliability Rating Technical Debt Sonar Violations (long format) Security Rating Vulnerabilities Coverage Lines of Code Maintenance GitHub

Surmiser was develop to demo the use of Quarkus, the Supersonic Subatomic Java Framework, to create a cloud native microservice that exposes a few APIs for testing. The app surmises about a person's name to predict their gender, age, and nationality. The service is powered by Genderize.io, Agify.io, and Nationalize.io, which it uses to produce a determination based on the supplied name.

Buy me a coffee

Features

  • Third-party service consolidation using MicroProfiling.
  • In memory database with Hibernate for history persistent storage while testing.
  • Logging of requests using an HTTP interceptor.
  • Can be run in JVM mode, or it can be compiled to Native code (Linux, Windows, and macOS) for millisecond speeds with a low memory footprint.
  • Liveness and Readiness health checks with some being integrated automatically like for the DB.
  • Retry, circuit breaker, and fallback fault tolerance strategies using MicroProfiling.
  • Automated testing using REST-assured.
  • Automatic YAML generation for Kubernetes or containerized environments.

Endpoints

Below are the API references used in the demo that are exposed on port 8080.

GET /api/person?name={name}
GET /api/history
GET /api/history?name={name}
GET /q/health
GET /q/health/live
GET /q/health/ready

The APIs can also be tested using the interactive swagger documentation located at localhost:8080/q/swagger-ui.

Running the application in dev mode

You can run the application in dev mode that enables live coding using:

./mvnw quarkus:dev

Packaging and running the application

The application can be packaged using ./mvnw package. It produces the surmiser-app-1.0-SNAPSHOT-runner.jar file in the /target directory. Be aware that it’s not an über-jar as the dependencies are copied into the target/lib directory.

The application is now runnable using java -jar target/surmiser-app-1.0-SNAPSHOT-runner.jar.

Creating a native executable

You can create a native executable using: ./mvnw package -Pnative.

Or, if you don't have GraalVM installed, you can run the native executable build in a container using: ./mvnw package -Pnative -Dquarkus.native.container-build=true.

You can then execute your native executable with: ./target/surmiser-app-1.0-SNAPSHOT-runner

If you want to learn more about building native executables, please consult https://quarkus.io/guides/building-native-image.

Do you have any questions?

Many commonly asked questions are answered in the FAQ: https://github.com/StevenJDH/quarkus-surmiser-app/wiki/FAQ

Want to show your support?

Method Address
PayPal: https://www.paypal.me/stevenjdh
Cryptocurrency: Supported options

// Steven Jenkins De Haro ("StevenJDH" on GitHub)

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.