Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Java Developer on AWS 在AWS上開發Java應用

103 visualizaciones

Publicado el

Java 應用程序一直都是企業當中不可或缺的重要平台之一,隨著市場變化與追求更好地應對市場挑戰,將傳統的 Java 應用程序搬遷上雲成了當前重要的話題。在這個主題當中我們將探討在整個 Java Eco-System 的變化,以及有哪些工具可以幫助企業在做應用系統重整與搬遷時,帶來雲端服務便利與整合的好處。

  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Java Developer on AWS 在AWS上開發Java應用

  1. 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Java Developer on AWS Kim Kao Solutions Architect Amazon Web Services Domain Driven Design(DDD Taiwan)
  2. 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Broadest and deepest platform choice
  3. 3. Java on Servers
  4. 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Broadest and deepest platform choice • Purchase Options (On-demand, Reserved, Spot, Dedicated) • Manufacturer (Intel, AWS, Amazon) • Virtualization Type (Paravirtual, HVM, Bare Metal) • CPU (up to 128 on x1 and x1e, 488 Logical Proc on .metal) • Memory (up to 4T on x1e, 12T on Y) • Disk (up to 48TB HDD / 16 TB NVMe SSD) • Network (up to 100Gb) • GPU (up to 8 NVIDIA Tesla V100) • FPGA (up to 8 Xilinx Virtex UltraScale+ VU9P FPGAs)
  5. 5. .jar .war
  6. 6. Java Containers
  7. 7. Pick the right tool for the job Create new compositions easily Improve resilience and security Experiment and fail safely Lower costs with granular scaling Adopt technology faster Optimize team productivity Deploy features safely and quickly Eight reasons why Amazon uses microservices
  8. 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Comparison of operational responsibility AWS Lambda Serverless functions AWS Fargate Serverless containers ECS/EKS Container-management as a service EC2 Infrastructure-as-a-Service More opinionated Less opinionated AWS manages Customer manages • Data source integrations • Physical hardware, software, networking, and facilities • Provisioning • Application code • Container orchestration, provisioning • Cluster scaling • Physical hardware, host OS/kernel, networking, and facilities • Application code • Data source integrations • Security config and updates, network config, management tasks • Container orchestration control plane • Physical hardware software, networking, and facilities • Application code • Data source integrations • Work clusters • Security config and updates, network config, firewall, management tasks • Physical hardware software, networking, and facilities • Application code • Data source integrations • Scaling • Security config and updates, network config, management tasks • Provisioning, managing scaling and patching of servers
  9. 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Containers and Microservices • Do one thing, really well • Any app, any language • Test and deploy same immutable artifact • Self-contained services • Isolated execution environment • Faster startup • Scaling and upgrading Container Container Container Container
  10. 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Elastic Container Service for EC2 Scheduling and Orchestration Cluster Manager Placement Engine ECS AMI Docker Agent ECS Agent Container 1 Container 2 Container 3 Instances X1 Instance Spot Instance
  11. 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Elastic Container Service for Fargate Scheduling and Orchestration Cluster Manager Placement Engine Container 1 Container 2 Container 3 Micro VMs Firecracker
  12. 12. Fargate Cluster construction --launch-type FARGATE
  13. 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Fargate CLI – Way to easy control container https://github.com/jpignata/fargate https://github.com/humank/fargate-java-sample
  14. 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Features on Fargate CLI • Task – Whole lifecycle for ECS task • Service – Create services within desired vpc, subnet, and count • Load Balancers – easy to create for web integration • Certificates – Import certs from ACM • Easy Scale in, Scale out in 1 line command
  15. 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon EKS mycluster.eks.amazonaws.com EKS workers Kubectl AZ 1 AZ 2 AZ 3 Your AWS account VPC
  16. 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kubernetes control plane Highly available and single tenant infrastructure All “native AWS” components Fronted by an NLB VPC API Server ASG Etcd ASG NLB AZ-1 AZ-2 AZ-3 ELB Instances Instances
  17. 17. Java Functions
  18. 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Enabling new application patterns Serverless at scale Excelling in Service Fundamentals SQS as an event source Improved fan-out 5X faster reads from Kinesis Increase to 15 minute functions Empowering Developers Simplified debugging with SAM CLI and Go debugger Support for Go, Powershell, Node 8, .Net Core2.1, and Python 3.7
  19. 19. N E W ! Languages Lambda support for Ruby + Bring any Linux compatible language runtime; Powered by new Runtime API - Codifies the runtime calling conventions and integration points Same technology powering Ruby support in AWS Lambda Bring any Linux compatible language runtime Custom Runtimes + AWSOPENSOURCE o f f e r e d b y o f f e r e d b y o f f e r e d b y o f f e r e d b y PARTNERSUPPORTED
  20. 20. N E W ! Extend the Lambda execution environment with any binaries, dependencies, or runtimes Lambda Layers BUSINESS LOGIC LIB A LIB B BUSINESS LOGIC LIB A LIB B BUSINESS LOGIC LIB A LIB B BUSINESS LOGIC LIB A LIB B Programming Model Before BUSINESS LOGIC BUSINESS LOGIC BUSINESS LOGIC BUSINESS LOGIC LIB A LIB B After
  21. 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Run Java as a binary execution
  22. 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Improving startup time in Java functions • Package Size • Resource Polling • Database Connections • Worker Threads • Classpath Scanning • JVM Ergonomics • Eager Initialization • Network / FileSystem
  23. 23. Java Streaming Analytics
  24. 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What is streaming data? Typical characteristics Low-latencyContinuous Ordered, incremental High volume
  25. 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why streaming data? Get actionable insights quickly Source: Perishable insights, Mike Gualtieri, Forrester Real time Seconds Minutes Hours Days Months Valueofdatatodecision-making Preventive/Predictive Actionable Reactive Historical Time critical decisions Traditional “batch” business intelligence
  26. 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Streaming with Amazon Kinesis Easily collect, process, and analyze video and data streams in real time Capture, process, and store video streams Load data streams into AWS data stores Analyze data streams in real time Capture, process, and store data streams
  27. 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Apache Flink: Stateful Computations over Streams
  28. 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Apache Flink: Stateful Computations over Streams
  29. 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS operational responsibility models On-Premises Cloud Less More Compute Virtual Machine EC2 Elastic Beanstalk AWS LambdaFargate Databases MySQL MySQL on EC2 RDS MySQL RDS Aurora Aurora Serverless DynamoDB Storage Storage S3 Messaging ESBs Amazon MQ Kinesis SQS / SNS Analytics Hadoop Hadoop on EC2 EMR Elasticsearch Service Athena
  30. 30. Tools
  31. 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS JVM Ecosystem AWS SDK for Java Kinesis Consumer Library Kinesis Producer Library Kinesis S3 Transfer Manager S3A Hadoop FS S3 Encryption Client Amazon S3 DynamoDB Mapper DynamoDB Document API DynamoDB Encryption Client Amazon DynamoDB DynamoDB Accelerator (DAX) Client SWF Flow Library Step Functions DSL Workflow Eclipse Toolkit Beanstalker Maven Plugins Client-Side Build Tools Third Party Scala SDKs SQS Extended Client Library IAM Policy DSL Java Mail Client for SES Other Code Deployment AWS CodeStar AWS CodeDeploy AWS CodePipeline Execution Environments AWS Elastic Beanstalk AWS Lambda Amazon EMR Amazon ECSAmazon EC2 Ships with SDK (v1) AWS Open Source 3rd Party Open Source AWS Services Legend Ships with SDK (v2)
  32. 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T SnsClient.builder() .region(Region.US_WEST_2) .httpClient(UrlConnectionHttpClient.create()) .build(); SnsClient.builder() .region(Region.US_WEST_2) .overrideConfiguration( ClientOverrideConfiguration.builder() .apiCallTimeout(Duration.ofSeconds(5)) .build()) .build(); SnsClient.builder() .region(Region.US_WEST_2) .overrideConfiguration(o -> o.apiCallTimeout(Duration.ofSeconds(5))) .build(); SnsAsyncClient.create() SnsClient.builder() .region(Region.US_WEST_2) .credentialsProvider(ProfileCredentialsProvider.create()) .build(); AWS Java SDK v2 Non-blocking Asynchronous Service Clients Immutability through Builder Pattern Pluggable HTTP Clients Consumer Builder Pattern
  33. 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS SDK for Java v2 Modularized Endpoint Discovery HTTP/2 Event Streaming Fully Non-Blocking HTTP/2 Clients Bi-directional real-time streaming responses URLConnection as http client Moved off of Jackson Object Mapper at runtime Generate resources at compile time
  34. 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Toolkits for IntelliJ IDEA & Pycharm Make it easier to develop on AWS Open Source Initial focus: Serverless AWS Lambda AWS SAM CLI Integration Local debugging Serverless application support Basic resource/credential management Will grow support across AWS aws.amazon.com/intellij
  35. 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Infrastructure as code Higher-level abstractions Object oriented & extensible Native IDE support Open source https://github.com/awslabs/aws-cdk Currently in developer preview AWS Cloud Development Kit
  36. 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Simple CDK example Stack
  37. 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Synthesized Template { "Resources": { "Queue4A7E3555": { "Type": "AWS::SQS::Queue", "Properties": { "VisibilityTimeout": 300 } }, "QueuePolicy25439813": { "Type": "AWS::SQS::QueuePolicy", "Properties": { "PolicyDocument": { "Statement": [ { "Action": "sqs:SendMessage", "Condition": { "ArnEquals": { "aws:SourceArn": { "Ref": "TopicBFC7AF6E" } } }, "Effect": "Allow", "Principal": { "Service": "sns.amazonaws.com" }, "Resource": { "Fn::GetAtt": [ "Queue4A7E3555", "Arn" ] } } ], "Version": "2012-10-17" }, "Queues": [{ "Ref": "Queue4A7E3555" }] } }, "TopicBFC7AF6E": { "Type": "AWS::SNS::Topic", "Properties": { "DisplayName": "Some Amazing Topic" } }, "TopicQueueSubscription2D098ED4": { "Type": "AWS::SNS::Subscription", "Properties": { "Endpoint": { "Fn::GetAtt": [ "Queue4A7E3555", "Arn" ] }, "Protocol": "sqs", "TopicArn": { "Ref": "TopicBFC7AF6E" } } } } }
  38. 38. Java Platform
  39. 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon Corretto • Amazon supported distribution of OpenJDK • Run internally on thousands of production services • Multiplatform: Amazon Linux 2, Windows, macOS, Docker, Ubuntu, etc. • No cost – Distributed under open source license - no charge for use or distribution • No cost LTS (patches, performance improvements) • Corretto 8 in preview, Corretto 8 & 11 expected to GA Q1 2019 • Open source – all patches and enhancements will be upstreamed to OpenJDK - https://github.com/corretto • More info - https://aws.amazon.com/corretto
  40. 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS JVM Ecosystem Kinesis Consumer Library Kinesis Producer Library Kinesis/Streaming S3 Transfer Manager S3A Hadoop FS S3 Encryption Client Amazon S3 DynamoDB Mapper DynamoDB Document API DynamoDB Encryption Client Amazon DynamoDB DynamoDB Accelerator (DAX) Client SWF Flow Library Step Functions DSL Workflow Eclipse Toolkit Beanstalker Maven Plugins Client-Side Build Tools Third Party Scala SDKs SQS Extended Client Library IAM Policy DSL Java Mail Client for SES Other Code Deployment AWS CodeStar AWS CodeDeploy AWS CodePipeline Execution Environments AWS Elastic Beanstalk AWS Lambda Amazon EMR Amazon ECSAmazon EC2 Ships with SDK (v1) AWS Open Source 3rd Party Open Source AWS Services Legend Ships with SDK (v2) AWS SDK for Java (v1) Toolkit for IntelliJ Serverless deployment with IntelliJ AWS SDK for Java (v2) New APIs with SDK v2 Faster SDK start-up in Lambda HTTP/2 Bi- Directional Streaming Full duplex streaming Cloud Development Kit (CDK) Infrastructure as code Amazon Corretto Amazon supported OpenJDK
  41. 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Want More? YouTube: Hands-on in the AWS Java Ecosystem – re:Invent 2018
  42. 42. Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

×