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

Fostering Socio-Technical Harmony in DDD

Kim Kao
October 03, 2024
6

Fostering Socio-Technical Harmony in DDD

Speakers:

Stephen Tung, Developer Advocate, Event Store
Kim Kao, Sr. Developer Specialist Solutions Architect, AWS

Session abstraction :

In the rapidly evolving landscape of software development, the significance of socio-technical aspects cannot be overstated. This session delves into the necessity for technical professionals to engage in meaningful social interactions and collaboration with stakeholders. By emphasizing the socio-technical approach, we ensure that our efforts in building systems are aligned with the true needs of the problem domain. Understanding and maintaining a shared language with stakeholders is crucial for creating systems that effectively solve real-world problems.

We will explore how adopting socio-technical practices enhances Domain-Driven Design (DDD) implementation with Event Sourcing. Using a shared office rental process as an example, we will highlight the role of domain events in facilitating these interactions. Attendees will gain insights into how socio-technical harmony and Event Sourcing contribute to the successful evolution of problem domains, enabling more responsive and resilient system designs.

Kim Kao

October 03, 2024
Tweet

More Decks by Kim Kao

Transcript

  1. DDDesign TW Conference 2024 Fostering Socio-Technical Harmony in DDD Ensuring

    Effective Collaboration for Evolving Problem Domains 1 Stephen Tung Developer Advocate, Event Store Kim Kao Sr. Developer Specialist Solutions Architect
  2. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Change is the only constant in life Heraclitus Greek philosopher, Ephesus
  3. © 2022, 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
  4. Traitional vs Flexible Office Rental • Traditional Offices: Long-term contracts,

    high upfront costs, fixed location o Cost includes: utilities, maintenance, basic amenities • Flexible Offices: Short-term contracts, small deposit, cancel and change room anytime o Value added services: receptionist, mail handling, free wifi Analogy: Apartment rental vs Hotel
  5. Key Offerings of Flexible Office Rental • Private Offices: Short-term,

    various sizes, fully furnished. • Coworking Spaces: Shared workspaces with lounge • Meeting Rooms & Event Spaces: Flexible booking for meetings and events.
  6. 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
  7. 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.
  8. 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 • Payment System Integration: Facilitate mobile payment • Day Office Admin System: Cancel, reschedule bookings
  9. What went Wrong? • Developed a stripe payment solution o

    But didn't realize stripe is not supported in many countries • Developed a "pay as you go" solution o But business wanted a "subscription" based solution • Developed report for business to "manually" enter charges o But business is too busy, wanted an "automated" way Could be avoided with more COLLABORATION
  10. Event Storming • Facilitate business process discovery • Collaborate to

    solve business problems • Clarify complex processes
  11. Enhance the design • Calculate the charge fee estimation by

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

    Come out consensus for implementation • Kata; Deep dive the invariant constraints and Specifications 38
  13. Finance Issues • Developed a stripe payment solution, but didn't

    realize stripe is not supported in many countries • Developed a "pay as you go" solution, but business wanted a "subscription" based solution • Developed report for business to "manually" enter charges, but business is too busy, wanted an "automated" way
  14. //這裡開始使用 aggregate canvas 來處理 invariant constraints, specifications, policy 的關聯 //

    甚至可以提供一點簡單的 code sample 去解釋處理這一段
  15. 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.
  16. 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)
  17. 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)
  18. How can EventStoreDB help? Helps you produce significantly better faster

    cheaper business data and applications. Especially for core business processes Originally built for event sourcing and fits well with DDD/CQRS EventStoreDB is an event-native database • A new class of database • Store events, like domain events • Publish or stream to other systems or databases