Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lines and Boxes: Modern Cloud Applications Inte...

Lines and Boxes: Modern Cloud Applications Integration

Modern Applications deployed in the cloud are based on serverless or microservices architectures and they are typically fine-grained, distributed, and interconnected. It's perfectly normal to represent those systems in a form of a diagram consisting - more or less - lines and boxes. Lines (connections between boxes that represent components) impose important functional and non-functional characteristics of the systems - like scalability, availability, and coupling. In this session, you will learn how serverless and application integration tools available in the AWS cloud make those connections explicit, automatable, and manageable. In other words: you will learn why lines (integrations) are as just important as boxes (components).

Mohammed Fazalullah

April 03, 2023
Tweet

More Decks by Mohammed Fazalullah

Other Decks in Technology

Transcript

  1. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. us-east-1a us-east-1b Your Application
  2. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. Lines and Boxes Integration is the key to modern cloud applications Mohammed Fazalullah “Faz” Senior Developer Advocate, MENA Amazon Web Services
  3. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. CHAPTER 1 LINES AND BOXES
  4. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. A B C D A B C D Designs
  5. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. How your components are interconnected defines your system’s essential properties. Gregor Hohpe AWS Enterprise Strategist, Co-author of Enterprise Integration Patterns
  6. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. A B C D “The fundamental structures of a software system and the discipline of creating such structures and systems. Each structure comprises software elements, relations among them, and properties of both elements and relations.” Documenting Software Architectures Clements, Bass, Garlan, et al. Software Systems Architecture
  7. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. EAI EII ETL ESB SOA (WS-*) CEP iPaaS Service Mesh Data Mesh 202x 201x 200x 199x 198x Connected Systems: Concept & Reality A B
  8. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Am azon SQ S Am azon SN S Am azon M Q Am azon AppFlow AW S Step Functions Am azon EventBridge AW S AppSync Am azon API Gatew ay Am azon M W AA ‘06 ‘07 ‘08 ‘09 ‘10 ‘11 ‘12 ‘13 ‘14 ‘15 ‘16 ‘17 ‘18 ‘19 ‘20 ‘21 Am azon SW F History of AWS Integration Services A B
  9. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Approach Level of Control Delivery Lifecycle Team Example (Proposal) Migration Low One-time One-off Amazon AppFlow Amazon SWF Data Synchronization Traditional Integration Low Slow Separate Amazon AppFlow Enterprise Service Bus (ESB) Some Faster (slower than endpoints) Likely separate Amazon MQ Amazon SQS Amazon API Gateway Modern Cloud Apps Serverless EDA High Same pace Embedded Amazon EventBridge AWS Step Functions Cataloging Integration Approaches
  10. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. In modern cloud applications, integration isn’t an afterthought. It’s an integral part of the application architecture and the software delivery lifecycle. Gregor Hohpe AWS Enterprise Strategist, Co-author of Enterprise Integration Patterns
  11. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Shared Database Remote Procedure Invocation Messaging Source: Enterprise Integration Patterns Coupling Abstraction Asynchrony Timeliness Complexity Integration Approaches File Transfer
  12. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Coupling is a measure of independent variability between connected systems. Decoupling has a cost, both at design and run-time. Coupling isn’t binary. Coupling isn’t one-dimensional. A B Integration’s Magic Word: Coupling
  13. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. 13 Technology: Java vs. C++ Location: IP addresses, DNS Data Format: Binary, XML, JSON, ProtoBuf, Avro Data Type: int16, int32, string, UTF-8, null, empty Semantic: Name, Surname, Postal Code Temporal: Synchronous, Asynchronous Interaction Style: Messaging, RPC, Query-style (GraphQL) Conversation: Pagination, Caching, Retries Coupling has multiple variants
  14. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. The appropriate level of coupling depends on the level of control you have over the endpoints.
  15. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. CHAPTER 2 MODERN CLOUD APPLICATION
  16. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Modern Software Architect is like a Chef It’s not just about selecting ingredients. It’s how you put them together. Modern Software Architect focuses on Impact The value of a modern architect is measured by how many organizational levels they can span. Modern Software Architect sells Options It's all about honest research and presenting, not giving them away. They are not free (there is no free lunch). What makes a modern software architect?
  17. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Integration Synergy
  18. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Serverless is about much more than application run-times or compute. It’s present on all layers of software architecture stack, including integration. As modern cloud architectures are inherently integrated, serverless plays a key role.
  19. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. AWS Lambda AWS Fargate Amazon API Gateway Amazon SNS Amazon SQS AWS Step Functions COMPUTE DATA STORES INTEGRATION AWS AppSync Amazon Aurora Serverless Amazon S3 Amazon DynamoDB Amazon EventBridge MORE
  20. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. This sometimes makes my blood boil because I believe that serverless isn’t a buzzword and that it actually stands for something important! Jeremy Daly GM of Serverless Cloud, Serverless, Inc., AWS Serverless Hero Stop Calling Everything Serverless! jeremydaly.com
  21. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. CHAPTER 3 PATTERNS
  22. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Example: Simple Distributed Application Source: Enterprise Integration Patterns
  23. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. “How do you maintain the overall message flow when a message needs to be sent to multiple recipients, each of which may send a reply?” Source: Enterprise Integration Patterns Pattern: Scatter-Gather
  24. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Design Decisions: - How to determine set of recipients - Are recipients required to respond? - When to complete aggregation: - Known number (wait for all) - Time limit (time-out) - Sufficient number of responses - First best (1 is sufficient) - Existence of favorable response - External event (gavel drops) - How to combine responses - Concatenate - Select best answers - Combine answers (sum, avg) Pattern: Scatter-Gather
  25. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. • Fetch Lambda function names from DynamoDB table. • Iterate over the list, invoking Lambda functions (synchronously but concurrently: MaxConcurrency). • Filter results to just bank ID and rate. • Concatenate results as they are returned (Map state does that for us). Scatter-Gather: Step Functions Map State
  26. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. EventBus Rule Target Lambda Function SNS Topic SQS Queue … Yup, it’s UML! 1..5 1..* Scatter-Gather*: EventBridge Targets
  27. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Scatter-Gather*: Simple Notification Service
  28. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Comparing Implementations Fan-Out Interaction Subscription Entity Visibility Coupling Step Functions Map with DynamoDB Medium (dozens) Sync / Parallel DynamoDB: UpdateItem Sender Poor Loose EventBridge Small (5 per rule) Sync EventBridge: PutTargets Broker Good Tight (?) SNS Large (12.5M per topic) Async / Push SNS: Subscribe Channel Good Loose Subscription via: API / CLI / CloudFormation / CDK / Web Console
  29. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Pattern Language for Integration Source: Enterprise Integration Patterns
  30. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Integration Patterns to Express Your solution • Better express design decisions and trade-offs • Hide implementation details • Create visually appealing diagrams Integration Patterns Built into AWS services • Straightforward mapping to AWS service • Easier learning curve • Better composability of services Integration Patterns in AWS Integration
  31. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. • Scatter-Gather • Pub-Sub Channel • Msg Channel • Message Filter • Content Filter • Aggregator • Dead-Letter Queue PATTERNS EXPRESS INTENT IN A SERVICE-NEUTRAL FASHION Cloud-native Serverless Implementation
  32. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. AWS Step Functions Amazon EventBridge Integration Patterns in AWS Serverless
  33. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Amazon EventBridge Message Translator Content Filter Claim Check Normalizer Source: Enterprise Integration Patterns Messaging Patterns Patterns Express Intent and Nuances
  34. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. CHAPTER 4 INFRASTRUCTURE AS ACTUAL CODE
  35. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Endpoint Automation Cycle
  36. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Desired State Actual State srv1.resize(4GB) srv2 = new Server(4GB) lb = new LoadBalancer(srv1, srv2) Language Type Declarative provisioning ≠ Declarative language
  37. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. LOOK MA, NO K8S! 😉 Cloud-native Serverless Implementation
  38. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. 38 Serverless Composition with AWS CDK Deployment Config Composition private createBank(name: string, env: BankConfig, eventBus: EventBus) { return new lambda.Function(this, name, { runtime: lambda.Runtime.NODEJS_14_X, code: lambda.Code.fromAsset('bank'), handler: 'app.handler', functionName: name, environment: env, onSuccess: new destinations.EventBridgeDestination(eventBus) }); } const bankRecipientPawnshop = this.createBank( 'BankRecipientPawnshop', { BANK_ID: 'PawnShop', BASE_RATE: '5', MAX_LOAN_AMOUNT: '500000', MIN_CREDIT_SCORE: '400‘ }, mortgageQuotesBus);
  39. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Serverless automation isn’t about provisioning but about composition and configuration.
  40. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. “The AWS Construct Library includes higher-level constructs, which we call patterns. These constructs are designed to help you complete common tasks in AWS, often involving multiple kinds of resources.” https://docs.aws.amazon.com/ cdk/latest/guide/constructs.html Business Domain Constructs Integration Patterns CDK Constructs (CloudFormation Resources) • Bank • Loan Broker • LoanQuote • Message Filter • Content Filter • Aggregator • Publish-Subscribe • Lambda Function • Lambda Destination • SQS Queues • Step Function Tasks • EventBridge Rules CDK: Domain Modeling for Serverless Automation
  41. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Automation isn’t an afterthought. Done right, it impacts your architecture choices and blurs the lines between building and deploying.
  42. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. Summary 42
  43. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. AWS Cloud Development Kit (AWS CDK) Modern Cloud Application Bliss
  44. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Internet democratized access to information. Cloud democratized creation. Innovation is no longer a function of your budget, but a function of your imagination. Gregor Hohpe Enterprise Strategist, Amazon Web Services (AWS)
  45. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. ServerlessLand It’s a community-oriented hub that aggregates content about modern cloud applications and serverless. Enterprise Integration Patterns It’s a classical position about application integrations and patterns used across the industry. The Software Architect Elevator Book about role of modern software architect in the organizations, and how the architect’s role is redefined in the digital enterprise. Building next-gen applications with event-driven architectures Technical and detailed talk from AWS re:Invent 2021 about EDA patterns and how they can be applied to build modern cloud applications. Additional Resources
  46. LINES AND BOXES © 2022, Amazon Web Services, Inc. or

    its affiliates. Thank you! © 2022, Amazon Web Services, Inc. or its affiliates. Mohammed Fazalullah ”Faz” In/mohammedfazalullah