SlideShare a Scribd company logo
PF立上げの中で悩んだ整合性の話
Showcase Gig Inc.
PF開発チーム TL 田坂
行動履歴
注文履歴 / 会計履歴
ID API群
マスターデータ操作系
標準API
注文 会計 決済 etc...
店舗,商品参照
PF立ち上げの中で悩んだ整合性の話
我々の作っているシステム
O:der Platformを端的に表すと
飲食に関する価値あるマスターデータ とIDを軸としたAPI群
PF APIはプロダクトが使いやすいように、より 高凝集かつ疎結合な必要がある
飲食のプロダクトには多様な提供手法がある
・イートイン、テイクアウト、デリバリーなど
・プロダクト毎の機能は primitiveに見ると概ね同じ
価値あるマスターデータ
店舗構造 / メニュー構造
イベント通知
会計ステータス変更通知
注文ステータス変更通知
Product
※ 価値あるマスターデータとは、信憑性がありビジネス活用できたり、ユーザに恩恵のあるデータ
注文を例に整合性について考える
● 注文は会計や決済の事実と一対一の関係
● どれかが欠けた状態 (不整合)だと店舗での注文オペレーションが出来ないので 不整合を解消する必要 がある
PF立ち上げの中で悩んだ整合性の話
注文 会計 決済
完了
メール
注文の中の処理の内訳 (※テイクアウトのケース)
注文の整合性:分散トランザクションをしなかった時
Backend API
2. 注文
● 同一のDBトランザクションで実行すれば 2から5の
ステップのどこで失敗しても、 纏めてロールバック
ができる
● 強い一貫性を担保しやすい
4. 決済
3. 会計
5. メール配信
6. 成功
メール配信サーバ
1. 注文&決済
DBトランザクション
PF立ち上げの中で悩んだ整合性の話
どこかで失敗した時
Product Backend
2. 注文&決済の記録
5. 決済
4.会計
7. 調理予約+印刷
(非同期pub/sub)
9. 成功
オフライン連携 APIs
1. 注文&決済
Platform Basic APIs
3. 仮注文
6. 注文確定
8. メール配信
7-1. 調理予約の記録
7-2. 印刷
決済代行(他社)
結合度を下げるため
ビジネスロジックが非同期
で済むものは実装も
非同期にすることも
5-1. 決済
PF立ち上げの中で悩んだ整合性の話
注文の整合性:分散トランザクションをした時
一連の手続きにおいて、処理がサーバで別れている時
※ 特にPF事業をしていると遭遇しやすい
どんな時分散トランザクションになる?
Product Backend
2. 注文&決済の記録
失敗すると不整合が発生するケースもある
● 様々なところで失敗するケースがある
整合性解消の責務
● プロダクトによって整合性の定義が違うので、不整
合の解消責務はプロダクト側に おくべき
● しかし実現コストはこちらもある程度高い
○ 全体設計やアプリケーションコードの設計
にどう影響させるかが悩み所
5. 決済
4.会計
7. 調理予約+印刷
(非同期pub/sub)
9. 成功
オフライン連携 APIs
1. 注文&決済
Platform Basic APIs
3. 仮注文
6. 注文確定
8. メール配信
7-1. 調理予約の記録
7-2. 印刷
決済代行(他社)
5-1. 決済
失
敗
失
敗
前回の勉強会での
お悩み
PF立ち上げの中で悩んだ整合性の話
注文の整合性:分散トランザクションをした時
どこかで失敗した時
そもそもだけど、整
合性ってほんとに
大事なの?
増田さん
他に大事なこともっ
とあるんじゃない?
私たち
確かに。。
不整合を防ぐ方法に固執
していた。。
PF立ち上げの中で悩んだ整合性の話
そもそも
失敗すると不整合が発生するケースもある
● 様々なところで失敗するケースがある
整合性解消の責務
● プロダクトによって整合性の定義が違うので、不整
合の解消責務はプロダクト側に おくべき
● しかし実現コストはこちらもある程度高い
○ 全体設計やアプリケーションコードの設計
にどう影響させるかが悩み所
前回の勉強会での
お悩み
どこかで失敗した時
結論
一連の処理において不整合が起きた時
機能的に使えていれば良く、解消すべき不整合があっ
たときに解消できれば問題ない!
大事なこと
● 不整合に気づけること
● 不整合を解消できること
○ 手動や必要に応じて自動
実践したこと👍
● 不整合に気づけること
○ 失敗時のアラート
● 不整合が起きる ケースの洗い出し
○ どんな時にどのように
不整合を解消すべきかを整理
● 不整合を解消できること
○ PF側で不整合解消 APIの提供
■ 各種取り消しAPI
■ 一部自動解消job
○ プロダクト側での 手動解消機能の実装
PF立ち上げの中で悩んだ整合性の話
そもそも質問を受けて
そもそもだけど、整
合性ってほんとに
大事なの?
増田さん
他に大事なこともっ
とあるんじゃない?
私たち
確かに。。
不整合を防ぐ方法に固執
していた。。

