This project is an attempt to build a generic REST API with a CRUD of backend session and explores a reactive and event-driven stack. This is just an experiment. The first version is based on a Generic Task Demo Service.
The project uses Quarkus to build the CRUD API Rest service for (reduced and lightweight version) a backend/server session handling. The data persistance relies on DynamoDB. For reactive programming support it uses Vertx and Smallrye. The architecture follows the MicroProfile specification for building microservices and deliver portable applications across multiple runtimes. As an Event-Driven Backbone the project uses Kafka.
- Java 11
- Docker
- Gradle
- GraalVM 20
- Spin up dependencies:
make docker.run.dependencies
: Kafka + DynamoDB - Run SUSE
./gradlew quarkusDev
- The folder
postman
includes the CRUD requests to test.
The default profile is dev
- Set
quarkus.package.type:native
in application configuration - Build the application:
./gradlew quarkusBuild
- Grab a coffee and wait :)
- Build the docker image:
docker build -f src/main/docker/Dockerfile.native -t suse/suse .
- Run the docker container:
docker run -i --rm -p 8080:8080 suse/suse
- Set
quarkus.package.type:fast-jar
in application configuration - Build the application:
./gradlew quarkusBuild
(or./gradlew quarkusBuild --fast-jar
) - Build the docker image:
docker build -f src/main/docker/Dockerfile.jvm -t suse/suse .
- Run the docker container:
docker run -i --rm -p 8080:8080 suse/suse
- Set
quarkus.package.type:uber-jar
in application configuration - Build the application:
./gradlew quarkusBuild
(or./gradlew quarkusBuild --uber-jar
) - Build the docker image:
docker build -f src/main/docker/Dockerfile -t suse/suse .
- Run the docker container:
docker run -i --rm -p 8080:8080 suse/suse
make docker.build
make docker.run.suse
curl http://localhost:8080/reactive/ping
to check service is UP.
-
Build the application:
./gradlew quarkusBuild
-
Build the docker image:
docker build -f src/main/docker/Dockerfile.jvm -t suse/suse .
- If you have environment variable
KAFKA_BOOTSTRAP_SERVERS=some-ip:9092
, it will take precedence.
- Performance Benchmark
- ETag header implementation for Optimistic Locking
coming soon
coming soon...