Download presentation
Presentation is loading. Please wait.
Published byCynthia Walsh Modified over 9 years ago
4
Database Design Table design Index design Query design Transaction design Capacity Size limits Partitioning (shard) Latency Redundancy Replica overhead Distance Affinity Groups SQL Azure Data Sync Sync Fx Concurrency Replication SQL Azure Data Sync Partitioning (shard) Scalability Scale-up Not an option Scale-out Partitioning (shard) SQL Azure Data Sync
8
Elastic scale – database as a service Pay as you grow and shrinkPay as you grow and shrink Easy to provision and manage database No hardware, no manual database administration required Promotions, events, ticket selling businesses are “bursts – bound” by nature Capacity constraints limit business agilityCapacity constraints limit business agility High costs of entry into new businessHigh costs of entry into new business Difficult to roll out extra capacity quicklyDifficult to roll out extra capacity quickly Idle capacity “off-bursts” is cost prohibitive Capacity Time “Capacity Bursting“ Average Usage Compute # of Hr’s Challenges Today
9
T1 T2T3T4 T5 T6 T7T8T9 T10 T11 T12T13T14 T15 T16 T17T18T19 T20 All my data is handled by one DB on one server All my data is handled by one DB on one server
11
Covered by SQL Azure today Coming up in SQL Azure: Federations
12
Data1Data2Data3Data4Data5 Con- fig
13
Federation “CustData” Member: [min, 100) AU PK= 5 AU PK=25 AU PK=35 Member: [100, 488) AU PK=10 5 AU PK=23 5 AU PK=36 5 Member: [488, max) AU PK=55 5 AU PK=25 45 AU PK=35 65 (Federation Key: CustID)
14
Federation “Orders_Fed” (Federation Key: CustID)
15
Member: [min, max) SalesDB orders Products zipcode
16
Federation “Orders_Fed” (Federation Key: CustID) Member: [min, max) SalesDB orders Products zipcode Member: [min, 100) orders zipcode Member: [100, max) zipcode orders
17
Member: [min, 100) AU PK=5 AU PK=25 AU PK=56 App zipcode
20
CREATE FEDERATION Orders_Fed (RANGE BIGINT) USE FEDERATION Orders_Fed(0) WITH FILTERING=OFF CREATE TABLE orders(orderidbigint, odatedatetime, customeridbigint, primary key (orderid, customerid)) FEDERATE ON (customerid) CREATE UNIQUE INDEX o_idx1 on orders(customerid, odate) CREATE INDEX o_idx2 on orders(odate) CREATE TABLE orderdetails(orderdetailidbigint, orderidbigint, partidbigint, customeridbigint, primary key (orderdetailid, customerid)) FEDERATE ON (customerid) ALTER TABLE orderdetails add constraint orderdetails_fk1 foreign key(orderid,customerid) references orders(orderid,customerid) CREATE TABLE uszipcodes(zipcodenvarchar(128) primary key, state nvarchar(128))
21
Connect to: InitialCatalog=‘SalesDB’ – get some regular work done (within customer 239) USE FEDERATION Orders_fed(239) WITH FILTERING=ON SELECT * FROM Orders JOIN OrderDetailsON … INSERT INTO Orders (customerid, orderid, odate) VALUES (239, 2, ‘5/7/2010’) – get some cross-customer work done USE FEDERATION Orders_fed(0) WITH FILTERING=OFF DELETE from Orders WHERE odate < ‘1/1/2000’ - Repeat for other members… -- go back to root USE FEDERATION ROOT UPDATE CleanupSchedule set LastCleanupDate = GETSYSTIME()
22
--Day#2 business grows! ALTER FEDERATION Orders_FedSPLIT AT(1000) --Day#3 black friday! ALTER FEDERATION Orders_FedSPLIT AT(100) ALTER FEDERATION Orders_FedSPLIT AT(200,300,400…) --Day#4 recession hits! ALTER FEDERATION Orders_FedMERGE AT(100) --Day#5 oh boy… double dip. ALTER FEDERATION Orders_FedMERGE AT(200,300,400…)
25
SQL Server to SQL Azure Sync Sync Benefits Makes cloud extension rather than replacement Enables moving workload to cloud in stages preserving investment in existing infrastructure New scenarios spanning enterprise, cloud SQL Azure
26
Benefits Geo- synchronization of data across data centers Scale-out read or read/write
27
SQL Azure to SQL Server Sync Benefits Share data with remote and retail offices, bringing data closer to the end-users Lower latency – data access doesn’t require round trips Higher availability – app still runs if server is unreachable Reduced network utilization – most data access is local SQL Azure
28
On-Premises Applications Sync Offline Applications Sync SQL Azure Database Sync SQL Azure Data Sync http://azure.com SQL Azure Data Sync CTP2 (Coming in near future) Microsoft Sync Framework 4.0 CTP available now! Sync Retail & Remote Offices SQL Azure Data Sync CTP1 (Available now from http://azure.comhttp://azure.com)
30
Offline Client Server / Service Remote Store Local Data Cache Client App Sync Query / Update
31
Sync Simple protocol (OData& Sync) Minimal client & store requirements Client API support Client API support Windows Server / IIS Sync Endpoints Sync Endpoints Auth / Mgmt / Bus Logic SyncFx SQL Server WindowsAzure Sync Endpoints Sync Endpoints Auth / Mgmt / Bus Logic SyncFx SQL Azure Sync smarts on server, not on client Easy to develop the sync endpoints Client API support Client API support Sync Framework v4 Overview
32
Isolated Storage Provider OData Sync Proxy Cache Controller Windows Azure Application SQL Azure Provider SQL Azure Provider Sync Logic Silverlight Offline Application Isolated Storage Collections Silverlight Offline Application Sync OData Sync Endpoint Business Logic
34
Isolated Storage Provider Silverlight Offline Application OData Sync Proxy Cache Controller Sync Logic Moves to Server/Service Enables Offline In Isolated Storage with Silverlight 3 & 4 Extensibility to allow 3 rd party storage to be hooked in Isolated Storage Sync Logic Collections Silverlight Offline Client Windows Azure Application SQL Azure Provider SQL Azure Provider Sync Logic OData Sync Endpoint Business Logic Sync
35
Client Needs To: Track changes on local store (samples for common stores). Implement client side sync proxy (samples for common platforms) Sync Application OData Sync Proxy Store Collectio ns Offline application on any platform Windows Azure Application SQL Azure Provider SQL Azure Provider Sync Logic OData Sync Service Business Logic Sync
36
Sync Application OData Sync Proxy Store Collectio ns Offline application on any platform Windows Azure Application SQL Azure Provider SQL Azure Provider Sync Logic OData Sync Service Business Logic Sync Simple protocol (OData & Sync)
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.