3/21/2017 5:15 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
萩原 正義 アーキテクト マイクロソフト株式会社 3/21/2017 5:15 PM クラウド コンピューティングの エッセンス 萩原 正義 アーキテクト マイクロソフト株式会社 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Agenda アプリケーション開発を通じて Azure を理解する Windows Azure Scale out 設計の指針 開発手法 3/21/2017 5:15 PM Agenda アプリケーション開発を通じて Azure を理解する Windows Azure Scale out 設計の指針 開発手法 まとめ © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Azure™ Services Platform
Azure の可用性の実現法 インメモリデータだけで可用性を実現可能か? 複数の Replica(複製)をノード間で持ち合う 3/21/2017 5:15 PM Azure の可用性の実現法 インメモリデータだけで可用性を実現可能か? 複数の Replica(複製)をノード間で持ち合う primary と secondary(replica) 書き込みは primary へ ノードの障害: 別ノードを参加させ複製 primary の複製、secondary の複製 ノード間の通信障害: 2つの問題 Replica への複製(log shipping)をデータ更新と非同期で実行 Replica を持つノードからの応答を多数決で判断 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
構造化オーバーレイ(1) Scale out による負荷分散、スケーラビリティの実現 データ/インスタンス(インメモリ)を膨大なノードが分担 3/21/2017 5:15 PM 構造化オーバーレイ(1) Scale out による負荷分散、スケーラビリティの実現 トランザクションスループット 同時アクセスユーザ数 データ量 データ/インスタンス(インメモリ)を膨大なノードが分担 mod N だと負荷分散はするが、ノードの追加、削除での再配置コストが高く、ノード数増大で限界 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
構造化オーバーレイ(2) consistent hashing ノードの追加、削除による再配置の局所化 3/21/2017 5:15 PM 構造化オーバーレイ(2) consistent hashing ノードの追加、削除による再配置の局所化 ノードとデータ/インスタンスの双方に ID を振る 時計周りの最初のノード(Chord)、ID が数値的に最も近い(Pastry)などが代表的アルゴリズム Azure は双方向 Chord 到達までのホップ数と経路表のエントリー数はトレードオフ ノード数が増大しないとペイしない(no-hop を超えるノード数) ノード数が少なければ全員は全員を知っていればよい ノードが自律的に障害を監視し、到達経路を自動調整 全体を管理するノードが直接到達させることも可能 データ/インスタンスの冗長化、一貫性などは上位プロトコルが解決 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
DHT アーキテクチャ 構造化オーバーレイの抽象化レイヤー ルーティング層 DHT (Distributed Hash Table) 3/21/2017 5:15 PM DHT アーキテクチャ 構造化オーバーレイの抽象化レイヤー ルーティング層 DHT (Distributed Hash Table) 上位アプリケーション 出典: Towards a Common API for Structured Peer-to-Peer Overlays © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
機構と動作 データオーバーレイによる可用性 3/21/2017 5:15 PM 機構と動作 データオーバーレイによる可用性 Service Instance C, D A, B, E, F Service Instance 可用性のために複製を使う Primary から自動フェイルオーバーで最も近い secondary へ C, D A, B, E, F C, D A,B, E, F, H E, F C, D, G, H E, F, H C, D, G, I, J C, D A, B, E,F,H E, F, H C, D,G, I, J E, F C, D,G, H 1 53 905 6435 5000 5501 1 53 905 6435 5501 f(G) = 4601 Service Instance X G, H E, F, I, J Service Instance A, B C, D, K, L G G Service Instance Service Instance Replica Size = 3 K, L A, B, G, I, J K, L A, B, I, J I, J, G K, L, E, F, H I, J K, L, G, H K, L A, B,G, I, J K, L A, B, I, J I, J K, L,G, H I, J, G K, L,E, F, H Service Request 2128 Logical Partitions A, B C, D E, F G H I, J K, L X Service Instances © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
CAP Consistency、Availability、Partition 定理 A C P A C P A C P 3/21/2017 5:15 PM CAP Consistency、Availability、Partition 定理 C A P Consistency + Availability 単一サイト / クラスタデータベース C A P Consistency + Partition 分散データベース / 分散ロック C A P Availability + Partition 分散キャッシュ / DNS © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
クラウドに対する scale out 設計の指針 一貫性よりも可用性 3/21/2017 5:15 PM クラウドに対する scale out 設計の指針 一貫性よりも可用性 スケーラビリティのパターン 機能、データ、トランザクションの分割 アーキテクチャ定義 機能分割: SOA に基づくサービス単位化 データ分割: partition scheme に従う水平分割 アプリケーション設計(ユースケース依存) 分散トランザクションの回避: 分割したデータ間の一貫性の確保 非同期による機能分割: メッセージ転送の信頼性の設計(exact- once semantics、in-order) キャッシュの設計: 主に読み取りデータ向け (仮想化: partition、データベース、ノードの追加削除による可用 性、スケーラビリティ) © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
開発手法(1) 概念、論理レベル: 分割 機能領域(SOA) もの/こと分析(DOA)マスター/トランザクションデータの配置 役割、用途の分離 関数従属性を持つまとまりの分離(正規化) 静的/動的データ、データ量の大小で垂直分割
SOA のサービス集約によるアプリケーション 3/21/2017 5:15 PM SOA のサービス集約によるアプリケーション Customer Portal Supplier Portal 凡例 INTERNET INTERNET Firewall Sales Force Portal Customer Service Portal アプリケーション アーキテクチャ INTRANET Browser Client WebSite Management eSales CRM Collaborative Planning Demand Fulfillment Business Process Service Catalog Management Order Management Campaigns Customer Service コンポーネント アーキテクチャ Stock Replenishment Customer Setup Shopping Carts Market Syndication Sales Force & Leads Customer Self Service Source & Manage Suppliers Seller Reporting Customer Management Business Entity Service サービス アーキテクチャ New Application Code New Application Database コンポーネント アーキテクチャ Legacy Package Legacy Application Legacy Database Stores & Purchasing Sales & Marketing Production Engineering Accounting © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
データ類型化と配置 安定性 正規化 不変性 同時更新 適用技術 通常 いいえ はい とても 変化しやすい 非常に高い 同時性 はい 3/21/2017 5:15 PM 安定性 正規化 不変性 同時更新 適用技術 データ類型化と配置 マスターデータ 通常 いいえ はい とても 変化しやすい 非常に高い 同時性 パーティション分割 (更新)、 キャッシュ& レプリケーション (参照) バージョン管理された 参照データ はい 場合により はい: 各バージョンで 一度だけ 書き込み 変更なし キャッシュ& レプリケーション (参照) メッセージ はい 場合により はい: 一度だけ 書き込み 変更なし キャッシュ& レプリケーション (参照) トランザクション データ はい 場合により いいえ (例、カート) 非常に低い 同時性 ローカル データベース (更新)、 キャッシュ& パーティション分割 (参照) バージョン管理された参照データ、メッセージは更新なし データ類型化の例 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
データアーキテクチャの原則 マスターデータ データ 参照のみ ウェアハウス 3/21/2017 5:15 PM データアーキテクチャの原則 トランザクションデータ集計 計画系、在庫、サマリー マスターデータ データ ウェアハウス 参照のみ AP: rich client、Web page、business logic、service provider、Azure Web role など AP1 トランザクション データ ETL AP2 AP3 トランザクション データ AP4 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
開発手法(2) 論理、物理レベル 複合化:非正規化(主に Azure Table の場合) 分割 非同期を考慮したトランザクション(一貫性)スコープ 分割 Partition scheme と Partition Key の決定 SDS Container による分割
トランザクション スコープ 製品、部品カタログ管理 CRM 1 1 * * 1 1 * * 1 * * * * ERP 1 * コンポーネント/サブシステムへの分類 (プロセスからの利用)、ネットワーク配置は まだ考慮しない。 トランザクション スコープ 製品、部品カタログ管理 Trading partners (Manufacturers, Inventories) Car type Part Code Year Code Description CRM User Directory 1 1 * * Customer Car Part used Employee Code Name Serial Number Color Quantity Cost Code Name 1 1 * * 1 * Car repair Repair made * Entry Date, Exit Date Faults presented Problem solved Labor description Wasted hours * * ERP 1 Accounts Receivable Code: 共通メタデータ Due date, payment date Installment number Value, ... 共通 Entity * データモデル管理 アプリケーション
N-tier モデルのボトルネック Web サーバ ビジネスロジック ロードバランサ データベース 3/21/2017 5:15 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Partition Key の例 Azure Table による設計例 3/21/2017 5:15 PM Partition Key の例 Azure Table による設計例 Table は表ではないが、テーブルプログラミングモデルを持つ Table のエントリは Partiton Key の違いで物理ノードに分散配置 物理設計で Partition Key 付与(なくてもよい) 実際の Partition Key はアプリケーション依存処理で決定してもよい 氏名、地域、サプライヤ、時期、特定属性など操作(検索)スコープを考慮 Partition Key Customer id Row Key 変更 日時 Property 3 住所 (都道府県) …. Property N 記述 100211 2008/3/3 神奈川県 萩原さん 2008/7/26 東京都 100212 2008/4/11 野村さん 100214 2007/1/1 千葉県 福井さん 2009/1/1 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Entity データ(非正規化) 関係テーブル Windows Azure テーブル Row group Row group 3/21/2017 5:15 PM Entity データ(非正規化) 関係テーブル Windows Azure テーブル Partitioning Key Row Key CId Conf Title 1 PDC 2 Tech Ready Conf Id Track Session Title Subject 1 Null PDC Cloud Compute Live Meeting 2 Tech Ready SQL Server 2008 SQL Server FILESTREAM TId CId Track Title 1 Cloud Compute 2 SQL Server 2008 Row group Row group SId CId TId Session Subject 1 Live Meeting 2 SQL Server FILESTREAM Primary Key © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Entity データモデル(1) Entity は、データ分割=partition 単位 3/21/2017 5:15 PM Entity データモデル(1) Entity は、データ分割=partition 単位 その性質上、物理モデルだが、トランザクションや意味のまとまりとして概念、論理レベルで定義 Key-value で value に key-value をネスト Entity 間のトランザクションを禁止することで、データ分割と分散トランザクションの回避の両方を実現: scalability pattern © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Entity データモデル(2) Table のトランザクションモデル Table 間のトランザクションはなし Entity の CUD は ACID トランザクション Partition の R は スナップショット隔離レベル Table 間のトランザクションはなし コミット前のトランザクション実行操作で Queue に記録を残し、クラッシュ時は Queue の記録に基づき、再実行 検索や join の実装は関数型の領域 F#、Dryad、MapReduce(C++)
プログラミング構成モデル ACE E: 記憶の単位 A: フェイルオーバーの単位(パーティション) C: 一貫性の単位 3/21/2017 5:15 PM プログラミング構成モデル ACE E: 記憶の単位 CRUD 操作を提供 例、DB row, SDS entity A: フェイルオーバーの単位(パーティション) 管理の単位 一貫性の単位の集合 システムが決定 一貫性の単位で分割または複合化 C: 一貫性の単位 記憶の単位の集合 アプリケーションが指定 例、Row group, Database, SDS Container © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
データモデル Entity Entity 毎に property やその型が異なってよい 異なる種別 異なる インスタンス 型 Type Value Metadata ID EntityId VWGOLF-01 Kind EntityKind Car FlexProps Description String Reliable, one owner, … Price Numeric 12000.00 ListingDate Datetime 01-01-2008 LocationZip 98052 異なる種別 異なる インスタンス 型 Property Type Value Metadata ID EntityId MINICOOPER-264 Kind EntityKind FunCar FlexProps Description String Reliable, one owner, … Price Numeric 12000.00 ListingDate 1st January, 2008 LocationZip 98052 EngineSize 1600 追加の Property
Table 定義の例 ADO.NET Data Services による Table Entities は CLR Class で定義 3/21/2017 5:15 PM Table 定義の例 ADO.NET Data Services による Table Entities は CLR Class で定義 [DataServiceKey("PartitionKey", "RowKey")] public class Customer { // Partition key – Customer Last name public string PartitionKey { get; set; } // Row Key – Customer First name public string RowKey { get; set; } // User defined properties here public DateTime CustomerSince { get; set; } public double Rating { get; set; } public string Occupation { get; set; } } © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
オペレーションレベルの 宣言型トランザクション .NET(C#) using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options)) { string strCmd = "SQL to Execute"; conn = new SqlClient.SqlConnection("Connection to DB1"); conn.Open(); objCmd = new SqlClient.SqlCommand(strCmd, conn); objCmd.ExecuteNonQuery(); } Seasar2 container(Java) @TransactionAttribute(TransactionAttributeType.NEVER) public class XxxService { public void foo() { ・・・ @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) public void bar() { 出典: IBM developerWorks Japan
Azure Storage と SDS Queue(トランザクションデータ) から Table、Blob(マスターデータ) を参照 3/21/2017 5:15 PM Azure Storage と SDS Queue(トランザクションデータ) から Table、Blob(マスターデータ) を参照 SDS Authority SDS Container Account Container Blob Block Block AAAB Movies MOV1.AVI Block AAAC 垂直分割 Catalog Table Entity Block AAAA Products Car Resale Account VWGOLF MINICOOPER 水平、垂直分割 (ボトルネックの課題) Order Entry Queue Message Orders Order#=0012 Order#=0013 水平分割 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Container による一貫性スコープ SDS による設計例 3/21/2017 5:15 PM Container による一貫性スコープ SDS による設計例 Car Resale Authority データモデルで定義 データ特性の一種と考える 検索スコープ、joinのスコープから決定 同質 Container と異質 Container の2種 負荷分散、並列処理のために分割する Catalog Container Product Entities 検索スコープ 検索し、挿入 Order Entry Container Order Entities Join Customer Entity Order Detail Entities © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
開発手法(3) 論理、物理レベル その他 キャッシュ スキーマ変更の戦略 ドメインドリブン設計のドメインモデルとのマップ 一貫性の解決法 REST Resource とのマップ URI scheme の決定 SDS / ADO.NET Data Services(on-premise) その他 キャッシュ キャッシュ配置と有効期限 スキーマ変更の戦略
ドメインドリブン設計 出典: Using ADO.NET Entity Framework in Domain-Driven Design: 3/21/2017 5:15 PM ドメインドリブン設計 出典: Using ADO.NET Entity Framework in Domain-Driven Design: A Pattern Approach © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
REST アプリケーションの例 名詞(Resource)を発見する URI Template による表現 3/21/2017 5:15 PM REST アプリケーションの例 名詞(Resource)を発見する URI Template による表現 /{expense-id}/{line-item} 操作開始の Resources の定義 開始の URI、http://expenses.example.com/v1 Resource URI Bill の経費報告書 /users/bill/expenses 経費報告書 #123 /users/bill/expenses/123 すべての経費報告書 (見る権限があるもの) /expenses/ すべての未承認(新規など)の経費報告書 /expenses;pending (new, etc.) Bill の未承認の経費報告書 /users/bill/expenses;pending 経費報告書 #123 のデータ項目 /users/bill/expenses/123/line_items 経費報告書 #123 のデータ項目の2 行目 /users/bill/expenses/123/line_items/2 2006年の経費報告書 /2006/expenses/ 2006年の未承認の経費報告書 /2006/expenses;submitted © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
REST Resource の抽象化 Layer Client (Ajax、Smart Client) Web Server 3/21/2017 5:15 PM REST Resource の抽象化 Layer Presentation Resource Logic/Domain Entity Data Client (Ajax、Smart Client) Web Server (SDS Container) Application Server (SOA service) Data Server、 (Cloud DB) トランザクション・コンテキスト © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
アプリケーション アーキテクチャ インターネット Web ロール ストレージサービス ワーカーロール ロード バランサ N-tier モデル 3/21/2017 5:15 PM アプリケーション アーキテクチャ インターネット Web ロール ストレージサービス ワーカーロール ロード バランサ N-tier モデル 密結合が前提 障害がないことが前提 ACID トランザクションが前提 データ層がボトルネック 新しいアーキテクチャ Scale out Key-value データ 非一貫性モデル 非同期 REST、AtomPub 関数型での処理 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
補償トランザクション Client Order Shipping Notify Transaction 1 Transaction 2 3/21/2017 5:15 PM 補償トランザクション Client Order Shipping Notify Transaction 1 Transaction 2 Transaction 3 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
機構と動作 データオーバーレイによる可用性 3/21/2017 5:15 PM 機構と動作 データオーバーレイによる可用性 Service Instance C, D A, B, E, F Service Instance 可用性のために複製を使う Primary から自動フェイルオーバーで最も近い secondary へ C, D A, B, E, F C, D A,B, E, F, H E, F C, D, G, H E, F, H C, D, G, I, J C, D A, B, E,F,H E, F, H C, D,G, I, J E, F C, D,G, H 1 53 905 6435 5000 5501 1 53 905 6435 5501 f(G) = 4601 Service Instance X G, H E, F, I, J Service Instance A, B C, D, K, L G G Service Instance Service Instance Replica Size = 3 K, L A, B, G, I, J K, L A, B, I, J I, J, G K, L, E, F, H I, J K, L, G, H K, L A, B,G, I, J K, L A, B, I, J I, J K, L,G, H I, J, G K, L,E, F, H Service Request 2128 Logical Partitions A, B C, D E, F G H I, J K, L X Service Instances © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Consistency model 適用分野 3/21/2017 5:15 PM Consistency model 適用分野 Immediate Consistency オークション、 送金 Eventual Consistency 検索エンジン 課金、 営業ステータス No Consistency 特定のユーザ プロファイル © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
補償トランザクション 非一貫性の解決 ローカル replica 変更の遅延による非一貫性 3/21/2017 5:15 PM 補償トランザクション 非一貫性の解決 ローカル replica 変更の遅延による非一貫性 Azure Storage の上位のアプリケーションが一貫性モデルを構築 SDS Container など 操作毎の一貫性条件 トランザクションスコープを非同期処理により分割 例、カタログ、注文、与信、決済、在庫、顧客情報など © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
関数型データフロー データストリームによる Unit of Work 出典: http://www.cascading.org/
まとめ Azure によるスケーラビリティの実現 アーキテクチャ先行定義の原則 論理レベルの設計モデルの選択 SOA に基づく機能分割 機能分割に従ったデータ分割 Entity 定義によるデータ分割と分散トランザクション回避 Role によるサービス契約、コンポーネント化、ホスト選択 Queue による非同期通信と信頼性のある転送 キャッシュの利用 アーキテクチャ先行定義の原則 データ類型化とデータアーキテクチャ ドメインモデルとアプリケーションアーキテクチャ 論理レベルの設計モデルの選択 REST Resource とのマップ パラダイムの選択、抽象化モデルの定義 トランザクションスコープ、一貫性要求と補償処理
3/21/2017 5:15 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.