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

DDD in large product portfolios

DDD in large product portfolios

Building a system for a single product is hard. But it can get even more complicated if your company has a larger product portfolio, like it is common in the financial industry.

But how can you scale over different products, without reinventing the wheel each time? How can we leverage the economies of scope, without constraining differentiation in the market or hinder bringing value to our customers?

At R+V, one of Germany's biggest insurance companies, we took a semi-greenfield approach to create a product platform for property and liability insurance products. On our ongoing journey, we rely heavily on DDD principles and adjacent concepts like Team Topologies.

This talk will show you how our understanding about products and product platforms evolved since the start of our journey and how we used event storming and context mapping techniques to differentiate between product-agnostic and product-specific subdomains.

Avatar for Andreas Pinhammer

Andreas Pinhammer

June 12, 2023
Tweet

Other Decks in Technology

Transcript

  1. About me 08.06.2023 DDD in large product portfolios 2 Andreas

    Pinhammer he/him Business Architect @ R+V @apinhamm @[email protected]
  2. DDD in large product portfolios 3 Second largest insurer in

    Germany 20 billion € premiums 16,800 employees 9 million customers 27.5 million insurance contracts 08.06.2023
  3. Our Journey started in 2020 08.06.2023 DDD in large product

    portfolios 4 Initial situation Initial situation for P&C insurance segment › Mainframe systems +30yrs › Processes were merely “digitalized” › Customer average age increasing › Desire to improve time-2-market
  4. Our Journey started in 2020 08.06.2023 DDD in large product

    portfolios 5 Greenfield approach Start on greenfield › New concepts and methodologies − Agile − Domain-Driven Design − DevSecOps › Start with eight cross-functional teams › Focus on private customers
  5. Inverse Conway Maneuver 08.06.2023 DDD in large product portfolios 8

    Discover subdomain boundaries Align team structure with subdomains Technical architecture follows domain boundaries
  6. DDD in large product portfolios 9 Event Storming Personal Liability

    Insurance Take Out Process 08.06.2023 PREMIUM PAID PREMIUM PAID POLICY HOLDER CAPTURED POLICY HOLDER CAPTURED EVENT EVENT PIVOTAL EVENT / BOUNDARY SUBDOMAIN SUBDOMAIN SALES SALES POLICY ISSUING POLICY ISSUING PAYMENT PAYMENT
  7. Context Mapping 08.06.2023 DDD in large product portfolios 10 product

    designer Sales Policy Issuing Pricing Payment
  8. Early design decisions can lead to a unfavourable architecture 08.06.2023

    DDD in large product portfolios 13 second product Too late to adjust! early design decision based on only one product Cone of Uncertainty
  9. 08.06.2023 DDD in large product portfolios 15 Event Storming Household

    Content Insurance Take Out Process PREMIUM PAID PREMIUM PAID POLICY HOLDER CAPTURED POLICY HOLDER CAPTURED EVENT EVENT PIVOTAL EVENT / BOUNDARY SUBDOMAIN SUBDOMAIN SALES SALES POLICY ISSUING POLICY ISSUING PAYMENT PAYMENT
  10. Context Mapping 08.06.2023 DDD in large product portfolios 16 product

    designers Sales Policy Issuing Pricing Payment
  11. Second product confirmed our context map 08.06.2023 DDD in large

    product portfolios 17 › Pivotal events are identical between both products › Subdomains are identical between both products › Actors („customer“, „sales rep“) are identical, too
  12. Second product confirmed our context map 08.06.2023 DDD in large

    product portfolios 18 › Pivotal events are identical between both products › Subdomains are identical between both products › Actors („customer“, „sales rep“) are identical, too
  13. 08.06.2023 DDD in large product portfolios 19 What fits for

    a single product, doesn‘t necessarily fit for multiple products Problem #3 Team size and cognitive load › Each new product adds cognitive load to the team › Size of the team is limited by Dunbar number (5-9 persons) Problem #2 Product experience › Feedback loop to product designer is hindered › Each team has little impact on the overall product experience › Teams were missing purpose Problem #1 Backlog alignment › Changes to a product involves multiple teams and several handoffs › Team backlogs need to be carefully aligned due to dependencies
  14. But why do additional products add cognitive load to a

    team? 08.06.2023 DDD in large product portfolios 20
  15. Language between products differs largely 08.06.2023 DDD in large product

    portfolios 21 Personal Liability Household Content insured persons natural hazards insured location type of building „Mallorca coverage“ defence against claims rating districts burglary legal duty of supervision claimant
  16. Customer needs differ between products 08.06.2023 DDD in large product

    portfolios 22 Personal Liability Household Content „I‘ve married and want my partner to be included in the policy“ „I moved into a bigger house“ „My neighbour is mad at me because I‘ve broken his window“ „Some thief stole my electronic equipment and I need it to be replaced“ „I bought a new e-bike and I‘m afraid it will be vandalised“ „Someone falsely accused me of damaging his car.“
  17. 08.06.2023 DDD in large product portfolios 24 A product should

    be assigned to exactly one organizational unit Team structure should be aligned to domain boundaries A product is a subdomain
  18. One team should be able to develop and maintain a

    product during its complete lifecycle 08.06.2023 DDD in large product portfolios 25
  19. A product is a socio-technical system that delivers value to

    our customers 08.06.2023 DDD in large product portfolios 26
  20. How can we make this feasible? 08.06.2023 DDD in large

    product portfolios 27 › Building each product from scratch just takes a long time › A product is more than just a take out process › There are still a lot of similarities, so there must be some leverage by using economy of scope
  21. »Use a platform that is explicitly designed to reduce cognitive

    load for teams building software on top of it« – Team Topologies 08.06.2023 DDD in large product portfolios 28
  22. 08.06.2023 DDD in large product portfolios 29 stream-aligned team platform

    team Flow of change platform team platform team stream-aligned team stream-aligned team
  23. Platform candidates 08.06.2023 DDD in large product portfolios 30 Personal

    Liability Insurance Household Content Insurance Sales Policy Issuing Payment Pricing Customer
  24. 08.06.2023 DDD in large product portfolios 31 insurance product technical

    platform insurance product insurance product platform product platform product platform product platform product platform product platform product provide subdomains provide technical capabilities provide business capabilities platform consumers
  25. Platform teams are stream-aligned 08.06.2023 DDD in large product portfolios

    32 Platform Product Team Insurance Product Team Customer delivers value to users delivers value to product teams delivers value to users
  26. DDD in large product portfolios 33 New heuristic: product-specificity How

    much product knowledge is needed for a specific capability or subdomain? 08.06.2023
  27. 08.06.2023 DDD in large product portfolios 34 Insurance take out

    process Evaluate subdomains regarding product-specificity PREMIUM PAID PREMIUM PAID POLICY HOLDER CAPTURED POLICY HOLDER CAPTURED EVENT EVENT SUBDOMAIN SUBDOMAIN PIVOTAL EVENT / BOUNDARY product-specificity product-specificity product-specificity SALES SALES POLICY ISSUING POLICY ISSUING PAYMENT PAYMENT
  28. Revised Context Map according to product-specificity 08.06.2023 DDD in large

    product portfolios 35 Personal Liability Household Content Payment product-agnostic no explicit product knowledge needed product designer is part of the product team
  29. Keep your external events product- agnostic 08.06.2023 DDD in large

    product portfolios 36 Personal Liability Household Content Payment POLICY ISSUED POLICY ISSUED product-agnostic no explicit product knowledge needed
  30. Look for shared business capabilities and behaviour 08.06.2023 DDD in

    large product portfolios 37 POLICY HOLDER CAPTURED POLICY HOLDER CAPTURED CALCULATE PREMIUM CALCULATE PREMIUM ENTER PAYMENT INFORMATION ENTER PAYMENT INFORMATION REQUEST TO CONCLuDE REQUEST TO CONCLuDE CAPTURE POLICY HOLDER CAPTURE POLICY HOLDER ENTER TARIFF CRITERIA ENTER TARIFF CRITERIA
  31. Look for shared business capabilities and behaviour 08.06.2023 DDD in

    large product portfolios 38 CALCULATE PREMIUM CALCULATE PREMIUM REQUEST TO CONCLuDE REQUEST TO CONCLuDE POLICY HOLDER CAPTURED POLICY HOLDER CAPTURED ENTER PAYMENT METHOD ENTER PAYMENT METHOD product-specifity product-specifity product-specifity product-specifity product-specifity
  32. 08.06.2023 DDD in large product portfolios 39 Example: determine which

    payment methods are allowed Influence to Modelling paymentProvider = new PaymentProvider(product = ProductType.HouseholdContent) […] PaymentProvider.getEligiblePaymentMethods() { if product == ProductType.HouseholdContent then eligiblePaymentMethods = { PaymentMethod.CreditCard, PaymentMethod.PayPal, PaymentMethod.DirectDebit} […] } paymentProvider = new PaymentProvider(eligiblePaymentMethods = {PaymentMethod.CreditCard, PaymentMethod.PayPal, PaymentMethod.DirectDebit})
  33. Product-specificity and strategic DDD patterns 08.06.2023 DDD in large product

    portfolios 40 Doesn‘t product-specific mean the same as core domain? › Not necessarily › Example: Membership benefit programme Cooperative members can get a cashback on their paid premiums, depending on loss amount › Not product-specific, but clearly something that distinguishes us in the market
  34. 08.06.2023 DDD in large product portfolios 41 Teams can build

    new products with minimal team dependencies Changes to a product involves multiple teams and several handoffs Each new product adds cognitive load to the team Feedback loop to product designer is hindered Product designer is part of the product team Cognitive load of (insurance) product teams is reduce by platform products
  35. Shiny new world Legacy world Connecting our shiny new world

    to the legacy world 08.06.2023 DDD in large product portfolios 43 Bounded Context Bounded Context Bounded Context Bounded Context Legacy System Legacy System Legacy System
  36. Transitive Dependencies 08.06.2023 DDD in large product portfolios 44 Bounded

    Context Legacy System Legacy System Legacy System 1 2 3 3 2 Legacy system is tightly coupled to other legacy systems Legacy System expects that user fulfills its external dependencies ➔ Our new system actually copies the dependencies of the legacy system 2 1 3 Bounded contexts needs to communicate with a legacy system
  37. Shiny new world Northern wilderness 08.06.2023 DDD in large product

    portfolios 45 Ice Wall – Scaled ACL Bounded Context Bounded Context Bounded Context Bounded Context Legacy System Legacy System Legacy System Ice Wall Adapter Adapter Adapter Adapter
  38. Adapter Typology 08.06.2023 DDD in large product portfolios 46 Adapter

    Data Supply Adapter Pseudo Bounded Context Adapter › Legacy system is mostly data oriented › Adapter collects integration events and feeds the legacy system › Legacy system is mostly behaviour oriented, but SOA-like orchestration needed › Adapter „simulates“ a bounded context for a specific subdomain
  39. 08.06.2023 DDD in large product portfolios 47 Bounded Context Legacy

    System Legacy System Legacy System Example BUSINESS EVENT BUSINESS EVENT Bounded Context Adapter Legacy organisation New organisation
  40. Wrap Up 08.06.2023 DDD in large product portfolios 48 ›

    Distinct products are independent subdomains › A product is a socio-technical system › Lower cognitive load and leverage economy of scope by using platform products › Differentiate between product-specific and product- agnostic behaviour › Protect yourself from legacy world with an “Ice wall”