Skip to content

Commit

Permalink
B4 small changes (#229)
Browse files Browse the repository at this point in the history
* Update page

* add video and small change

* final version
  • Loading branch information
rz-p authored Feb 9, 2023
1 parent 99a3cad commit 5ed6888
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions content/ws22/bachelor/b4-rearchitecting-services/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ supervisor = "Robert Wolff"
{{<image src="diagram.png" alt="Mockup" >}}


{{<mediathek id="e0221113f99e391d3e8f3e59d05eb160" title="How it works">}}


{{<section title="Our Goal">}}
The template was created to:
- demonstrate to other engineers at idealo how to work with AWS CDK and serverless resources, show how easy they are to set up and what they can do
Expand Down
8 changes: 4 additions & 4 deletions content/ws22/bachelor/b4-rearchitecting-services/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ weight = 1

{{<section title="Features">}}
There are two parts of the template:
- the infrastructure part (tells what ressources to deploy to AWS)
- the infrastructure part (tells what resources to deploy to AWS)
- the business logic part (the code itself that runs in the Lambda)

The CDK pattern is generic: the API Gateway receives traffic (we get some data about favorite colors, snacks and movies with different data types in JSON format) and then it is passed to the Lambda function. It doesn't matter if the incoming data is valid or not, it will be saved to the S3 bucket, but if the validation does succeed, it will also be sent to the SQS Queue from where it can be used for various internal idealo needs.
The AWS setup is generic: the API Gateway receives traffic (we get some data about favorite colors, snacks and movies with different data types in JSON format) and then it is passed to the Lambda function. It doesn't matter if the incoming data is valid or not, it will be saved to the S3 bucket, but if the validation does succeed, it will also be sent to the SQS Queue from where it can be used for various internal idealo needs.
## Happy path (incoming data is valid):
A POST request is given to an HTTP endpoint hosted by AWS, if the incoming data in JSON format contains valid properties, the HTTP response has a status code of 200 and the response body contains "[accepted]", the request is redirected to the Lambda function and is saved as a text file (named with a timestamp and date) to the S3 bucket in the "valid" folder, the same result is passed to the SQS Queue.
A POST request is sent to an HTTP endpoint hosted by AWS, if the incoming data in JSON format contains valid properties, the HTTP response has a status code of 200 and the response body contains "[accepted]", the request is redirected to the Lambda function and is saved as a text file (named with a timestamp and date) to the S3 bucket in the "valid" folder, the same result is passed to the SQS Queue.
{{<image src="valid.png">}}

## Failure path (incoming data is invalid):
Expand All @@ -21,7 +21,7 @@ If the incoming data does not match the expected data, the HTTP response has a s
{{<section title="Template advantages">}}
- you can change the infrastructure anytime and it will not break, because there is 85% of tests coverage for it
- it’s a really robust template which with the push of one button in GitHub can deploy the entire infrastructure to AWS and with that you can do message processing in the Cloud
- it’s scalable, you never have to worry about how many or how few people are calling this, if nobody is using the infrastructure then you are not paying money
- it’s scalable, you never have to worry about how many people are calling this, if nobody is using the infrastructure then you are not paying money
{{<image src="pros.png" alt="Mockup" >}}
{{</section>}}

Expand Down

0 comments on commit 5ed6888

Please sign in to comment.