The Booking subdomain has the following DB-Related out adapters implemented:
- JPA adapter (see
booking/booking-adapter-out-jpa
), - JDBI adapter (see
booking/booking-adapter-out-jdbi
), - DynamoDB adapter (see
booking/booking-adapter-out-dynamodb
).
The first two above-mentioned adapters can be used to access a relational database (e.g. MySQL, PostgreSQL, etc.) and are mapping onto the same database structure. The latter adapter is tight to a specific database product - DynamoDB which is a NoSQL database.
The Booking subdomain has the following REST-related in adapters implemented:
- Spring Web MVC (see
booking/booking-adapter-in-springweb
), - JAX-RS API with RESTEasy implementation provided by Quarkus (see
booking/booking-adapter-in-quarkusweb
), - AWS Lambda adapter (see
booking/booking-adapter-out-awslambda
).
The Booking (micro)service / app can be started using the following configurations:
-
Spring Boot
application (seeconfiguration/springboot
) combines the following adapters:- Spring Web MVC
- JPA adapter. This can be changed by using
jdbi
Spring profile - then thejdbi
implementation will be used. It is noteworthy, thatjdbi
implementation still usesauto ddl
code fromjpa
- it is okay for time being as we do not have Liquibase/Flyway solution in place (yet).
-
Quarkus
application (seeconfiguration/quarkus
) combines the following adapters:- JAX-RS
- JPA adapter
-
AWS Lambda
application (seeconfiguration/awslambda
) combines the following adapters:The automatic deployment to AWS is implemented using the Serverless Framework and the CircleCI platform. The Booking service (its Table endpoint) is available here. Be patient: the cold start takes about 6 seconds while the hot one about 0.3 seconds.
-
Quarkus
onAWS Lambda
application (seeconfiguration/quarkus-awslambda
) combines the following adapters:This is in fact a Quarkus application which uses the
quarkus-amazon-lambda-http
andquarkus-amazon-dynamodb
extensions. During the build on the CircleCI platform, theQuarkus
app is built with with GraalVM and the native executable is then deployed using the Serverless Framework. The Booking service (its Table endpoint) is available here. Now the cold start takes about 1 second while the hot one is more or less the same.