Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
サーバーレスで実装するイベントドリブンアーキテクチャ
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
kojikojisan
March 13, 2025
18
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
サーバーレスで実装するイベントドリブンアーキテクチャ
kojikojisan
March 13, 2025
More Decks by kojikojisan
See All by kojikojisan
AIワークショップ仙台-Vol.1
kojikojisan
0
41
AI エージェント開発で見えたエンジニアの役割
kojikojisan
0
250
Amazon Nova understanding models に触れてみた
kojikojisan
0
18
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Agile that works and the tools we love
rasmusluckow
331
22k
First, design no harm
axbom
PRO
2
1.3k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
30 Presentation Tips
portentint
PRO
1
430
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
540
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
600
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Transcript
サーバーレスで実装する イベントドリブンアーキテクチャ 兒島 祐輔(KOJIMA Yusuke) 1
2 兒島 祐輔 (KOJIMA Yusuke) 出身:埼玉県 所沢市 趣味:読書 活動:AWS案件支援 生成AI活用
社内DX推進 好きなサービス:EventBridge, Lambda 自己紹介
3 “サーバレス” と “イベントドリブンアーキテクチャ” イベントドリブンアーキテクチャはサーバーレス環境で効果を発揮する • サービス間が疎結合 ⇒ 柔軟な拡張が可能 •
イベント発生時のみ処理を実行 ⇒ 従量課金が最小限
4 ユーザーが商品の注文を完了した際のイメージ イベントドリブンアーキテクチャ(1/3) Users 注文受付 在庫管理 配送管理 売上集計 受注完了 イベント
Users 注文受付 在庫管理 配送管理 顧客通知 リクエスト・レスポンス イベントドリブン
5 注文完了後に新たな処理を追加する際のイメージ イベントドリブンアーキテクチャ(2/3) Users 注文受付 在庫管理 配送管理 顧客通知 受注完了 イベント
顧客分析 Users 注文受付 在庫管理 配送管理 顧客通知 顧客分析 ロジック 修正 リクエスト・レスポンス イベントドリブン
6 イベントドリブンアーキテクチャ(3/3) イベントドリブンアーキテクチャは非同期にイベントを通じて処理を実行するサービス設計 通信モデル 結合度 スケーラビリティ エラーハンドリング データの一貫性 1対1の同期的な通信 1対多の非同期的な通信
比較的強い結合 スケーリングが比較的難しい 直接的なエラー処理が可能 強い一貫性を保ちやすい ほとんど疎結合 各処理が独立してスケーリング エラー処理が複雑になる 最終的一貫性モデルが多い リクエスト・レスポンス イベントドリブン
7 Amazon EventBridge で実現するイベントドリブン Event Event bus Rule Event Event
AWS Cloud SaaS Application Servers Rule Rule Amazon EventBridge Instances AWS CloudTrail AWS Step Functions AWS Lambda Amazon Simple Queue Service (Amazon SQS) サーバーレスなイベントドリブンアーキテクチャ (1/4)
8 AWS Lambda Amazon EventBridge AWS Step Functions Amazon Simple
Notification Service (Amazon SNS) AWS Lambda Instances サーバーレスなイベントドリブンアーキテクチャ (2/4) Amazon EventBridge で実現するイベントドリブン
イベント定義する際は標準仕様 CloudEvents を参考にする 9 { "specversion" : "1.0", "type" :
"com.example.submit_order.opened", "source" : "https://example.com/cloudevents/spec/submit", "subject" : "123", "id" : "A234-1234-1234", "time" : "2018-04-05T17:31:00Z", "comexampleextension1" : "value", "comexampleothervalue" : 5, "datacontenttype" : "application/json", "data" : { "appinfoA" : "abc", "appinfoB" : 123, "appinfoC" : true } } サーバーレスなイベントドリブンアーキテクチャ (3/4)
イベントドリブンアーキテクチャはサーバーレス環境で効果を発揮する • サービス間が疎結合 ⇒ 柔軟な拡張が可能 • イベント発生時のみ処理を実行 ⇒ 従量課金が最小限 10
サーバーレスなイベントドリブンアーキテクチャ (4/4) サーバーレスで設計する際 • その処理は同期処理でなければいけないのか? • その処理はイベントドリブンで表現できないのか? AI 活用が進む今だからこそイベントドリブンアーキテクチャを考える
11 Thank you!