Throughout this workshop we are going to work with an example application named UnicornStore.
The UnicornStore is a Spring Boot Java Application that provides CRUD-Operations for Unicorn-Records. It stores them in a relational database (Postgres) and publishes and event afterwards in an eventbus (EventBridge).
The following diagram shows the outcome after applying the instructions of the first lab:
-
(1) End-User can interact with the service via a REST-API that provides basic CRUD operations
POST /unicorns - Create a new unicorn
PUT /unicorns/{id} - Update an existing uncicorn
GET /unicorns/{id} - Retrieve an existing unicorn
DELETE /unicorns/{id} - Delete an existing unicorn -
(2) The API Gateway proxies the request to the Lambda Function
-
(3) The application communicates with the database and the eventbus. Depending on the service this can be in the same VPC or within the AWS Network.
You will migrate your existing application to work with Spring Cloud functions and understand the differences in design and performance.
You will look at alternatives such as compile-time frameworks & an implementations without a framework to understand the implications.
The following script will build the infrastructure stack via AWS CDK.
./setup-infrastructure.sh
To deploy the different applications use:
./deploy.sh spring #(or quarkus, micronaut, spring-graalvm)
To run a load test for the Spring-App use the following script:
./benchmark.sh spring #(or quarkus, micronaut, spring-graalvm)
The project uses CDK-Nag to identify issues with the environment configuration. Since this is workshop environment we are not using all the capabilities that you might need in production (E.g. Multi-AZ setup). Please refer to the CDK-Nag suppressions in the CDK-App to identify certain choices we have made for this setup.