cloud application architecture with sql azure and windows azure
DESCRIPTION
In this presentation we review the database development with SQL Azure and Windows Azure.RegardsEduardo Castro MartinezTRANSCRIPT
![Page 1: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/1.jpg)
Cloud Application Architecture with SQL Azure and Windows AzureDr. Eduardo Castro MartínezMicrosoft [email protected]
http://comunidadwindows.orghttp://ecastrom.blogspot.com
![Page 2: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/2.jpg)
Session Objectives
Provide a big-picture view of the SQL Server in the Cloud
Provide a big-picture view of the Windows Azure platform
Describe typical scenarios for using the Windows Azure platform
![Page 3: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/3.jpg)
Agenda
Cloud Computing PlatformUnderstanding Cloud ComputingCloud Computing Security Cloud Computing and Standards
Creating Cloud Aware ApplicationsWindows Azure Platform
![Page 4: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/4.jpg)
4
Computing Evolution
Now40’s 70’s 80’s
•Mobility explosion•Collaboration•High level of interconexion between users•Web platform growing•Pressure over companies data centre.
![Page 5: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/5.jpg)
Issues Facing Developers
70% of Web Development Effort is “Muck”: Data Centers Bandwidth / Power / Cooling Operations Staffing
Scaling is Difficult and Expensive: Large Up-Front Investment Invest Ahead of Demand Load is Unpredictable
![Page 6: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/6.jpg)
Solution: Web-Scale ComputingScale capacity on demand
Turn fixed costs into variable costs
Always available
Rock-solid reliability
Simple APIs and conceptual models
Cost-effective
Reduced time to market
Focus on product & core competencies
![Page 7: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/7.jpg)
THE CLOUD GENERAL CONCEPTS
![Page 8: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/8.jpg)
Typical Application Grow?
Users
Servers
Add some Web Servers
Buy bigger SQL Box
Rearchitect Database to
scale out
Buy more of everything
Unusedcapacity
![Page 9: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/9.jpg)
Workload Patterns Optimal For Cloud
Usage
Com
pu
te
Time
Average
Inactivity
Period
“On and Off “
On & off workloads (e.g. batch job)Over provisioned capacity is wasted Time to market can be cumbersome
Com
pu
te
Time
“Unpredictable Bursting“
Average Usage
Unexpected/unplanned peak in demand Sudden spike impacts performance Can’t over provision for extreme cases
Average Usage
Com
pu
te
Time
“Growing Fast“
Successful services needs to grow/scale Keeping up w/ growth is big IT challenge Complex lead time for deployment
Com
pu
te
Time
Average Usage
“Predictable Bursting“
Services with micro seasonality trends Peaks due to periodic increased demandIT complexity and wasted capacity
![Page 10: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/10.jpg)
What is the ‘Cloud’?
The Cloud – metaphor for the internet‘Cloud Computing’Exploiting resources ‘out there’
Scalable computational powerData management and storageEnabling servicesApplications
![Page 11: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/11.jpg)
On Premises Hosted VendorCloud
Bu
ild v
s. B
uy
Build
Buy “Packaged
”Application
An application that I buy “off the shelf” and
run myself
“Custom Built”
Application
An application that I develop and run myself
Hosted “Custom
Built”
An application that I develop myself and run at a host site
Hosted “Packaged
”
An application that I buy “off the shelf” and run at a host
site
“Custom Built”
using cloud services
An application that I develop
myself and host using
cloud platform
“Packaged”
Using cloud services
An application that I buy “off the shelf” and
host using cloud platform
“Software as a
Service”
A hosted application
that I buy as a service from a
vendor
“Platform as a
Service”
A vendor hosted
development and runtime environment
What is the ‘Cloud’?
The Cloud
![Page 12: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/12.jpg)
3 Cloud Service Models
Cloud Software as a Service (SaaS)Use provider’s applications over a network
Cloud Platform as a Service (PaaS)Deploy customer-created applications to a cloud
Cloud Infrastructure as a Service (IaaS)Rent processing, storage, network capacity, and other fundamental computing resources
To be considered “cloud” they must be deployed on top of cloud infrastructure that has the key characteristics
12
![Page 13: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/13.jpg)
Service Model Architectures
Cloud Infrastructure
IaaS
PaaS
SaaS
Infrastructure as a Service (IaaS) Architectures
Platform as a Service (PaaS)Architectures
Software as a Service (SaaS)
Architectures
Cloud Infrastructure
SaaS
Cloud Infrastructure
PaaS
SaaS
Cloud Infrastructure
IaaS
PaaS
Cloud Infrastructure
PaaS
Cloud Infrastructure
IaaS
13
![Page 14: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/14.jpg)
Cloud App Architecture
![Page 15: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/15.jpg)
Intelligent Network Load Balancer
Stateless ‘Worker’ Machines
Shared Filesyste
m
M Tiers of N stateless machines w/ Forward Caching
Partitioned Relational
DB
Async DispatchQueue
‘Monolithic’State Tier
Queue Activation
Network Activation
High Scale Application Archetype
![Page 16: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/16.jpg)
Cloud aware Architecture
SQL Azure
Common DB
Tables
Castellan Venue
DB
Castellan Venue DB’s
ShardingPartition
Castellan Venue
DB
Castellan Venue DB’s
ShardingPartition
Castellan Venue
DB
Castellan Venue DB’s
ShardingPartition
...
Windows Azure Roles
http:// gagame .* Dynamic Worker(tasks
uploaded as blobs and sharding)
Partitioner Worker
Windows Azure StorageQueues for communication between clients and roles
-- - --- - -
-- - --- - -
Tables to record server & partition information
Blobs to store web and worker role resources
Client Applications
C# Application on Premises
Silverlight Application• Common Educational Experiences
Service Bus
WCF
On PremisesSQL Server
Configuration Statistics
Distributed Cache Worker
![Page 19: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/19.jpg)
19
The ‘Why’ and ‘How’ of Cloud Migration
There are many benefits that explain why to migrate to clouds
Cost savings, power savings, green savings, increased agility in software deployment
Cloud security issues may drive and define how we adopt and deploy cloud computing solutions
![Page 20: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/20.jpg)
20
Balancing Threat Exposure and Cost Effectiveness
Private clouds may have less threat exposure than community clouds which have less threat exposure than public clouds. Massive public clouds may be more cost effective than large community clouds which may be more cost effective than small private clouds. Doesn’t strong security controls mean that I can adopt the most cost effective approach?
![Page 21: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/21.jpg)
21
Cloud Migration and Cloud Security Architectures
Clouds typically have a single security architecture but have many customers with different demands
Clouds should attempt to provide configurable security mechanisms
Organizations have more control over the security architecture of private clouds followed by community and then public
This doesn’t say anything about actual security
Higher sensitivity data is likely to be processed on clouds where organizations have control over the security model
![Page 22: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/22.jpg)
22
Putting it Together
Most clouds will require very strong security controlsAll models of cloud may be used for differing tradeoffs between threat exposure and efficiencyThere is no one “cloud”. There are many models and architectures.How does one choose?
![Page 23: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/23.jpg)
23
Migration Paths for Cloud Adoption
Use public cloudsDevelop private clouds
Build a private cloudProcure an outsourced private cloudMigrate data centers to be private clouds (fully virtualized)
Build or procure community cloudsOrganization wide SaaSPaaS and IaaSDisaster recovery for private clouds
Use hybrid-cloud technologyWorkload portability between clouds
![Page 24: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/24.jpg)
24
Possible Effects ofCloud Computing
Small enterprises use public SaaS and public clouds and minimize growth of data centersLarge enterprise data centers may evolve to act as private cloudsLarge enterprises may use hybrid cloud infrastructure software to leverage both internal and public cloudsPublic clouds may adopt standards in order to run workloads from competing hybrid cloud infrastructures
![Page 25: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/25.jpg)
An Overview of the Windows Azure Platform
![Page 26: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/26.jpg)
The Windows Azure Platform
Windows AzureSQL AzureWindows Azure platform AppFabricDeveloper tools
![Page 27: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/27.jpg)
Windows Azure Basics
Windows Azure can potentially provide various kinds of Windows-based environments
The current release supports both .NET and unmanaged applications
Windows Azure provides Operating System like concepts
Process ManagementComputationStorage
![Page 28: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/28.jpg)
Azure™ Services Platform
![Page 29: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/29.jpg)
A set of connected serversOn which developers can:
Install and run servicesStore and retrieve data
What Is The Cloud in Windows Azure?
![Page 30: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/30.jpg)
It is an operating system for the cloudIt is designed for utility computingIt has four primary features:
Service managementComputeStorageDeveloper experience
What Is Windows Azure?
![Page 31: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/31.jpg)
The Windows Azure Platform
SQL Azure
Windows Azure
CloudApplicatio
ns Windows Azure AppFabric
On-PremisesApplicatio
nsOthersWindows
![Page 32: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/32.jpg)
…
Windows AzureAn illustration
Fabric
Compute Storage
Config
Application
SQL Azure
Windows Azure
Applications
Applications
OthersWindows
Windows Azure AppFabric
![Page 33: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/33.jpg)
Windows Azure Datacenter
Your Service
Windows Azure Building Blocks
LB
Internet
Web Site(ASPX, ASMX,
WCF)
Web Site(ASPX, ASMX,
WCF)Web Role
(ASPX, WCF)
Worker Service
Worker Role
LB
StorageTables Blobs
Queue
![Page 34: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/34.jpg)
Windows Azure Applications, Storage, and Roles
Cloud Storage (blob, table, queue)
Web RoleLB
n
Worker Role
m
![Page 35: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/35.jpg)
Windows Azure, In One Picture
Desktop
VS Tools
WA SDK
Sto
rage
Clu
ster
MSFT Datacenters
Business Portal
Developer Portal
Com
pute
Clu
ster
……
Service Management Service
REST
REST…
Cloud VM
Runtime API
VM Setup
User Code
![Page 36: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/36.jpg)
Azure
Partial Trust
“Dev Fabric”
Dev Environment
![Page 37: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/37.jpg)
Fabric
Storage
VMs VMs
Windows Azure Compute Service A closer look
…
Load Balanc
er
HTTP/ HTTPS
IIS
WebRole
Instance
WorkerRole
Instance
Compute
Application
![Page 38: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/38.jpg)
Fabric Controlle
r
Fabric Agent
Storage
Fabric Agent
Web RoleInstance
Worker Role
Instance
Windows Azure Fabric
![Page 39: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/39.jpg)
Cloud Simple Application
Web Role Worker Role
Blob
Queue
![Page 40: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/40.jpg)
Windows Azure for Application Developers
Portal HostedService
Storage
SDK
Develop Deploy Run
![Page 41: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/41.jpg)
Roles
Role
Code Configuration
![Page 42: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/42.jpg)
Load Balanced InstancesRole
Instance 1
Instance 2
http://yourapp.cloudapp.net
![Page 43: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/43.jpg)
Web vs Worker Role
Web Role
IIS Host
Your Code
Worker RoleSystem Host
Your Code
![Page 44: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/44.jpg)
Compute
![Page 45: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/45.jpg)
Windows Azure Compute Service
The VMs are provided by a cloud-optimized hypervisor
Not your average VMThey run 64-bit Windows Server 2008Each VM has a one-to-one relationship with a processor core
For developers:It’s mostly standard Windows and .NET
A few things require accessing the Windows Azure Agent, e.g., logging
A desktop facsimile of Windows Azure in the cloud is provided for development via the SDK
![Page 46: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/46.jpg)
Storage
![Page 47: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/47.jpg)
Windows Azure Storage
Storage types:Blobs: a simple hierarchy of binary dataTables: entity storage (not relational tables)Queues: high performance quasi-transactional queue structures
Access:Data is exposed via a RESTful interfaceData can be accessed by:
Windows Azure applicationsAny other internet connected applicationon-premises or other cloud applications
![Page 48: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/48.jpg)
…
Fabric
Compute Storage
Application
Windows Azure Storage ServiceA closer look
Blobs
HTTP/ HTTPS
RESTService
s
Tables Queues
![Page 49: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/49.jpg)
Database
Business AnalyticsReporting Data Sync
![Page 50: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/50.jpg)
SQL Services
.NET Services
Windows Azure
Live Services
Applications
Applications
OthersWindows
Mobile
Windows
Vista/XP
Windows
Server
SQL AzureA relational DB in the cloud
SQL Azure Database
Others (Future)
Data Hub
Relational database as a serviceHighly available, automatically maintained
Extension of the SQL Server Data Platform
![Page 51: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/51.jpg)
Database
Relational database, provided as a service
Highly symmetrical development and tooling experience (use TDS protocol and T-SQL)Highly scaled out, on commodity hardwareBuilt on the SQL Server technology foundation
Beyond “hosted database”High availability, DB provisioning, and DB management are provided by the servicePay for what you use
![Page 52: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/52.jpg)
SQL Azure Database
Customer Value Props
Self-provisioning and capacity on demand
Symmetry w/ on-premises database platform
Automatic high-availability and fault-tolerance
Automated DB maintenance (infrastructure)
Simple, flexible pricing – “pay as you grow”
MSDatacente
r
Windows Azure
Compute
Browser
SOAP/RESTHTTP/S
T-SQL (TDS)
App Code(ASP.NET)
SQL Server Report Server
(on-premises)
ADO.NET/REST - EDMHTTP/S
- AD Federation (LiveId /AppFabric AC)
SQL AzureDatabase
T-SQL (TDS)
Relational database service
• SQL Server technology foundation
• Highly symmetrical
• Highly scaled
• Highly secure
Database “as a Service” – beyond hosting
Highly scaled out relational database as a service
Database
![Page 53: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/53.jpg)
Fundamentals
Application Primary FocusDesigning for the Cloud
Scale outServices
AutomatedService
Management
HighAvailability Multi-
tenancy
Resource Optimizatio
n
![Page 54: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/54.jpg)
Transitioning Cloud Driven Process
• Business screening processBusiness Opportunities based on cloud
• Visualization of current statusEnvisioning and Planning
• Business Process suitable for Cloud
Choose Business Case
• Cloud Provider Selection CriteriaCloud implementation
• Public Cloud / Private CloudTransitioning Scenarios
• Systems Resides in the Cloud• Operation OptimizationGoing Production in Cloud
![Page 55: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/55.jpg)
Store Data inthe Cloud
Extend Application Components to the Cloud
Move Entire Applications to the Cloud
Start new applications based
onCloud Services
Create hybrid applications by
Combining Cloud Services
Transitioning to the cloud
![Page 56: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/56.jpg)
57
Migration Paths for Cloud Adoption
Use public cloudsDevelop private clouds
Build a private cloudProcure an outsourced private cloudMigrate data centers to be private clouds (fully virtualized)
Build or procure community cloudsOrganization wide SaaSPaaS and IaaSDisaster recovery for private clouds
Use hybrid-cloud technologyWorkload portability between clouds
![Page 57: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/57.jpg)
Infrastructure Transition
![Page 58: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/58.jpg)
Cloud Reference Architecture
Cloud Computing for Financial Institutions. Vivek Kejriwal
![Page 59: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/59.jpg)
Transitioning Cloud Driven Architectures
![Page 60: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/60.jpg)
Transitioning Cloud Driven Architectures
![Page 61: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/61.jpg)
Transitioning Cloud Driven Architectures
![Page 62: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/62.jpg)
Transitioning Cloud Driven Architectures
![Page 63: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/63.jpg)
Application Architecture for the Cloud
![Page 64: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/64.jpg)
65
Application Basic Building Blocks
Cloud Storage (blob, table, queue)
Presentation RoleLB
n
Service Role
m
![Page 65: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/65.jpg)
N-Tier Application Transition
Presentation
Business
Data Access
Data
Move to the cloud On Premises
Data
![Page 66: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/66.jpg)
N-Tier Application Transition
Presentation
Business
Data Access
Data
Move to the cloud On Premises
Data
![Page 67: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/67.jpg)
N-Tier Application Transition
Presentation
Business
Data Access
Data On Premises Data
Move to the cloud
Data
Move to the cloud
Sync
![Page 68: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/68.jpg)
Simple Cloud Application
Presentation Services
Blob
Queue
![Page 69: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/69.jpg)
Sample Cloud Application Arquitecture
Cloud Relational Storage
Common DB
Tables
Castellan Venue
DB
Castellan Venue DB’s
ShardingPartition
Castellan Venue
DB
Castellan Venue DB’s
ShardingPartition
Castellan Venue
DB
Castellan Venue DB’s
ShardingPartition
...
Cloud Based Roles
http:// sophia.* Dynamic Worker
(blobs and sharding
management)
Partitioner Worker
Cloud StorageQueues for communication between clients and roles
-- - --- - -
-- - --- - -
Tables to record server & partition information
Blobs to store web and worker role resources
Client Applications
Application on Premises
Multimedia Application• Common Educational Experiences
Communication Services
Communication Services
On PremisesData Storage
Configuration Statistics
Distributed Cache Worker
![Page 70: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/70.jpg)
Access Control
Service Bus
Service Bus
Registry
Endpoints
Organization Y
Organization X
Application Application
Cloud Communication Pattern
2) Discover endpoints
1) Register endpoints3) Access
application
4) Upgrade to direct
connection
![Page 71: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/71.jpg)
Transitioning to the CloudDesign Requirements
LooseCoupling
Component
Re-use
Scalability
![Page 72: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/72.jpg)
Principle Details
Loose coupling • Messaging communication
• Component Autonomy• Component
Interoperability
Scalability • Design for partitioning and elasticity
• Stateless component design
• Consider long running processes
Component Re-use • Composition • Integration
Consider cluster design
• Split the application in multiple clusters by functionality
Basic cloud development principles
![Page 73: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/73.jpg)
Principle Details
Failure handling • Can some parts of the application continue to execute without the other parts
Data persistence • Storage and replication
SOA is reinforced • More loosely coupled the components of the system, the better it scales
• Asynchronous systems
Parallel design • Processing and storage queries
Security • Build security on every layer
Basic cloud development principles
![Page 74: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/74.jpg)
Cloud Transitioning ArchitectureIdentify PatternsConsider:
Basic componentsMessagingInteroperable Message Format and ProtocolsCommunication or Integration BusResource Deployment
StorageInfrastructure (Processing, Creation, …)
![Page 75: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/75.jpg)
Scaling Out using a Queue Based Pattern
Queue
Msg 1
Msg 2
Msg 3
Msg 4
Process Role
Worker Role
Submit Message
Application
Process Message
Msg 2Msg 1
Process Role
Msg 2
![Page 76: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/76.jpg)
AlarmProcessor
IncidentTable
Pos RptTable
TimerTable
EventTable
NewMsg
Parse & Route
Queue A
Implement Queues for Reliability and Continuity
Processor A
Table
Table
Table
Queue B
Processor B
![Page 77: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/77.jpg)
Building Blocks Key takeaways
Use the cloud provider service configuration to scaleDesign how to communicate your application componentsBuilt your application to scale up/down roles in production
![Page 78: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/78.jpg)
Windows Azure Storage Service
![Page 79: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/79.jpg)
Windows Azure Storage ServiceA closer look
Fabric
…
Compute
Application
Storage
Blobs Tables Queues
HTTP/ HTTPS
![Page 80: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/80.jpg)
Fundamental Storage Abstractions
Tables – Provide structured storage. A Table is a set of entities, which contain a set of properties
Queues – Provide reliable storage and delivery of messages for an application
Blobs – Provide a simple interface for storing named files along with metadata for the file
Drives – Provides durable NTFS volumes for Windows Azure applications to use (new)
81
![Page 81: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/81.jpg)
Windows Azure StorageTables: Strengths
Massive scalabilityBy effectively allowing scale-out data
Perspective:Applied to the right problem, Windows Azure Tables are a beautiful thing
But they’re not the optimal solution for a majority of data storage scenarios
Amazon, Google, and others provide similar cloud storage mechanismsAll of these can be seen as part of the NOSQL movement
![Page 82: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/82.jpg)
Windows Azure StoragePoints of interest
Storage types:Blobs: store binary dataTables: provide scale-out, entity-based storage
Not relational tables
Queues: allow message-based communication
Access:Data is grouped into storage accountsData can be accessed by:
Windows Azure apps Other on-premises or cloud apps
![Page 83: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/83.jpg)
Windows Azure StorageA closer look at blobs
Options for accessing blobs:From Windows Azure applications or other applications: via RESTful requestsFrom Windows Azure applications: via Windows Azure Drives
Drives make a blob look like an NTFS file system to the application
Blobs can also be used with the Windows Azure Content Delivery Network (CDN)
For faster access from distributed locations to frequently accessed content
![Page 84: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/84.jpg)
Windows Azure StorageA closer look at tables
Name Type Value
Table . . .Table Table
Storage Accounts
Entity . . .Entity Entity
Property PropertyProperty
![Page 85: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/85.jpg)
Windows Azure TablesProvides Structured Storage
Massively Scalable TablesBillions of entities (rows) and TBs of dataCan use thousands of servers as traffic grows
Highly Available & DurableData is replicated several times
Familiar and Easy to use APIADO.NET Data Services – .NET 3.5 SP1
.NET classes and LINQREST – with any platform or language86
![Page 86: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/86.jpg)
Windows Azure StorageTables: Challenges
No SQLA new approach for developers to learnNo aggregates
Access via RESTYou can’t use ordinary ADO.NET
An unfamiliar structure for dataYou can’t easily move relational data in or outSupporting services are scarce, e.g., reporting
No schemaAnd no views
![Page 87: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/87.jpg)
Queue
Windows Azure StorageA closer look at queues
Web Role
ASP.NET, WCF, etc.
Worker Role
main(){ … }
1) Receive work
2) Put message in
queue
3) Get message
from queue
4) Do work
5) Delete message
from queue
![Page 88: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/88.jpg)
Windows Azure Tables
![Page 89: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/89.jpg)
Windows Azure TablesProvides Structured Storage
Massively Scalable TablesBillions of entities (rows) and TBs of dataCan use thousands of servers as traffic grows
Highly Available & DurableData is replicated several times
Familiar and Easy to use APIADO.NET Data Services – .NET 3.5 SP1
.NET classes and LINQREST – with any platform or language90
![Page 90: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/90.jpg)
Table Storage ConceptsEntitiesTablesAccounts
moviesonline
Users
Movies
Email =…Name = …
Email =…Name = …
Genre =…Title = …
Genre =…Title = …
91
![Page 91: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/91.jpg)
Table Data ModelTable
A storage account can create many tablesTable name is scoped by accountSet of entities (i.e. rows)
EntitySet of properties (columns)Required properties
PartitionKey, RowKey and Timestamp
92
![Page 92: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/92.jpg)
Required Entity PropertiesPartitionKey & RowKey
Uniquely identifies an entityDefines the sort orderUse them to scale your application
Timestamp Read onlyOptimistic Concurrency
93
![Page 93: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/93.jpg)
PartitionKey And PartitionsPartitionKey
Used to group entities in the table into partitions
A table partition All entities with same partition key valueUnit of scaleControl entity localityRow key provides uniqueness within a partition
94
![Page 94: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/94.jpg)
PartitionKey(Category)
RowKey(Title)
Timestamp ReleaseDate
Action Fast & Furious … 2009
Action The Bourne Ultimatum
… 2007
… … … …
Animation
Open Season 2 … 2009
Animation
The Ant Bully … 2006PartitionKey(Category)
RowKey(Title)
Timestamp
ReleaseDate
Comedy Office Space … 1999
… … … …
SciFi X-Men Origins: Wolverine
… 2009
… … … …
War Defiance … 2008
PartitionKey(Category)
RowKey(Title)
Timestamp ReleaseDate
Action Fast & Furious … 2009
Action The Bourne Ultimatum
… 2007
… … … …
Animation
Open Season 2 … 2009
Animation
The Ant Bully … 2006
… … … …
Comedy Office Space … 1999
… … … …
SciFi X-Men Origins: Wolverine
… 2009
… … … …
War Defiance … 2008
Partitions and Partition Ranges
Server BTable = Movies
[Comedy- Western)
Server ATable = Movies[Action - Comedy)
95
Server ATable = Movies
![Page 95: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/95.jpg)
Table OperationsTable
CreateQueryDelete
EntitiesInsertUpdate
Merge – Partial UpdateReplace – Update entire entity
DeleteQueryEntity Group Transaction (new)
![Page 96: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/96.jpg)
Table SchemaDefine the schema as a .NET class
97
[DataServiceKey("PartitionKey", "RowKey")] public class Movie { /// <summary> /// Category is the partition key /// </summary> public string PartitionKey { get; set; }
/// <summary> /// Title is the row key /// </summary> public string RowKey { get; set; }
public DateTime Timestamp { get; set; }
public int ReleaseYear { get; set; } public string Language { get; set; } public string Cast { get; set; } }
![Page 97: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/97.jpg)
Table SDK Sample Code
98
StorageCredentialsAccountAndKey credentials = new StorageCredentialsAccountAndKey( “myaccount", “myKey");string baseUri = "http://myaccount.table.core.windows.net";
CloudTableClient tableClient = new CloudTableClient(baseUri, credentials);
tableClient.CreateTable(“Movies");
TableServiceContext context = tableClient.GetDataServiceContext();CloudTableQuery<Movie> q = (from movie in context.CreateQuery<Movie>(“Movies")
where movie.PartitionKey == “Action" && movie.RowKey == "The Bourne Ultimatum"
select movie).AsTableServiceQuery<Movie>();Movie movieToUpdate = q.FirstOrDefault();
// Update moviecontext.UpdateObject(movieToUpdate);context.SaveChangesWithRetries();
// Add moviecontext.AddObject(new Movie(“Action" , movieToAdd));context.SaveChangesWithRetries();
![Page 98: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/98.jpg)
Key Selection: Things to Consider> Scalability
> Distribute load as much as possible> Hot partitions can be load balanced> PartitionKey is critical for scalability
> Query Efficiency & Speed> Avoid frequent large scans> Parallelize queries
> Entity group transactions (new)> Transactions across a single partition> Transaction semantics & Reduce round trips
99
![Page 99: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/99.jpg)
Key Selection: Case Study 1> Table for listing all movies
> Home page lists movies based on chosen category
100
![Page 100: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/100.jpg)
Movie Listing – Solution 1> Why do I need multiple PartitionKeys?
> Account name as Partition Key > Movie title as RowKey since movie names
need to be sorted> Category as a separate property
> Does this scale?
101
PartitionKey(Account name)
RowKey(Title)
Category …
moviesonline 12 Rounds Action …
moviesonline A Bug’s Life
Animation …
100,000,000 more rows
… … …
moviesonline Office Space
Comedy …
moviesonline Platoon War …
50,000,000 more rows
… … …
moviesonline WALL-E Animation …
![Page 101: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/101.jpg)
Server A
Movie Listing – Solution 1
> Single partition - Entire table served by one server
> All requests served by that single server> Does not scale
PartitionKey(Account name)
RowKey(Title)
Category …
moviesonline 12 Rounds Action …
moviesonline A Bug’s Life
Animation …
100,000,000 more rows
… … …
moviesonline Office Space
Comedy …
moviesonline Platoon War …
50,000,000 more rows
… … …
moviesonline WALL-E Animation …
ClientClient Request
Request
Request
Request
102
![Page 102: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/102.jpg)
Movie Listing – Solution 2
PartitionKey(Category)
RowKey (Title)
Action Fast & Furious
… 10000 more Action movies
Action The Bourne Ultimatum
… 100000 more Action & Animation movies
Animation Open Season 2
… 100000 more Animation movies
Animation The Ant Bully
Comedy Office Space
… 1000000 more Comedy & SciFi movies
SciFi Star Trek
… 100000 more SciFi & War movies
… 100000 more War movies
War Defiance
> All movies partitioned by category> Allows system to load balance hot partitions> Load distributed> Better than single partition
ClientClient Request
Server A
Request
Request
Request
103
Server B
Request
Request
Request
Request
PartitionKey(Category)
RowKey (Title)
Action Fast & Furious
… 10000 more Action movies
Action The Bourne Ultimatum
… 100000 more Action & Animation movies
Animation Open Season 2
… 100000 more Animation movies
Animation The Ant Bully
Comedy Office Space
… 1000000 more Comedy & SciFi movies
SciFi Star Trek
… 100000 more SciFi & War movies
… 100000 more War movies
War Defiance
![Page 103: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/103.jpg)
Key Selection: Case Study 2
> Log every transaction into a table for diagnostics> Scale Write Intensive Scenario> Logs can be retrieved for a given time
range
104
![Page 104: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/104.jpg)
Logging - Solution 1> Timestamp as Partition Key
> Looks like an obvious choice> It is not a single partition as time moves
forward > Append only> Requests to single partition range> Load balancing does not help> Server may throttle
PartitionKey(Timestamp)
Properties
2009-11-15 02:00:01
…
2009-11-15 02:00:11
…
100000 more rows …
2009-11-17 05:40:01
…
2009-11-17 05:40:01
…
80000 more rows …
2009-11-17 12:30:00
…
2009-11-17 12:30:01
…
ApplicationsClientReques
t
Server A
Request
2009-11-17 12:30:01
…
Request
2009-11-17 12:30:02
…
Request
2009-11-17 12:30:03
…
Server B
105
![Page 105: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/105.jpg)
Server A
Server B
PartitionKey(ID_Timestamp)
Properties
01_2009-10-12 05:10:00
…
… …
100000 more rows …
09_2009-11-15 12:31:00
…
… …
20000000 more rows …
10_2009-10-05 05:10:10
…
5000000 more rows …
… …
900000 more rows …
19_2009-11-17 12:20:02
…
ApplicationsClientReques
tReques
tReques
tReques
t
Logging Solution 2 - Distribute "Append Only”
> Prefix timestamp such that load is distributed> Id of the node logging> Hash into N buckets
> Write load is now distributed > Better throughput> To query logs in time range
> Parallelize it across prefix values
15_2009-11-17 12:30:01
…
09_2009-11-17 12:30:22
…
19_2009-11-17 12:30:10
…
01_2009-11-17 12:30:01
…
106
![Page 106: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/106.jpg)
Key Selection: Query Efficiency & Speed> Select keys that allow fast retrieval> Reduce scan range> Reduce scan frequency
107
![Page 107: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/107.jpg)
Single Entity Query
Server A
PartitionKey(Category)
RowKey (Title)
Action Fast & Furious
… 10000 more Action movies
Action The Bourne Ultimatum
… 100000 more Action & Animation movies
Animation Open Season 2
… 100000 more Animation movies
Animation The Ant Bully
Comedy Office Space
… 1000000 more Comedy & SciFi movies
SciFi Star Trek
… 100000 more SciFi & War movies
… 100000 more War movies
War Defiance
Client
Server B
> Where PartitionKey=‘SciFi’ and RowKey = ‘Star Trek’
> Efficient processing> No continuation tokens
108
Request
Result
![Page 108: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/108.jpg)
Client
Server A
Server B
Table Scan Query
Request
PartitionKey(Category)
RowKey(Title)
Rating
Action Fast & Furious 5
… 999 more movies rated > 4
…
… Action and Anim. movies here with rating < 4
…
Animation A Bug’s life 2
… 100 more movies < 4 here
…
Animation The Ant Bully 3
Comedy Are we there yet? 2
… More movies here …
Comedy Office Space 5
… 800000 more movies here
…
Drama A Beautiful Mind 5
… 1200000 more movies here
…
War Defiance 4
Cont.
> Select * from Movies where Rating > 4> Returns Continuation token
> 1000 movies in result set> Partition range boundary
> Serial Processing: Wait for continuation token before proceeding
Request Cont.
Cont.
Request Cont.
Cont.
109
Returns 1000 movies
Partition range boundary hit
Return continuation
![Page 109: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/109.jpg)
Client
Server A
Server B
Make Scans Faster
Request
PartitionKey(Category)
RowKey(Title)
Rating
Action Fast & Furious 5
… More movies here …
Comedy Office Space 5
… More movies here …
Documentary
Planet Earth 4
… More movies here
Drama Seven Pounds 4
Horror Saw 5 3
… More movies here …
Music 8 Mile 2
… More movies here …
SciFi Star Trek 5
… More movies here …
Cont.
> Split “Select * from Movies where Rating > 4” into> Where PartitionKey >= “A” and PartitionKey < “D” and Rating > 4> Where PartitionKey >= “D” and PartitionKey < “I” and Rating > 4> Etc.
> Execute in parallel> Each query handles continuation
Cont.
110
Request
Request
Cont.
![Page 110: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/110.jpg)
Query Speed1. Fast
> Single PartitionKey and RowKey with equality
2. Medium> Single partition but a small range for RowKey> Entire partition or table that is small
3. Slow> Large single scan> Large table scan> “OR” predicates on keys => no query
optimization => results in scan> Expect continuation token for all except in 1
111
![Page 111: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/111.jpg)
Make Queries Faster> Large Scans
> Split the range and parallelize queries> Create and maintain own views that help
queries
> “Or” Predicates> Execute individual query in parallel
instead of using “OR”
> User Interactive> Cache the result to reduce scan
frequency
112
![Page 112: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/112.jpg)
Expect Continuation Tokens – Seriously!> Maximum of 1000 rows in a response> At the end of partition range boundary> Maximum of 5 seconds to execute the
query
113
![Page 113: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/113.jpg)
Entity Group Transactions (EGT) (new)> Atomically perform multiple
insert/update/deleteover entities in same partition in a single transaction
> Maximum of 100 commands in a single transaction and payload < 4 MB
> ADO.Net Data Service> Use SaveChangesOptions.Batch
114
![Page 114: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/114.jpg)
Key Selection: Entity Group Transaction> Case Study
> Maintain user account information> Account ID, User Name, Address, Number of rentals
> Maintain information of checked out rentals> Account ID, Movie Title, Check out date, Due date
> Solution 1 – Maintain two tables – Users & Rentals > Handle Cross table consistency
> Insert into Rentals table succeeds> Update to Users table fails> Queue to maintain consistency
115
![Page 115: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/115.jpg)
Solution 2> Store Account Information and Rental details in
same table> Maintain same PartitionKey to enforce transactions
> Account ID as PartitionKey> Update total count and Insert new rentals using Entity
Group Transaction> Prefix RowKey with “Kind” code: A = Account, R = Rental
> Row key for account info: [Kind Code]_[AccountId]> Row Key for rental info: [Kind Code]_[Title]
> Rental Properties not set for Account row and vice versaPartitionKey(AccountID)
RowKey(Kind_*)
Kind TotalRentals
Name Address CheckOutOn Title DueOn
… … … … … … … … …
Sally A_Sally Account
8 Sally Field
Ann Arbor, MI
Sally R_Jaws Rental 2009/11/16 Jaws 2009/11/20
Sally R_Taxi Rental 2009/11/16 Taxi 2009/11/20
… … … … … … … … …116
![Page 116: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/116.jpg)
Best Practices> Select PartitionKey and RowKey that help scale
> Efficient for frequently used queries> Supports batch transactions> Distributes load
> Distribute “Append only” patterns using prefix to PartitionKey
> Always Handle continuation tokens
> Client can maintain their own cache/views instead of frequent scans> Future Feature - Secondary Index
> Execute parallel queries instead of “OR” predicates
> Implement back-off strategy for retries
117
![Page 117: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/117.jpg)
Windows Azure Queues
Queue are performance efficient, highly available and provide reliable message delivery
Simple, asynchronous work dispatchProgramming semantics ensure that a message can be processed at least once
Access is provided via REST
118
![Page 118: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/118.jpg)
Queue Storage ConceptsMessage
sQueuesAccounts
sally
thumbnailjobs
traverselinks
128 x 128 http://...
256 x 256 http://...
http://...
http://...
119
![Page 119: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/119.jpg)
Account, Queues and MessagesAn account can create many queues
Queue Name is scoped by the account
A Queue contains messagesNo limit on number of messages stored in a queueSet a limit for message expiration
MessagesMessage size <= 8 KBTo store larger data, store data in blob/entity storage, and the blob/entity name in the messageMessage now has dequeue count 120
![Page 120: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/120.jpg)
Queue OperationsQueue
Create QueueDelete QueueList QueuesGet/Set Queue Metadata
MessagesAdd Message (i.e. Enqueue Message)Get Message(s) (i.e. Dequeue Message)Peek Message(s)Delete Message
121
![Page 121: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/121.jpg)
Queue Programming Api
122
CloudQueueClient queueClient = new CloudQueueClient(baseUri, credentials);CloudQueue queue = queueClient.GetQueueReference("test1");
queue.CreateIfNotExist();
//MessageCount is populated via FetchAttributesqueue.FetchAttributes();
CloudQueueMessage message = new CloudQueueMessage("Some content");queue.AddMessage(message);
message = queue.GetMessage(TimeSpan.FromMinutes(10) /*visibility timeout*/);
//Process the message here …
queue.DeleteMessage(message);
![Page 122: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/122.jpg)
21
11
C1
C2
Removing Poison Messages
11
21
340
Producers Consumers
P2
P1
30
2. GetMessage(Q, 30 s) msg 2
1. GetMessage(Q, 30 s) msg 1
11
21
123
10
20
![Page 123: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/123.jpg)
C1
C2
Removing Poison Messages
340
Producers Consumers
P2
P1
11
21
2. GetMessage(Q, 30 s) msg 23. C2 consumed msg 24. DeleteMessage(Q, msg 2)7. GetMessage(Q, 30 s) msg 1
1. GetMessage(Q, 30 s) msg 15. C1 crashed
11
21
6. msg1 visible 30 s after Dequeue30
124
12
11
12
![Page 124: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/124.jpg)
C1
C2
Removing Poison Messages
340
Producers Consumers
P2
P1
12
2. Dequeue(Q, 30 sec) msg 23. C2 consumed msg 24. Delete(Q, msg 2)7. Dequeue(Q, 30 sec) msg 18. C2 crashed
1. Dequeue(Q, 30 sec) msg 15. C1 crashed10. C1 restarted11. Dequeue(Q, 30 sec) msg 112. DequeueCount > 213. Delete (Q, msg1)
12
6. msg1 visible 30s after Dequeue9. msg1 visible 30s after Dequeue
30
125
13
12
13
![Page 125: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/125.jpg)
Best Practices & Summary> Make message processing idempotent
> No need to deal with failures
> Do not rely on order> Invisible messages result in out of order
> Use Dequeue count to remove poison messages> Enforce threshold on message’s dequeue count
> Use message count to dynamically increase/reduce workers
> Use blob to store message data with reference in message> Messages > 8KB> Batch messages> Garbage collect orphaned blobs
126
![Page 126: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/126.jpg)
Storage Summary
127
> Table> Scalable & Reliable Structured Storage System> Partitioning is critical to scalability> Entity Group Transactions (new)
> Queue> Scalable & Reliable Messaging System > Dequeue count returned with message (new)
> Use back-off strategy on retries
> Official Storage Client Library (new)
![Page 127: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/127.jpg)
What is “SQL Azure”?
![Page 128: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/128.jpg)
Review – Conceptual modelSubscription
Used to map service usage to the billing instrumentUsers may have many subscriptions
Logical ServerAkin to SQL Server InstanceUnit of Geo-Location & Billing1:1 Subscription & server
User DatabaseRestricted T-SQL surface areaAdditional catalog views provided e.g. sys.billing, sys.firewall_rules, etc
![Page 129: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/129.jpg)
SQL Services
.NET Services
Windows Azure
Live Services
Applications
Applications
OthersWindows
Mobile
Windows
Vista/XP
Windows
Server
SQL AzureA relational DB in the cloud
SQL Azure Database
Others (Future)
Data Hub
Relational database as a serviceHighly available, automatically maintained
Extension of the SQL Server Data Platform
![Page 130: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/130.jpg)
SQL Azure Database
- Based on SQL Server 2008 R2 engine
Use same tools and data access frameworksSix global datacentersHigh Availability & Redundancy
Reads are completed at the primaryWrites are replicated to a quorum of secondaries
Replica 1
Replica 2
Replica 3
DB
Single LogicalDatabase
Multiple PhysicalReplicas
Single Primar
y
MultipleSecondaries
![Page 131: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/131.jpg)
Extending SQL Server Data Platform to the Cloud
Database
Data Sync
Reference
Data
Symmetric Programming Model
Data Hub Aggregation
• Initial services – core RDBMS capabilities with SQL Azure Database, Data Sync
• Future Offerings• Additional data platform capabilities: Reporting, BI• New services: Reference Data
![Page 132: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/132.jpg)
The New SQL Data Services
Familiar SQL Server relational modelUses existing APIs & toolsBuilt for the Cloud with availability and scaleAccessible to all from PHP, Ruby, and Java
Clear Feedback: “I want a database in the Cloud”
Focus on combining the best features of SQL Server running at scale with low friction
![Page 133: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/133.jpg)
The Evolution of SDS
Evolv
es
SDS Next
TDS + TSQL Model
Web App
SQL Client*
Windows Azure
BrowserApplicatio
n
Application
REST Client
REST (Astoria)
ADO.Net + EF
Application
SQL Client*
Cloud
HT
TP
HT
TP
+R
ES
T
TD
S
* Client access enabled using TDS for ODBC, ADO.Net, OLEDB, PHP-SQL, Ruby, …
Data
Cen
ter
ODBC, OLEDB, ADO.Net PHP, Ruby, …
SDS Current
REST/SOAP + ACE Model
Web App
REST Client
Windows Azure
BrowserApplicatio
n
Application
REST Client
HT
TP
HT
TP
+R
ES
T
Data
Cen
ter
Cloud
![Page 134: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/134.jpg)
SQL Azure
Windows Azure
Applications
Applications
OthersWindows
SQL Azure Database
Others (Future)
SQL Azure
Windows Azure AppFabric
![Page 135: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/135.jpg)
SQL Azure Database
Others (Future)
SQL Azure DatabaseAn Illustration
Database
Database
Database
SQL Azure Database
TDS
Application
![Page 136: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/136.jpg)
Database
Database
Database
Application
ApplicationDatabase
SQL Azure Database
SQL Azure DatabaseUsing one or multiple databases
Max database size is 50
GB
![Page 137: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/137.jpg)
SQL Azure Network TopologyApplication
InternetAzure Cloud
LB
TDS (tcp)
TDS (tcp)
TDS (tcp)
Applications use standard SQL client libraries: ODBC, ADO.Net, PHP, …
Load balancer forwards ‘sticky’ sessions to TDS protocol tier
Security Boundary
SQL SQL SQL SQL SQLSQL
Gateway Gateway Gateway Gateway Gateway Gateway
Gateway: TDS protocol gateway, enforces AUTHN/AUTHZ policy; proxy to CloudDB
Scalability and Availability: Fabric, Failover, Replication, and Load balancing
![Page 138: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/138.jpg)
TDS Gateway
TDS ListenerCapability negotiationTDS Packet inspectionSecurity
Logical->Physical mapping via metadata catalogEnabler for multi-tenet capabilitiesIsolation layer
![Page 139: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/139.jpg)
TDS Gateway LayeringGateway Process
TDS EndpointAdminSvc Endpoint
Protocol Parser
Provisioning Endpoint
Business Logic Services
Connection Mgmt
SQL SQL SQL SQL SQLSQL
Scalability and Availability: Fabric, Failover, Replication, and Load balancing
![Page 140: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/140.jpg)
Provisioning
SubscriptionCoordinated across all Azure servicesExecuted in parallel w/retries
ServerMay occur between data centersPoint where Geo-location is established
DatabaseAlways occurs within a single data centerCross node operations executed during this process e.g. add new db to sys.databases on the master
![Page 141: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/141.jpg)
Server ProvisioningDriven by administrator PortalProvision request is sent to Gateway
Metadata catalog entry createdDNS record (CNAME) created within LiveDNS serviceMaster DB created
On completion metadata catalog updated
![Page 142: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/142.jpg)
Datacenter (Sub-Region)
SQL Azure Server Provisioning
Customer Browser
Portal LB
1
Front-end Node
Live DNS ClusterLive DNS
Svc
2 4
Gateway
Backend Node
Mgmt. Service
s
SQL Server
Fabric
Backend Node Backend Node
Mgmt. Service
s
SQL Server
Fabric
Mgmt. Service
s
SQL Server
Fabric
Front-end Node
Gateway
Front-end Node
Admin Portal
Front-end Node
Admin Portal
3
Gateway LB5
6
7
![Page 143: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/143.jpg)
Database Provisioning
Gateway performs stateful TDS packet inspection
Picks out subset of messagesParses out args for create database
Makes entry into Gateway metadata catalogUnused replica set located and reservedReplica set (UserDB) is prepped for use Metadata catalog is updated
![Page 144: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/144.jpg)
SQL Azure Database provisioningTDS Gateway
Front-end NodeProtocol Parser
Gateway Logic
Master Cluster
Master Node
Master Node Components
1
2
3
5 67
Scalability and Availability: Fabric, Failover, Replication, and Load balancingScalability and Availability: Fabric, Failover, Replication, and Load balancing
4
8
TDS Session
Backend Node 1
SQL InstanceSQL DB
Backend Node 2
SQL InstanceSQL DB
Backend Node 3
SQL InstanceSQL DB
![Page 145: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/145.jpg)
SQL Azure Login Process
Login request arrives at the GatewayGateway locates MasterDb & UserDb replica setsCredentials are validated against MasterDbTDS session is opened to UserDB and requests are forwarded
![Page 146: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/146.jpg)
SQL Azure Login ProcessTDS GatewayFront-end Node
Protocol Parser
Gateway Logic
Global Partition Map
Master Node
Master Node Components
1
2
4 5
6
Scalability and Availability: Fabric, Failover, Replication, and Load balancingScalability and Availability: Fabric, Failover, Replication, and Load balancing
3
7
TDS Session
Backend Node 1
SQL InstanceSQL DB
Backend Node 2
SQL InstanceSQL DB
Backend Node 3
SQL InstanceSQL DB
8
![Page 147: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/147.jpg)
Service Resilience
ProvisioningState machines used to coordinate activities across node (and datacenter) boundariesFailed provisioning attempts cleaned automatically after 10 minutes
LoginFailovers during the login will be transparent (<30 seconds)Metadata catalog refresh occurs automatically
Active SessionSurface as connection drops (due to state)
![Page 148: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/148.jpg)
Monitoring Service HealthMetrics
Cluster wide performance counters gather key metrics on the serviceUsed to alert Operations to issues before they become a problem
Early warning systemCode issuesCapacity warnings
HealthExercises the service routinely looking for problemsWhen issues are encountered runs deep diagnostics
Network connectivity at the node levelValidate all dependent services (Live DNS, Live ID, etc)
Monitoring from other MSFT DC’sValidates accessibility from multiple geographic locationsAlerts fired automatically when test jobs fail
![Page 149: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/149.jpg)
Security/Attack ConsiderationsService
Secure channel required (SSL)Denial Of Service trend trackingPacket Inspection
Server IP allow list (Firewall) Idle connection cullingGenerated server names
DatabaseDisallow the most commonly attacked user id’s (SA, Admin, root, guest, etc) Standard SQL Authn/Authz mode
![Page 150: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/150.jpg)
What’s New In SQL Azure CTPEnhancements
SQL Azure Database
SQL Azure Reporting CTPReporting and BI on SQL Azure databasesBased on SQL Server Reporting Services
SQL Azure Data Sync CTP2Synchronize SQL Azure databasesSynchronize SQL Azure with on-premises SQL Server
Windows Azure Platform – Developer Portal
Enhanced user experience and reportingDatabase manager for SQL Azure
![Page 151: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/151.jpg)
What’s New In SQL Azure CTPEnhancements
SQL Azure Database
SQL Azure Reporting CTPReporting and BI on SQL Azure databasesBased on SQL Server Reporting Services
SQL Azure Data Sync CTP2Synchronize SQL Azure databasesSynchronize SQL Azure with on-premises SQL Server
Windows Azure Platform – Developer Portal
Enhanced user experience and reportingDatabase manager for SQL Azure
![Page 152: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/152.jpg)
What’s New In SQL Azure CTPEnhancements
SQL Azure Database
SQL Azure Reporting CTPReporting and BI on SQL Azure databasesBased on SQL Server Reporting Services
SQL Azure Data Sync CTP2Synchronize SQL Azure databasesSynchronize SQL Azure with on-premises SQL Server
Windows Azure Platform – Developer Portal
Enhanced user experience and reportingDatabase management
![Page 153: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/153.jpg)
SQL Azure Reporting CTP
“Introduction to SQL Azure Reporting”
Web Role
Reporting
Features:
Based on SQL Server Reporting ServicesInteractive and tabular reportingData visualizations: charts, graphs, mapping, gauges
SQL Azure Database data sourcesUtilizes BI Developer Studio (free) to author reportsExport to Excel, PDF, CSV formats
Core scenarios:
Operational reporting on SQL Azure dataEmbed reports into Windows Azure or on-premises applications
![Page 154: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/154.jpg)
What’s New In SQL AzureEnhancements
SQL Azure Database
SQL Azure Reporting CTPReporting and BI on SQL Azure databasesBased on SQL Server Reporting Services
SQL Azure Data Sync CTP2Synchronize SQL Azure databasesSynchronize SQL Azure with on-premises SQL Server
Windows Azure Platform – Developer Portal
Enhanced user experience and reportingDatabase management
![Page 155: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/155.jpg)
SQL Azure Data Sync CTP2
Elastic ScaleService scales as resources requirements grow
No-Code Sync ConfigurationEasily define data to be synchronized
Schedule SyncChoose how often data is synchronized
Conflict HandlingHandle issues where same data is changed in multiple locations
Logging and MonitoringAdministration capabilities for tracking data and monitoring potential issues
“Introduction to SQL Azure Data Sync”
CTP 1
CTP 2
![Page 156: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/156.jpg)
On Premises Windows Azure
Data Sync Service
SQL Azur
e
TDS
SQL Serve
r
Local Agent
SQL Server Sync
Provider
SQL Server Proxy
Provider
Sync Orchestrator
SQL ServerProvider
Sync Orchestrator
HTTPS
SQL Azure Data Sync – A Closer LookCTP 2
![Page 157: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/157.jpg)
SQL Azure Data Sync – Example Use Cases
Move workloads in stages preserving existing infrastructureMove part of the application and sync its data
Meet compliance and regulationsControl data synchronized off-premises
Enable scale-out read or read/writeMultiple synchronized databases for scalability
Preserve data – geo replication of data
Enable new scenariosSpanning enterprise, cloud and remote offices/retail stores
![Page 158: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/158.jpg)
SQL Azure Data Sync – Roadmap
On-Premises (Headquarters)
Syn
c
Sync
Remote OfficesData Sync Service For SQL Azure
Retail Stores
Sync Sync
Sync
SQL Azure
Database
Sync Sync Now
CTP2
– E
nd
of
CY1
0
![Page 159: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/159.jpg)
New SQL Azure Usage Scenarios
Web Role
Reporting
Data SyncFully featured
Windows Azure PlatformApplication
![Page 160: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/160.jpg)
New SQL Azure Usage Scenarios
Web Role
Reporting
Data Sync
Fully featured Windows Azure Platform
Application
Data Sync
Synchronize multiple on-premises SQL Server databases in different
locations
Datacenter
Corporate Office
Branch Office or Retail
Geo-replication
of data across
Windows Azure
Platform datacente
rs
Globally available,cloud & on-premisesdata synchronization
![Page 161: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/161.jpg)
RoadmapNow
Visit www.microsoft.com/sqlazure to register for upcoming CTP access
2010New Windows Azure Developer Portal; Database ManagerLimited CTPs of Data Sync CTP2, Reporting CTPWatch for PDC Announcements; visit the SQL Azure blog and website
2011Backup & RestoreSQL Azure ReportingSQL Azure Data Sync
![Page 162: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/162.jpg)
Windows Azure AppFabricInfrastructure in the cloud
SQL Azure
Windows Azure
Applications
Applications
OthersWindows
Service Bus
?Access Control
Windows Azure AppFabric
![Page 163: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/163.jpg)
Access Control
Service Bus
Service Bus
Registry
4) Invoke operation on Service Bus
endpoint
3) Discover Service Bus endpoint
Client (On-
premises or cloud)
WCF Service(On-premises)
2) Expose Service Bus endpoint
Illustrating Service Bus
5) Invoke operation on service endpoint
1) Register service endpoint
![Page 164: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/164.jpg)
Windows Azure Platform PricingA summary (in US dollars)Compute: $0.12 to $0.96/hour for each
role instance depending on instance size Storage:
Windows Azure blobs and tables: Data: $0.15/GB per monthAccess: $0.01/10,000 operations
SQL Azure relational:$9.99/month per GB
Bandwidth: Americas/Europe: $0.10/GB in, $0.15/GB outAsia/Pacific: $0.30/GB in, $0.45/GB out
![Page 165: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/165.jpg)
Service Level AgreementsKey points: Windows Azure compute
When you deploy two or more role instances in different fault and upgrade domains, your Internet-facing roles will have external connectivity at least 99.95% of the timeMicrosoft will detect within two minutes when a role instance’s process is not running and initiate corrective action
![Page 166: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/166.jpg)
Service Level AgreementsKey points: Windows Azure storage
At least 99.9% of the time, Microsoft will successfully process correctly formatted requests to add, update, read and delete dataAt least 99.9% of the time, your storage accounts will have connectivity to Microsoft’s Internet gateway
![Page 167: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/167.jpg)
Service Level Agreements Key points: SQL Azure database
SQL Azure will maintain a Monthly Availability of 99.9% during a calendar month. Monthly Availability percentage for a specific customer database is the ratio of the time the database was available to customer to the total time in a month. An interval is marked as unavailable if the customer’s attempts to connect to a database are rejected by the SQL Azure gateway.
![Page 168: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/168.jpg)
Using the Windows Azure Platform: Scenarios
![Page 169: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/169.jpg)
Applying Azure (1) Some characteristics of Azure-appropriate applications
Apps that need massive scaleExample: A Web 2.0 application
Apps that need high reliabilityExample: A Software as a Service (SaaS) application
Apps with variable loadExample: An on-line ticketing application
Apps with a short or unpredictable lifetime
Example: An app created for a marketing campaign
![Page 170: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/170.jpg)
Applying Azure (2) Some characteristics of Azure-appropriate applicationsApps that do parallel processing
Example: A financial modeling applicationApps that must fail fast or scale fast
Example: Start-upsApps that don’t fit well in an organization’s data center
Example: A business unit that wishes to avoid its IT department
Apps that can benefit from external storage
Example: An application that archives data
![Page 171: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/171.jpg)
Blobs
Building on AzureA non-Azure app using Windows Azure storage
SQL Azure
On-Premises or
Hosted Application
![Page 172: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/172.jpg)
Web RoleInstance
Tables
Building on Azure A massively scalable web app exposed on the public Internet
Users
![Page 173: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/173.jpg)
BlobsQueuesTables
Users
Worker Role
Instance
Web RoleInstance
Building on Azure A massively scalable web app with background processing
![Page 174: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/174.jpg)
Web RoleInstance
SQL Azure
Users
Building on Azure A web app with relational storage
![Page 175: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/175.jpg)
Web RoleInstance
SQL Azure
Users
Building on Azure A web app using cloud and on-premises data
Service Bus
On-premises Database
![Page 176: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/176.jpg)
User
Blobs
Web RoleInstance
Queues
Worker Role
Instance
Building on Azure A parallel processing application
![Page 177: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/177.jpg)
The Windows Azure Platform
AppFabric
Developer ExperienceUse existing skills and tools.
Compute Storage Management
Relational data Management Connectivity Access control
platform
CDN
![Page 178: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/178.jpg)
Conclusions
Cloud platforms are hereMicrosoft is placing a big bet with the Windows Azure platform
A new world is unfoldingPrepare to be part of it
![Page 179: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/179.jpg)
Related ContentComunidad Windowshttp://comunidadwindows.orghttp://www.slideshare.net/ecastromhttp://ecastrom.blogspot.com
Introducing the Windows Azure Platform
http://go.microsoft.com/fwlink/?LinkId=158011
Introducing Windows Azurehttp://go.microsoft.com/?linkid=9682907
![Page 180: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/180.jpg)
Presentation SourcesResources
SQL Azure website: http://www.microsoft.com/sqlazure
Blog: http://blogs.msdn.com/sqlazure
Dev Center: http://msdn.microsoft.com/windowsazure/sqlazure
Frameworks:http://msdn.microsoft.com/data
![Page 181: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/181.jpg)
An Introduction to the Windows Azure PlatformDr. Eduardo Castro MartínezMicrosoft [email protected]
http://comunidadwindows.orghttp://ecastrom.blogspot.com
![Page 182: Cloud application architecture with sql azure and windows azure](https://reader038.vdocuments.mx/reader038/viewer/2022102805/5549e245b4c90512488b48cc/html5/thumbnails/182.jpg)
© 2010 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.