Skip to Content
Pythonによるアーキテクチャパターン
book

Pythonによるアーキテクチャパターン

by Harry Percival, Bob Gregory
March 2025
Intermediate to advanced
304 pages
4h 33m
Japanese
O'Reilly Media, Inc.
Content preview from Pythonによるアーキテクチャパターン

付録A. 概要図と表

本が終わるころには、我々のアーキテクチャはこうなっている :

diagram showing all components: flask+eventconsumer, service layer, adapters, domain etc

表A-1に、各パターンとその役割をまとめた。

表A-1. 我々のアーキテクチャの構成要素とその役割
レイヤー コンポーネント 説明

ドメイン

ビジネスロジックを定義する。

エンティティ

ドメインオブジェクトの属性は変化する可能性があるが、時間の経過とともに識別可能な同一性を持つもの。

価値オブジェクト

不変性ドメイン・オブジェクトで、その属性は完全に定義されている。他の同じオブジェクトと互換性がある。

集合体

関連するオブジェクトのクラスターで、データ変更のために一つの単位として扱う。一貫性の境界を定義し、強制する。

イベント

何かが起こったことを表す。

コマンド

システムが実行すべき仕事を表す。

サービス・レイヤー

システムが実行すべき仕事を定義し、さまざまなコンポーネントをオーケストレーションする。

ハンドラー

コマンドやイベントを受け取り、必要なことを実行する。

作業単位

データの完全性を抽象化する。各作業単位は原子性更新を表す。リポジトリを利用可能にする。検索されたアグリゲートの新しいイベントを追跡する。

メッセージバス(内部)

コマンドやイベントを適切なハンドラーにルーティングして処理する。

アダプター(セカンダリー)

我々のシステムから外界に向かう(I/O)インタフェースの具体的な実装。

リポジトリ

永続ストレージを抽象化する。各アグリゲートは独自のリポジトリを持つ。

イベントパブリッシャー

イベントを外部メッセージバスにプッシュする。

エントリーポイント(プライマリーアダプター)

外部からの入力をサービス層への呼び出しに変換する。

ウェブ

ウェブリクエストを受信し、コマンドに変換して内部のメッセージバスに渡す。

イベントコンシューマ

外部メッセージバスからイベントを読み取り、コマンドに変換して内部メッセージバスに渡す。

該当なし

外部メッセージバス(メッセージブローカー)

異なるサービスがイベントを介して相互通信するために使用するインフラの一部。

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

技術リーダーシップのための14のヒント

技術リーダーシップのための14のヒント

島田 浩二
Kubernetesで実践するクラウドネイティブDevOps

Kubernetesで実践するクラウドネイティブDevOps

John Arundel, Justin Domingus, 須田 一輝, 渡邉 了介
AWS上のシステム設計

AWS上のシステム設計

Jayanth Kumar, Mandeep Singh

Publisher Resources

ISBN: 9798341624863