More Related Content

Similar to PF立上げの中で悩んだ整合性の話「現場から学ぶ システム設計 座談会」

SAP API Management SIT Frankfurt
SAP API Management SIT FrankfurtSAP API Management SIT Frankfurt
SAP API Management SIT Frankfurt
Wim Snoep
 
What is Apigee.pdf
What is Apigee.pdfWhat is Apigee.pdf
What is Apigee.pdf
VishnuGone
 
Externalising Access to BI for Competitive Advantage
Externalising Access to BI for Competitive AdvantageExternalising Access to BI for Competitive Advantage
Externalising Access to BI for Competitive Advantage
Information Builders International
 
Connect 2017 catalyst accelerator for banking
Connect 2017 catalyst accelerator for bankingConnect 2017 catalyst accelerator for banking
Connect 2017 catalyst accelerator for banking
MuleSoft
 
Infinite pos
Infinite posInfinite pos
Infinite pos
Wirabumi Software
 
02 fundamentals of tally.erp9
02 fundamentals of tally.erp902 fundamentals of tally.erp9
02 fundamentals of tally.erp9
balvenkat
 
SilverStripe as a Business Intelligence System
SilverStripe as a Business Intelligence SystemSilverStripe as a Business Intelligence System
SilverStripe as a Business Intelligence System
Cam Findlay
 
Why you need PIM and how to choose it.
Why you need PIM and how to choose it.Why you need PIM and how to choose it.
Why you need PIM and how to choose it.
Magetips
 
What is an erp
What is an erpWhat is an erp
What is an erp
Sam Gupta
 
Foodservice and CPG Mobile Order Management
Foodservice and CPG Mobile Order ManagementFoodservice and CPG Mobile Order Management
Foodservice and CPG Mobile Order Management
Ai2
 
Mobile Order Management - iPad or Windows - Sales Force Automation
Mobile Order Management - iPad or Windows - Sales Force AutomationMobile Order Management - iPad or Windows - Sales Force Automation
Mobile Order Management - iPad or Windows - Sales Force Automation
Ai2
 
apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...
apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...
apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...
apidays
 
Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...
Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...
Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...
MagentoImagine
 
2020 Architectural View
2020 Architectural View2020 Architectural View
2020 Architectural View
TOPP Tactical Intelligence Ltd
 
Do You Really Need a Data Warehouse? Avoid the Downsides Typically Associated...
Do You Really Need a Data Warehouse? Avoid the Downsides Typically Associated...Do You Really Need a Data Warehouse? Avoid the Downsides Typically Associated...
Do You Really Need a Data Warehouse? Avoid the Downsides Typically Associated...
Senturus
 
PixaSuite AI Review 🎁 (Bonus Worth $997).pdf
PixaSuite AI Review 🎁 (Bonus Worth $997).pdfPixaSuite AI Review 🎁 (Bonus Worth $997).pdf
PixaSuite AI Review 🎁 (Bonus Worth $997).pdf
md Sanaullah
 
Procure To Pay and Source To Pay
Procure To Pay and Source To PayProcure To Pay and Source To Pay
Procure To Pay and Source To Pay
Srinivas Kolluri
 
