Beruflich Dokumente
Kultur Dokumente
Cloud Architectural
Patterns
(using Microsoft Azure tools)
Pushkar Chivate
Agenda
Quick Look: Microsoft Azure as a
platform
Overview of patterns for cloud
applications
Messaging patterns
Demo
Azure Tables,
DocumentDB,
Azure Service bus (Queues and Pub-Sub
architecture)
Allocated
ITcapacity
Actual
Load
Load
Forecast
Over
capacity
Tim
e
Capacity on
Demand
Tim
e
Actual
Load
Load
Forecast
Cloud Models
IaaS
Infrastructure as a
service
(e.g. Azure VMs)
PaaS
Platform as a
service
(e.g. Azure Storage,
Service Bus etc.)
SaaS
Software as a
Service
(e.g. Office 365)
Microsoft Azure
Designed for Failure
Network load balancer
UD1
Fault
Domain 1
VM1
VM2
UD2
VM7
VM8
Fault Domain
2
VM3
VM4
Fault Domain
3
VM5
VM6
Microsoft Azure
Designed for Scale
Scale out
Network load balancer
VM1
VM2
VM3
VM4
Azure VMs,
Websites
&
Rethinking Apps
A look at various features Azure offers
Architectural Pattern
An architectural pattern is a
general, reusable solution to a
commonly occurring problem
within a given context.
Cloud Patterns
Data-Management Patterns
Index
Create indexes over the fields in data stores that are frequently
referenced by query criteria. This pattern can improve query
performance by allowing applications to more quickly retrieve data
from a data store. Divide a data store into a set of horizontal
partitions shards
Materialized
Generate
when
query
and data
View Pattern
Command
and Query
Responsibility Segregation
(CQRS) Pattern
Segregate operations that read data from operations that update
Cloud Patterns
Messaging Patterns
Pipes and Filter Pattern
Decompose a task that performs complex processing into a
series of discrete elements that can be reused.
Pattern
Use a queue that acts as a buffer between a task and a service that it
invokes in
order to smooth intermittent heavy loads that may otherwise
cause the service to
fail or the task to timeout.
Data Storage
Various data storage
techniques
SQL Azure
Azure Table
Blob storage
Document DB
Materialized View
This pattern
can be used to support
Pattern
efficient querying and data extraction,
and improve application performance
Materialized View
Database
tables
OrderID Account
ItemID
1
ItemID
A
Nam
e
Materialized
View Total Qty
Nam
Ordered
e
Stock
100
Shirts 4
Denormalized data
OrderID ItemI
100
Shirts
D
Qty
100
Ordere
d
101
1
Pants
100
125
2
101
Data
101 refreshes
Pants 3
periodically
Materialized Views Vs
Regular Views
Materialized
View
Regular View
Stored as a physical
database object
Indexes on the base
tables are not used ,
can create indexes
on materialized
view
Faster performance
Needs to be
updated
Stored as a query
Materialized view
When to use materialized
views?
When underlying data is
complex and difficult to
query directly
Materialized view
Snapsho
ts
Databas
e1
Materialize
d view
Table
1
Materialized
view 1
Databas
e2
Table
1
Materialized
view 2
Snapsh
ot
Databases supporting
Materialized views
Oracle
IBM DB2
MySQL
No Native support
Can be
implemented
using triggers
SQL
Server
Called Indexed
Views
Materialized view
When not to use materialized
views?
The source data is simple and easy to query.
The source data changes very quickly, or can be
Azure Tables
What are Azure Tables?
Non relational entities (not RDBMS).
Tables are nothing but collection of entities
Entities are comprised of properties
Properties are name value pairs
Azure Tables
Azure Storage
Account
Employees
(Table)
Entit
y
Propert Propert
y
y
Entit
y
Propert Propert Propert
y
y
y
Azure Storage
Account
Employees
(Table)
Entit
Row Key
Timestamp
Property
Property
Property
<Name,Valu
e>
<Name,Valu
e>
<Name,Valu
e>
other properties
Each entity can have different
(Entity)
EmployeeName=
CertName=
BirthDate=
CertNumber=
EmployeeName=
CertName=
BirthDate=
CertNumber=
FavoriteTeam=
Employees
(Table)
(Entity)
PK = CertName
CertName=
EmployeeName= RK =
EmployeeName
CertNumber=
BirthDate=
CertName=
EmployeeName=
CertNumber=
BirthDate=
Certifications
(Table)
Employees
(Table)
O
R
Certifications
(Table)
Azure Tables
No Fixed Schema for
entities
Employee table
Employee
Name
Birt Favorit
hD eTeam
ate
David
Anderson
1/1/
197
0
Nancy
Wilson
4/15 Atlanta
/196 Falcon
5
s
John Doe
Apri
l 1,
Azure Table
Demo
Azure Tables
Summary
No nice relational schema model that we get in
RDBMS
Easy to work with
Built to scale
Great pricing
DocumentDB
Azure Document DB - relatively new service
Its fully managed Document database as a service
It stores the data in JSON
The Azure Tables are extremely scalable and cheap, but if you
start querying on any other attributes then you start running
into problems.
Its massively scalable but fully query-able by all parts of JSON
tree.
Capacity units are 10GB in size and predictable reads and
writes / second.
DocumentDB
DocumentDB
Demo
capabilities
Enable loosely coupled
solutions
Achieve PublishSubscribe scenarios
Tightly Coupled
Shippin
g
Store Front
End
Order
processing
Store Back
End
Loosely Coupled
Shippin
g
Store Front
End
Order
Queue
Order
processing
Store Back
End
Loosely Coupled
Shippin
g
Store Front
End
Order
Queue
Order
processing
Store Back
End
Publish - Subscribe
Shippin
g
Order
Printers
Subscription
1
Order
Papers
Subscription
2
Store Front
End
Order
Queue
Order
processing
Store Back
End
Cloud Patterns
Resiliency Patterns
Circuit
Breaker Pattern
Retry Pattern
Compensating Transaction
Pattern
Summary
We Looked at
- Azure as Infrastructure (VMs)
- Azure as Platform
-Websites
- Storage - Azure Tables, DocumentDB
- Messaging Service Bus, Queues, Topics,
AMQP
- Azure CDN
Summary
Network load balancer
VM1
VM2
VM3
Subscription 1
Subscription 2
Worker Role 1
Worker Role 2
Azure
Tables
DocumentD
B
SQL Database
VM4
References
- MSDN (cloud architectural patterns)
- azure.microsoft.com (Learning videos and
documentation)
- some images from www