cloud design pattern #3 compensating transaction_エンジニア勉強会20140917
Post on 19-Jun-2015
153 Views
Preview:
DESCRIPTION
TRANSCRIPT
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
Cloud Design Pattern#3 Compensating Transaction
2014/9/5
http://azure.microsoft.com/ja-jp/
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
Microsoft Azure Seminer行ってきました。
• みんなSurface Pro 3持ってた
• まだ発展途上感が強い
• あんまり商用利用じゃないのか?社内
システムのリプレースとか向け???
• 行き詰ったら、PowerShell
• 行き詰ったら、構成ファイルDL⇒メモ
帳書き換え⇒インポートhttp://azure.microsoft.com/ja-jp/
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
カテゴリ
可用性
データ管理
設計および実装
メッセージング
管理および監視
パフォーマンスおよびスケーラビリティ
回復性
セキュリティ
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
概要
順繰りトランザクション
Compensate = 相殺する、埋め合わせる
Powered by
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
概要
結果整合性、保ちます(ましょう)。
結果整合性(英: eventual consistency)は、並列プログラミングの分野、例えば、分散共有メモリ、分散トランザクション、楽観的レプリケーション、において用いられるデータの一貫性に関するモデルのひとつ。
これは厳密な一貫性を要求する考え方ではなく、結果的に一貫性が保たれればよいという考え方。長い間、データの更新がなければ、結果的に、全ての更新処理が反映され、全てのレプリケーションを含めたデータの一貫性が保たれる、とする。
Powered by
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
結果整合性
どんなケースで結果整合性を求められるか?
http://www.mongodb.org/
http://www.mongodb.org/
http://hbase.apache.org/
http://cloud.nifty.com/
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
背景と課題
単純なトランザクションだけでは、結果整合性を保てないケースがある。
単純なトランザクション
受注受注詳細配送
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
背景と課題
複雑なトランザクション
受注受注詳細配送
MySQL on EC-Orange
Some Tables
Other DataStores on
Other Systems
Some TablesSome Tables
???!
http://msdn.microsoft.com/en-us/library/dn600223.aspx
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
解決策
受注受注詳細配送
MySQL on EC-Orange
Some Tables
Other DataStores on
Other Systems
Some TablesSome Tables
異種データストア、システムに対して順次補正アクセスをかける
http://hiro2matome.seesaa.net/article/401763234.html
http://msdn.microsoft.com/en-us/library/dn600223.aspx
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
具体例(旅行システムの場合)
http://msdn.microsoft.com/en-us/library/dn600223.aspx
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
実装(あくまでイメージ)
補正手順
障害発生!補正手順ある??!
http://hiro2matome.seesaa.net/article/401763234.html
https://igor.io/2013/08/28/stack-machines-fundamentals.html
Copyright © 2014 by S-cubism Technology Inc. All rights reserved.
留意事項
1.いつ失敗したか、というのは簡単には分からない。即時のものとも限らない(ブロッキングされる)
ので、タイムアウトのメカニズムが必要。
2.補正ロジックは、簡単にはかけない。アプリ固有なので。
3.補正ロジックはべき等なコマンドであるべき。失敗しても再実行できるように。
top related