Introduction To Msbi By Yasir
Introduction To Msbi By YasirIntroduction To Msbi By Yasir
Introduction To Msbi By Yasir
yasir873
 
Just another erp presentation
Just another erp presentationJust another erp presentation
Just another erp presentation
Hamid Hussain
 
APIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside OutAPIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside Out
3scale
 

Similar to PF立上げの中で悩んだ整合性の話「現場から学ぶ システム設計 座談会」 (20)

SAP API Management SIT Frankfurt
SAP API Management SIT FrankfurtSAP API Management SIT Frankfurt
SAP API Management SIT Frankfurt
 
What is Apigee.pdf
What is Apigee.pdfWhat is Apigee.pdf
What is Apigee.pdf
 
Externalising Access to BI for Competitive Advantage
Externalising Access to BI for Competitive AdvantageExternalising Access to BI for Competitive Advantage
Externalising Access to BI for Competitive Advantage
 
Connect 2017 catalyst accelerator for banking
Connect 2017 catalyst accelerator for bankingConnect 2017 catalyst accelerator for banking
Connect 2017 catalyst accelerator for banking
 
Infinite pos
Infinite posInfinite pos
Infinite pos
 
02 fundamentals of tally.erp9
02 fundamentals of tally.erp902 fundamentals of tally.erp9
02 fundamentals of tally.erp9
 
SilverStripe as a Business Intelligence System
SilverStripe as a Business Intelligence SystemSilverStripe as a Business Intelligence System
SilverStripe as a Business Intelligence System
 
Why you need PIM and how to choose it.
Why you need PIM and how to choose it.Why you need PIM and how to choose it.
Why you need PIM and how to choose it.
 
What is an erp
What is an erpWhat is an erp
What is an erp
 
Foodservice and CPG Mobile Order Management
Foodservice and CPG Mobile Order ManagementFoodservice and CPG Mobile Order Management
Foodservice and CPG Mobile Order Management
 
Mobile Order Management - iPad or Windows - Sales Force Automation
Mobile Order Management - iPad or Windows - Sales Force AutomationMobile Order Management - iPad or Windows - Sales Force Automation
Mobile Order Management - iPad or Windows - Sales Force Automation
 
apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...
apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...
apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...
 
Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...
Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...
Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...
 
2020 Architectural View
2020 Architectural View2020 Architectural View
2020 Architectural View
 
Do You Really Need a Data Warehouse? Avoid the Downsides Typically Associated...
Do You Really Need a Data Warehouse? Avoid the Downsides Typically Associated...Do You Really Need a Data Warehouse? Avoid the Downsides Typically Associated...
Do You Really Need a Data Warehouse? Avoid the Downsides Typically Associated...
 
PixaSuite AI Review 🎁 (Bonus Worth $997).pdf
PixaSuite AI Review 🎁 (Bonus Worth $997).pdfPixaSuite AI Review 🎁 (Bonus Worth $997).pdf
PixaSuite AI Review 🎁 (Bonus Worth $997).pdf
 
Procure To Pay and Source To Pay
Procure To Pay and Source To PayProcure To Pay and Source To Pay
Procure To Pay and Source To Pay
 
Introduction To Msbi By Yasir
Introduction To Msbi By YasirIntroduction To Msbi By Yasir
Introduction To Msbi By Yasir
 
Just another erp presentation
Just another erp presentationJust another erp presentation
Just another erp presentation
 
APIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside OutAPIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside Out
 

Recently uploaded

一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
sydezfe
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
um7474492
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
ijaia
 
Zener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and ApplicationsZener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and Applications
Shiny Christobel
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
Roger Rozario
 
Height and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdfHeight and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdf
q30122000
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Transcat
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
PriyankaKilaniya
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
mahaffeycheryld
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...
cannyengineerings
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 

Recently uploaded (20)

一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Zener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and ApplicationsZener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and Applications
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
 
Height and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdfHeight and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdf
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 

PF立上げの中で悩んだ整合性の話「現場から学ぶ システム設計 座談会」