JavaEE workshop #8
Kuba Hejda
(Runtime of backend apps, Cloud, AWS
Scheduling, Files, Javadoc)

Content
- What is cloud? ( baby don't hurt meee, .. )
- Terminology
- Delivery model
- Deployment model
- AWS
- Basics
- Console
- EC2
- S3
- Runtime of Spring app
- Scheduling
- Javadoc
- Files handling
What is cloud?
- Not only GCloud, AWS, Azure, GeeToo, ..
- It's about the mindset
- Something is easier, something is more complex
- Solves infrastrucure challenges
- Solves geographical challenges
- Solves real-time scaling challenges
- Solves "do not reinvent the wheel" challenges
Deployment model

Delivery model

AWS vs Azure vs GCloud
- AWS
- biggest (33 % of the market)
- largest toolset
- public cloud based
- sometimes confusing pricing
- Azure
- around 18% market share
- enterprise customers
- Working well with other Microsoft technologies
- Google Cloud
- youngest and smallest
- enterprise customers are not priority
- focus on machine learning, data analysis, cloud deep learning, ..
AWS
- Many many many many services
- Process tools
- Code commit
- Pipelines
- Storage tools
- Databases (SQL/NoSQL)
- S3
- Runtime tools
- EC2
- EKS
- Lightsail
- Lambda
- Infrastructure
- Api Gateway
EC2
-
Amazon Elastic Compute Cloud
-
Has a free tier
-
Provides scalability
-
Nearly 400 instances for virtually every business need
-
Only cloud provider that supports macOS
-
25 regions and 80 availability zones globally
-
Choice of Intel, AMD, and Arm-based processors
S3
-
Amazon Simple Storage Service
-
Stores files in BUCKETs
-
Fast
-
Scalable
-
https://aws.amazon.com/s3/?nc2=h_ql_prod_fs_s3

Free tier
-
https://aws.amazon.com/free/?nc2=h_ql_pr_ft&all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all
java -jar vs. docker
- java -jar myapp.jar
- easiest way
- must have java on required version installed
- requires a custom script to start the app automatically
- path to config can be given by --spring.config.location={path} parameter
- docker
- sometimes unavailable
- everything packed together
- we need to produce a docker image
Scheduling
- used for periodical jobs in spring
- @Scheduled
- many options how to trigger the job
- fixedRate
- cron
- delay
- ...
Files in spring
- most of the time MultipartFile used
- request can contain multiple files
- retrieving a file as BYTEARRAY_OUTPUT_STREAM or an actual file type (i. e. application/pdf)
- often supplied with Content-Disposition header containing filename and the disposition
- attachment - browser download dialog
- inline - opens in browser directly
- often supplied with Content-Disposition header containing filename and the disposition
Javadoc
- The common way to document stuff
- Used by every library and every company
- Usually on interfaces and dtos only
- @param, @return, @see, @link, @deprecated
Q & A
ITA 08 - Workshop 08
By IT-absolvent
ITA 08 - Workshop 08
Workshop #7
- 297