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

Power Up system design depth along with Amazon ...

Kim Kao
October 03, 2024
23

Power Up system design depth along with Amazon Q for Developer

In this talk, Kim'd love to share how an problem solver start their problem framing process, through identifying key functional requirements, quality attributes, operation considerations and final design trade offs. Nowadays, problem solvers could leverage generate AI to boots up the journey, we may use Amazon Q Developer as one of the choice and benefit from its well tuned capabilities to dave daily life.

Kim Kao

October 03, 2024
Tweet

Transcript

  1. JCCONF 2024 Power Up system design depth along with Amazon

    Q Developer 1 Kim Kao Sr. Developer Specialist Solutions Architect
  2. Introduction to MyFlexOffice Inc. • Founded 20 years ago, with

    1,000 employees • Leading provider of flexible office space in the Asia- Pacific (APAC) • 200 office centers across: o China o India o Australia o Japan o South Korea o Taiwan o Singapore
  3. Goals of the "Day Office" Booking Project 1. Optimize Utilization:

    o Maximize the use of unoccupied private offices. o Turn underutilized spaces into revenue-generating assets. 2. Offer Flexibility: o Provide alternative to meeting rooms 3. Enhance Member Experience: o Deliver fully-equipped private office o Support team collaborations.
  4. What is the "Day Office" Project? • New Booking System:

    o Reserve unused private offices from half a day to few days • Mobile App: Evaluate, select, and book day office • Day Office Admin System: Cancel, reschedule bookings
  5. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Change is the only constant in life Heraclitus Greek philosopher, Ephesus
  6. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. It’s developers’ (mis)understanding, not domain experts’ knowledge, that gets released in production. Alberto Brandolini Author of EventStorming
  7. MORE THAN of enterprises will have used generative AI APIs

    or deployed generative AI–enabled apps by 20261 A C C O R D I N G T O G A R T N E R , I N C . ® 1 Gartner, “More than 80% of Enterprises,” October 11, 2023.
  8. INFRASTRUCTURE FOR FM TRAINING AND INFERENCE GPUs AWS Inferentia AWS

    Trainiu m Amazon SageMaker Amazon EC2 Capacity Blocks AWS Neuron Amazon EC2 UltraClusters Elastic Fabric Adapter (EFA) AWS Nitr o TOOLS TO BUILD WITH LLMs AND OTHER FMs Amazon Bedrock Guardrails Agents Customization capabilities Generative AI stack APPLICATIONS THAT USE LLMs AND OTHER FMs Amazon Q Business Amazon Q Developer Amazon Q in QuickSight Amazon Q in Connect
  9. Amazon Q, a generative AI–powered assistant from AWS AMAZON Q

    BUSINESS AMAZON Q DEVELOPER Built-in privacy and security Customizable to your business Benefits Developers IT professionals Every Employee Business analysts Personas
  10. < one hour coding time The median developer spends less

    than one hour a day writing code1 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved 23 1 Software.com, “Global Code Time Report,” January 2022.
  11. Where are developers spending time in the SDLC? Test and

    secure Operate Plan Create Maintain and modernize Plan • Find accurate and specific technical guidance from relevant documentation, code examples, resources, and so on • Design changes based on business and technical requirements Create • Generate code • Manage infrastructure Test and secure • Apply proper test cases for code changes • Scan for security vulnerabilities in code Operate • Identify and mitigate code issues • Monitor performance and efficiency Maintain and modernize • Modernize and update old code languages and dependencies
  12. Amazon Q Developer Reimagines the experience across the entire software

    development lifecycle (SDLC) Helps developers and IT professionals build and manage secure, scalable, and highly available applications Helps you write, debug, test, optimize, and upgrade your code faster Converses with you to explore new AWS capabilities, learn unfamiliar technologies, and architect solutions Amazon Q is built with security and privacy in mind from the start, making it easier for organizations to use generative AI safely.
  13. Amazon Q Developer supports developers across the SDLC Plan •

    Amazon Q Developer in the AWS Management Console (best practices, AWS WAF, Amazon EC2 instance optimization) • Business-specific application • Explain code with conversational coding Create • Inline coding companion in IDE and CLI • Software development • Conversational coding Test and secure • Unit test generation • Security scanning and remediation Operate • Troubleshoot errors (Amazon S3, AWS Lambda, Amazon EC2, Amazon ECS) • VPC Reachability Analyzer • Debug and optimize code with conversational coding • Optimize your AWS resources and costs [NEW] Maintain and modernize • Update code with Amazon Q Developer agent for code transformation Test and secure Operate Plan Create Maintain and modernize
  14. Amazon Q is available where you do your work Amazon

    CodeCatalyst AWS consoles IDEs AWS documentation Slack and Teams (through AWS Chatbot) AWS Console Mobile Application
  15. What is EventStorming? A workshop-based approach to breaking down a

    non-trivial domain with the goal of coming to a shared understanding.
  16. Enhance the design • Calculate the charge fee estimation by

    the end of month • The chargefee can be summarized by replaying booking events
  17. Aggregate Canvas • Map artifacts to DDD Tactical design •

    Come out consensus for implementation • Kata; Deep dive the invariant constraints and Specifications 42
  18. Invariant Constraints • To maintain internal consistency, which is often

    enforced through invariant constraints. • These constraints define business rules that must always hold true within the aggregate. • If an operation would violate these invariants, it should be rejected or trigger an error. public class Payment { private final String Id; private final BigDecimal amount; private boolean isPaid; // Constructor to create a new Payment public Payment(String OfficeId, BigDecimal amount) { // Ensure the amount is valid according to the invariant if (amount.compareTo(BigDecimal.ZERO) < 0) { throw new IllegalArgumentException("Amount must be greater than or equal to 0."); } }
  19. Specifications • Encapsulate complex business rules and conditions to verify

    whether specific criteria are met • Allows for clearer aggregate logic by decoupling validation logic from the aggregate itself • Maintaining high cohesion and low coupling. public interface Specification<T> { boolean isSatisfiedBy(T t); } public class LeaseOrderPaymentSpecification implements Specification<LeaseOrder> { @Override public boolean isSatisfiedBy(LeaseOrder leaseOrder) { // Check if the order is not already paid return !leaseOrder.isPaid(); } }
  20. Adaptive systems design • Continuously evolve systems architecture and design

    • Achieve the least cost of future changes • Adapt rapidly to business and technological changes 48
  21. Adaptive to business growth Day 1 100 Users 1,000,000 Users

    1 2 Bottleneck of high-volume reads and writes Worsening transaction latencies 3 Diminishing performance return on marginal cost Day 1000
  22. Incorporating quality attributes in architecture Key Quality Attributes Non-Functional Requirements

    Simplicity Simplify the implementation of communication among different domains (retail, loyalty points) Scalability Support high QPS/TPS during peak traffic Usability Maintain user experience as usual under high QPS/TPS Performance Near real-time loyalty points issuance and redemption
  23. Aggregate Design Canvas • A modelling tool meant to be

    used as a part of design-level domain modelling activities. • An aggregate, a graph of objects that is a consistency boundary for our domain policies. Depending on the design of the aggregate we can either enforce them (make them invariant) or be forced to have corrective policies in place. • The canvas has a suggested order of working through it, that helps to iteratively discuss different aspects of the aggregate design.
  24. Handling throughput Key metrics Average Maximum Command handling rate 2/d

    100/d Total number of clients 10s 100s Concurrency conflict chance small medium (would be great to be clear once have data)
  25. Size Key metrics Average Maximum Event growth rate 2/d 100/d

    Lifetime of a single instance 10s 100s Number of events persisted small medium (would be great to be clear once have data)
  26. Key takeaways • Align business strategy with software architecture domains

    • Utilize LLM for developers to boost productivity • Choose the right architecture decisions that suit the use cases • Utilize the right resources to grow solution design capabilities Demo video https://sharing.kimkao.io/AWS-TPE-Summit-2024-AmazonQForDeveloper-AIZone0717+TC.mp4 Design guideline https://github.com/humank/amazonq-demo https://aws.amazon.com/tw/architecture/well-architected https://github.com/humank/aggregate-canvas https://github.com/ddd-crew/aggregate-design-canvas