https://github.com/stevenjdh/quarkus-surmiser-app
A kubernetes cloud native microservice using Quarkus, the the Supersonic Subatomic Java Framework.
https://github.com/stevenjdh/quarkus-surmiser-app
cloudnative demo graalvm kubernetes microservice quarkus
Last synced: about 2 months ago
JSON representation
A kubernetes cloud native microservice using Quarkus, the the Supersonic Subatomic Java Framework.
- Host: GitHub
- URL: https://github.com/stevenjdh/quarkus-surmiser-app
- Owner: StevenJDH
- License: gpl-3.0
- Created: 2020-07-02T09:16:33.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-01-27T18:12:17.000Z (over 2 years ago)
- Last Synced: 2025-03-31T08:21:14.152Z (about 1 year ago)
- Topics: cloudnative, demo, graalvm, kubernetes, microservice, quarkus
- Language: HTML
- Homepage:
- Size: 431 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Surmiser

[](https://app.codacy.com/gh/StevenJDH/quarkus-surmiser-app/dashboard?utm_source=github.com&utm_medium=referral&utm_content=StevenJDH/quarkus-surmiser-app&utm_campaign=Badge_Grade)
[](https://sonarcloud.io/dashboard?id=StevenJDH_quarkus-surmiser-app)
[](https://sonarcloud.io/dashboard?id=StevenJDH_quarkus-surmiser-app)
[](https://sonarcloud.io/dashboard?id=StevenJDH_quarkus-surmiser-app)
[](https://sonarcloud.io/dashboard?id=StevenJDH_quarkus-surmiser-app)
[](https://sonarcloud.io/dashboard?id=StevenJDH_quarkus-surmiser-app)
[](https://sonarcloud.io/dashboard?id=StevenJDH_quarkus-surmiser-app)
[](https://sonarcloud.io/dashboard?id=StevenJDH_quarkus-surmiser-app)
[](https://sonarcloud.io/dashboard?id=StevenJDH_quarkus-surmiser-app)
[](https://sonarcloud.io/dashboard?id=StevenJDH_quarkus-surmiser-app)


Surmiser was develop to demo the use of [Quarkus](https://quarkus.io), 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](https://genderize.io), [Agify.io](https://agify.io), and [Nationalize.io](https://nationalize.io), which it uses to produce a determination based on the supplied name.
[](https://www.buymeacoffee.com/stevenjdh)
## 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:
```bash
./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](https://github.com/StevenJDH/quarkus-surmiser-app/wiki/FAQ)
## Want to show your support?
|Method | Address |
|---------------:|:------------------------------------------------------------------------------------------|
|PayPal: | [https://www.paypal.me/stevenjdh](https://www.paypal.me/stevenjdh "Steven's Paypal Page") |
|Cryptocurrency: | [Supported options](https://github.com/StevenJDH/StevenJDH/wiki/Donate-Cryptocurrency) |
// Steven Jenkins De Haro ("StevenJDH" on GitHub)