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

DDD x Microservice Architecture : Findy Archite...

Avatar for syobochim syobochim
November 21, 2025

DDD x Microservice Architecture : Findy Architecture Conf 2025

Findyアーキテクチャカンファレンス2025 での登壇資料です。
@nrs さん、@afukui さんとのパネルディスカッションで、ドメイン駆動設計とマイクロサービスの関係性についてお話しさせていただきました!

Avatar for syobochim

syobochim

November 21, 2025
Tweet

More Decks by syobochim

Other Decks in Technology

Transcript

  1. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. ドメイン駆動設計と マイクロサービスアーキテクチャ AWS Developer Live Show 出張編 🚅 💨 宇賀神みずき @syobochim Delivery Consultant – AppMod アマゾン ウェブ サービス ジャパン合同会社
  2. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. Who am I ? "84+BQBO%FMJWFSZ$POTVMUBOU ओʹΞϓϦέʔγϣϯ։ൃͷ͝ࢧԉΛ୲౰ ஶॻʮ͍ͪ͹Μ΍͍͞͠(JU(JU)VCͷڭຊʯ しょぼちむ 宇賀神みずき @syobochim
  3. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. エリック・エヴァンスのドメイン駆動設計をグラレコノートにまとめて公開 ドメイン駆動設計の原書を読むのが⼀番 だけど難しそう・ハードルが⾼そうという⽅は ぜひ、ドメイン駆動設計を始めるきっかけにしてください 🙌✨ 例えば ざっくりとノートを読んで理解して 気になったところは書籍で深掘りする ブログにPDF公開しています︓https://syobochim.hatenablog.com/entry/2022/03/04/194646
  4. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 4
  5. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. プログラミングや開発の課題に特化したテーマの 技術解説、ディスカッションを AWS スペシャリストが、 AWS 公式 YouTube チャンネルから ライブセッションでお届けしています。 AWS Developer Live Show とは ? これまでのアーカイブ視聴はこちら
  6. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 本セッションの対象者とゴール 対象聴講者 • DDDやマイクロサービスに興味がある・基本的な考えは知っているが、実践で悩んでいる • 理論は知っているが「どこで境界を引くか」「どう関連させていくか」の判断に迷っている セッションのゴール • 境界の引き⽅の判断基準がわかる • ドメイン駆動設計とマイクロサービスアーキテクチャの各概念の関係性を理解する • 実践的な知⾒を得る ワイワイ、楽しく進めていきたいです︕🙌✨ (途中で⾊々脱線しがちです… 🙏) 6
  7. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. ⾃⼰紹介 v名前 v福井 厚(ふくい あつし)Atsushi Fukui(afukui@) v所属 vアマゾン ウェブ サービス ジャパン合同会社 vデベロッパートランスフォーメーションチーム vシニアデベロッパースペシャリスト ソリューションアーキテクト v関⼼領域 vソフトウェア アーキテクチャ、ドメイン駆動設計、アジャイル開発 v好きなAWSサービス vサーバーレス全般
  8. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark.
  9. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. ドメイン駆動設計と マイクロサービスアーキテクチャ 9 ドメイン駆動設計でどのように境界を分けていくのか︖ 分けたものをどのようにマイクロサービスと組み合わせていくのか︖
  10. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. と… その前に… 10
  11. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 11 本当にマイクロサービスアーキテクチャで ⾏きますか︖︖︖︖︖
  12. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 1. Almost all the successful microservice stories have started with a monolith that got too big and was broken up 2. Almost all the cases where Iʻve heard of a system that was built as a microservice system from scratch, it has ended up in serious trouble. This pattern has led many of my colleagues to argue that you shouldnʼt start a new project with microservices, even if youʻre sure your application will be big enough to make it worthwhile. ⽇本語訳: 1. 成功しているマイクロサービスの事例のほぼすべてが、⼤きくなりすぎたモノリスを分割することから始まっている 2. 最初からマイクロサービスシステムとして構築されたシステムの事例のほぼすべてが、深刻な問題に直⾯している このパターンから、私の同僚の多くは次のように主張しています。アプリケーションが⼗分に⼤きくなることが確実だ としても、新しいプロジェクトをマイクロサービスで始めるべきではない。 Martin Fowler https://martinfowler.com/bliki/MonolithFirst.html 12
  13. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 前提: マイクロサービスのメリット・デメリットを ⽐較した上で、マイクロサービスを選択した場合 13
  14. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. ポイントとなる概念 14 サブドメイン 事業を実現するために、業務を分析して分割したもの 境界づけられたコンテキスト モデルを作るための境界であり、 ユビキタス⾔語を同じ意味で適⽤できる範囲 集約 ⼀貫性を保証すべき最⼩の単位 マイクロサービス 独⽴してデプロイ可能なサービス サービス同⼠はネットワークを介して 相互に通信し、システムを形成する
  15. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. サブドメインと境界づけられたコンテキストの関係性 15 サブドメイン 事業を実現するために、業務を分析して分割したもの 境界づけられたコンテキスト モデルを作るための境界であり、 ユビキタス⾔語を同じ意味で適⽤できる範囲 ディスカッション🎙: サブドメインと境界づけられたコンテキストの関係性は︖ どんな時に、どっちが⼤きい︖どっちが⼩さい︖どういう時に分割しようと思う︖
  16. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 16 ディスカッション🎙: サブドメインと境界づけられたコンテキストの関係性は︖ どんな時に、どっちが⼤きい︖どっちが⼩さい︖どういう時に分割しようと思う︖ サブドメインと境界づけられたコンテキストの関係性
  17. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 境界づけられたコンテキストとマイクロサービスの関係性 17 サブドメイン 事業を実現するために、業務を分析して分割したもの 境界づけられたコンテキスト モデルを作るための境界であり、 ユビキタス⾔語を同じ意味で適⽤できる範囲 集約 ⼀貫性を保証すべき最⼩の単位 マイクロサービス 独⽴してデプロイ可能なサービス サービス同⼠はネットワークを介して 相互に通信し、システムを形成する
  18. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 境界づけられたコンテキストとマイクロサービスの関係性 18 境界づけられたコンテキスト モデルを作るための境界であり、 ユビキタス⾔語を同じ意味で適⽤できる範囲 マイクロサービス 独⽴してデプロイ可能なサービス サービス同⼠はネットワークを介して 相互に通信し、システムを形成する ディスカッション🎙: 境界づけられたコンテキストとサービスは1対1︖そうじゃない時って︖ モデルが共有されるパターンもある中で、コード・システムの管理の⼯夫は︖
  19. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 粒度と複雑さの関係性 19 構造はシンプル(1つ)だけど 中が整理されておらず、複雑… (巨⼤な泥団⼦) vs ⼀つ⼀つは⼩さくてシンプルだけど 構造が複雑… (分散した泥団⼦)
  20. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 参考︓ チームトポロジー Chapter 6 20
  21. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 境界づけられたコンテキストとマイクロサービスの関係性 21 境界づけられたコンテキスト モデルを作るための境界であり、 ユビキタス⾔語を同じ意味で適⽤できる範囲 マイクロサービス 独⽴してデプロイ可能なサービス サービス同⼠はネットワークを介して 相互に通信し、システムを形成する ディスカッション🎙: どういう観点で境界づけられたコンテキストからサービスを分ける︖ モデルが共有されるパターンもある中で、コード・システムの管理の⼯夫は︖ 再 掲
  22. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. よくある誤解: サーバレス = マイクロサービス 22 もっとパフォーマンス・コストを API レベルで最適化するなら
  23. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 境界を分割した︕そのあとは・・・何から着⼿する︖ 23 議論ポイント🎙︓何を基準に「作り始めるサービス」を選んでいますか︖ 他のサービスとの連携数︖ サブドメインの種類から︖ 新規サービスの場合と、 既存システムを切り出している場合は︖
  24. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 24 議論ポイント🎙︓⽣成AIを使って、より効率的に良いものを開発するには︖ 作るものが決まった︕作る順序も決まった︕そのあとは…
  25. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 25 © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. AI-DLCとは
  26. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 26 ステップ・アップではなく、 パラダイム・リープを達成するには︖
  27. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 27 © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 現状、何がうまくいかないのか
  28. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 28 開発者は現在、 2つのアプローチを使っている。
  29. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 29 AIは⾃律的にソフトウェア を構築・保守し、⼈間の 関与は最⼩限かゼロである AI-Managed 開発者は依然として 知的な⼒仕事を⾏い、 AIを狭いタスクに適⽤している AI-Assisted
  30. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 30 © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. どうすればうまくいくのか
  31. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 31 AIは、プランニング、タスク分解 アーキテクチャの提案など、 開発プロセスを実⾏する 開発者は、検証、意思決定、 監督の最終的な責任を保持する AI-Driven Development Lifecycle (AI-DLC)
  32. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 32 AI Creates Plan Humans Verify the Plan AI Refines the Plan AI Executes the Plan Humans Verify the Outcome AIは、プランニング、タスク分解 アーキテクチャの提案など、 開発プロセスを実⾏する 開発者は、検証、意思決定、 監督の最終的な責任を保持する
  33. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 33 AI-Driven Development Lifecycle (AI-DLC) 1. 既存のコードの上にコンテキストを構築する 2. ユーザーストーリーで意図を詳しく説明する 3. 仕事のユニットで計画を⽴てる 4. ドメインモデル(コンポーネントモデル) 5. アーキテクチャコンポーネントの追加 6. コードとテストの⽣成 7. IaCとテストの⽣成 8. IaCを使った本番環境でのデプロイ 9. インシデントの管理 各ステップが 次のステップへの リッチな コンテキストを 構築 Inception Construction Operation
  34. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 34 Mob Elaboration Inception : Mob Elaboration
  35. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 35 Mob Construction 未来の開発者チームは並⾏して構築し、 コラボレーションする 未来の開発者の「ペルソナ」 ü バリューチェーンへの移⾏(「チケットから コード」から「ビジネス要求からコード」へ) ü 判断のスピードで反復する ü 継続的なフロー、開発者の最⼤限の満⾜ ü 硬直した専⾨化のサイロを超える ü 桁違いの効果 Construction : Mob Construction
  36. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. ポイントとなる概念 36 サブドメイン 事業を実現するために、業務を分析して分割したもの 境界づけられたコンテキスト モデルを作るための境界であり、 ユビキタス⾔語を同じ意味で適⽤できる範囲 集約 ⼀貫性を保証すべき最⼩の単位 マイクロサービス 独⽴してデプロイ可能なサービス サービス同⼠はネットワークを介して 相互に通信し、システムを形成する 再 掲
  37. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 37
  38. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. 38 プログラミングや開発の課題に特化したテーマの 技術解説、ディスカッションを AWS スペシャリストが、 AWS 公式 YouTube チャンネルから ライブセッションでお届けしています。 AWS Developer Live Show とは ? これまでのアーカイブ視聴はこちら
  39. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Confidential and Trademark. Thank you! © 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. @syobochim @fatsushi @nrs