Please check the TechStack.md file for details.
This repo is the official support repo to my article on medium:
- Stamps and Coins Demo - Module used to create Demo data. It sends Coin and Stamps images and it can generate the initial data
- Stamps and Coins Common - Contains common libraries, namely, Data Transfer Objects, Domain model
- Stamps and Coins Common Cloud - Contains common libraries for the cloud projects.
- Stamps and Coins Batch - Spring batch Quartz based Jobs. They dump the data from PostgreSQL to a file and ship it to S3. Another Job retrieves the data, unpacks it and sends it to DynamoDB.
- Stamps and Coins Service - This is our starting point. It contains a Reactive Application which uses PostgreSQL using R2DBC repos on coroutines
- Stamps and Coins Local Stack Service - This application serves data in the same way as the above except that it connects to DynamoDB. All Localstack implementations are manual
- Stamps and Coins Web - Front End Application to explore the different implementations. Pagination is implemented
- Stamps and Coins Cloud Server - Uses automated configuration and tries to use Localstack as much as possible.
- Stamps and Coins Blocking Service - The initial application that started this project back in April 2021. It is now a login authentication/authorization security exploration module, which contains implementations of BASIC Auth, OAUTH2 local Auth and OAUTH with GitHub.
Be sure to have Docker installed
Be sure to have SDK-MAN installed for this to work. You can choose another way. It is only important to have JDK17 installed to have this working.
. ./sdk17.sh
. ./bash/k8s-setup.sh
. ./bash/docker-setup.sh
make docker-clean-build-start
- Endpoint: http://localhost:8080
These containers take a while to start, so depending on your machine, the containers can start in anywhere between 10 seconds up to 5 minutes. Keep checking the logs with
docker logs
ordocker-compose logs
.
To visualize these diagrams you may need the mermaid-diagrams plugin installation.
To visualize them in Intellij, please install the mermaid plugin.
sequenceDiagram
participant User
participant StaCo App
participant StaCo Service
participant PostgreSQL Database
rect rgb(200,200,200)
User->>StaCo App: User logs into application
StaCo App->>StaCo Service: A list of coins and stamps is requested by filter
StaCo Service->>PostgreSQL Database: Data is fetched via the filter
PostgreSQL Database ->>StaCo Service: Data is returned
StaCo Service->>StaCo App: Minimal data manipulation and return
StaCo App->>User: Results given to the User
end
sequenceDiagram
participant Web
participant Reactive Service
participant Localstack Reactive Service
participant Batch
participant Blocking Service
participant Cloud Service
participant PostgreSQL Database
participant S3
participant DynamoDB
participant SSM
rect rgb(200,200,200)
Web->>Reactive Service: User logs into application
Web->>Blocking Service: User logs into application
Web->>Blocking Service: User asks data from application
Reactive Service->>PostgreSQL Database: Request Data
PostgreSQL Database->>Reactive Service: Returns Data
Reactive Service->>Web: Returns Data
Web->>Localstack Reactive Service: User asks data from application
Localstack Reactive Service->>DynamoDB: Requests Data
DynamoDB->>Localstack Reactive Service: Sends data back
Localstack Reactive Service->>Web: Sends data back
Batch->>PostgreSQL Database: Requests Data
PostgreSQL Database->>Batch: Sends Data Back
Batch->>Batch: Processes data and creates CSV
Batch->>S3: Sends GZ file
Batch->>S3: Asks for data
S3->>Batch: Sends GZ file back
Batch->>Batch: Uncompresses file
Batch->>DynamoDB: Saves data in data base
Reactive Service->>SSM: Startup
SSM->>Reactive Service: Configuration Data
Localstack Reactive Service->>SSM: Startup
SSM->>Localstack Reactive Service: Configuration Data
Batch->>SSM: Startup
SSM->>Batch: Configuration Data
Cloud Service->>SSM: Startup
SSM->>Cloud Service: Configuration Data
end
To make it easy for you, I've created a few scripts to run this demo in a seamless way.
The most important script however, is the demo-full-manual
.
If you run:
make demo-full-manual
Then just wait until it completes. The cypress pop-up will appear. You can then start the tests manually and see how this application works!
You can make tests for this application using the Swagger UI at:
- Stamps and Coins LocalStack Service stamps-and-coins-ls-service 8080
- Stamps and Coins LocalStack Service stamps-and-coins-ls-service 8082 (local)
- Stamps and Coins Reactive Service stamps-and-coins-ls-service 8080
- Stamps and Coins Reactive Service stamps-and-coins-ls-service 8081 (local)
- you need to learn AWS RIGHT NOW!! (Amazon Web Services)
- Top 50+ AWS Services Explained in 10 Minutes
- Spring Boot CRUD Example using AWS DynamoDB
- Setting up AWS v2 with Spring Boot and Localstack
- Running AWS Services In A Laptop Using LocalStack
- How to externalize Spring Boot Properties to an AWS System Manager Parameter Store
- Representational state transfer
- REST (REpresentational State Transfer)
- Wat is on-premise en wat is de cloud?
- Who Coined 'Cloud Computing'?
- The history of cloud computing
- My First 12 Years at Amazon.com
- A Brief History of AWS
- When to use (and when not to use) DynamoDB Filter Expressions
- DynamoDB Scan vs Query - Everything You Need To Know
- What is "/var/folders"?
- From PostgreSQL to DynamoDB
- Amazon Web Services Systems Manager
- Don’t Be Intimidated — Learn How to Run AWS on Your Local Machine With LocalStack
- Spring Boot Integration Tests With AWS Services Using LocalStack
- Using LocalStack for Development Environments
- Configuring Docker Swarm as Container Orchestrator on Windows
- What is a Docker Swarm
- Kubernetes vs. Docker
- Working with Queries in DynamoDB
- How to determine if Amazon DynamoDB is appropriate for your needs, and then plan your migration
- 5 Use Cases for DynamoDB
- Local Stack Pro Features
- LocalStack
- LocalStack Cloud