This project contains a simple implementation of a Book Store REST API using various frameworks for benchmarking purposes.
The main endpoints of the API consists of:
- HTTP GET /books?limit= to fetch a list of books of size
- HTTP GET /books/<BOOK_ID> to fetch a specific book by id
- HTTP POST /books to create a new book entity
Currently you can find the following implementations of the Book Store REST API:
If you want to contribute to the project please add your implementation following the conventions set by the preceding examples. For example if you want to add a new service based on a specific Rust framework like Rocket.rs then create a new folder named bookstore-rocketrs and put your implementation there.
To honour consistency please create the following REST APIs:
- HTTP GET /books?limit= to fetch a list of books of size
- HTTP GET /books/<BOOK_ID> to fetch a specific book by id
- HTTP POST /books to create a new book entity
- HTTP DELETE /books/<BOOK_ID> to delete a specific book by id
- HTTP DELETE /books to delete all the books
You can find a simple Postman collection for calling the API here
The Book Entities should be stored and fetched from a Postgres Database. For local development you can use the docker compose file
You can locally load and stress test your service using the k6 scripts you will find under benchmarks
We have used terraform to create the infrastructure for the project and deploy the services to AWS ECS with Fargate. You can find the terraform scripts here. After you have finished implementing and testing locally the API please proceed with adapting the Terraform Scripts to deploy your solution to our infrastructure.
Currently we have 5 GitHub Actions defined to create and push the docker images for the services to our ECR registry and an action to plan and apply terraform changes. You can find the actions here For every new service created we have to define a new action to build and push the docker image to our ECR registry.
Currently, there exists a limited out-of-the-box support for Kubernetes deployments.
The GitHub Actions workflows starting with the k8s-
prefix automatically deploy the services to a configurable k8s instance.
- Spring Boot vs Quarkus Part 1 https://medium.com/arconsis/spring-boot-vs-quarkus-6f44421b7213
- Spring Boot vs Quarkus Part 2 https://medium.com/arconsis/spring-boot-vs-quarkus-part-2-jvm-runtime-performance-af45d0db116e
- Intro to AWS and Terraform https://www.youtube.com/watch?v=y4Z0IwoCLQc