BW7
Concurrent Session
11/13/2013 2:15 PM

"Make the Cloud Less Cloudy:
A Perspective for Software
Development Teams"
Pres...
Bill Wilder
Development Partners Software Corporation
Bill Wilder is a hands-on architect, trainer, writer, and community ...
Make%the%Cloud%Less%Cloudy%
A"Perspec)ve"for""
So.ware"Development"Teams!

It’s%all%about%Produc6vity!
Be:er%So<ware%Confe...
My!name!is!Bill!Wilder!

ill
B

er
ild
W
codingoutloud@gmail.com!
blog.codingoutloud.com!
@codingoutloud%
%
www.devpartner...
www.cloudarchitecturepa:erns.com%

Who!is!Bill!Wilder?!
www.bostonazure.org%

www.devpartners.com%
Talk!Roadmap!
1.  Assume!you!are!on!a!dev!team!

–  Tester,!Developer,!Release!Engineer,!Project!Manager,!
Team!Leader,!Ar...
“The%Cloud”%(according!to!some!vendors)!

Copyright!©!2013!Elizabeth!B.!O’Connor!•!used!with!permission!•!www.elizabethboc...
“The%Cloud”%(according!to!customers)!
Let’s"be"prac)cal"and"fact?based"
Using!the!cloud!(for!anything)!means:!
•  Taking!a...
d…!
yon
Be
Cost!transparency!
Pay[by[use!rental!
Opex!(not!capex)!
Measurable!Cost!
"!Benefits!less!easily!
quanUfied!
A!Bus...
NIST!Terminology!

Power?!
Rigidity!
Simplicity!

•  SaaS!=!Soiware!as!a!Service!(BYO!users)!
•  PaaS!=!Plaform!as!a!Servi...
Cloud!CompuUng!
On[Premises!
Soiware!

You!manage!

Data

Data

(as!a!Service)!

Data

Runtime

Runtime

Runtime

Middlewa...
oncept!
Key!C

So<ware%as%a%Service%(“SaaS”)!
BYO%Users%(or%Dev%Team)%
!
!
!
!
And!others…!
oncept!
Key!C

Pla_orm%as%a%Service%(“PaaS”)!
BYO%Apps!
!
!
!
!
And!others…!
oncept!
Key!C

Infrastructure%as%a%Service%(“IaaS”)!
BYO%VMs%(and%Admins%&%DBAs)!
!
!
!
And!others…!
oncept!
Key!C

SaaS%#%PaaS%#%IaaS%is!a%spectrum"
How!to!choose?!
Not!mutually!exclusive.!
PlaXorm!Services!are!your!friend...
n"actually
io"that"ca
Scenar

orld%©"
the"real"w
appen"in"
"h

Need%Departmental%web%site%
(Ini6al)%Requirements:%%
•  Pub...
What!happens!to!Departmental!Web!Site…!
!
Business%Requirements%
1.  Public!staUc!web!site!
2.  15!users!
3.  Dynamic!page...
Demo%
Windows!Azure!Web!Sites!
Using!Azure!Web!Site!Gallery!
Demo%
Federated!AuthenUcaUon!
ASP.NET!+!WAAD!(if!4me!allows,!at!end)!
n"actually
io"that"ca
Scenar

ld"! "
"real"wor
pen"in"the
"h a p

Deployment%takes%too%long%
•  Time%from%checkCin%to%avai...
Demo%
Windows!Azure!Web!Sites!

Automated!Deployment!from!GitHub!
(one!of!many!opUons)!
n"actually
rio"that"ca
Scena

l"world"™"
in"the"rea
"happen"

Need%a%test%instance%
• 
• 
• 
• 

Poten6al%Customer(s)%(kic...
Demo%
Windows!Azure!Virtual!Machine!
1.  Use!Azure!VM!Image!GALLERY!
2.  Automate!with!CLI!
Flexible!VM!“Template”!OpUons!
Out[of[the[box!Vendor!Gallery!
•  Curated!by!Vendor!

Community[driven!Gallery!
•  Not!limi...
n"actually
rio"that"ca
Scena

eal"world
n"in"the"r
"h a p p e

"
"

Need%a%Database%
Experiment,%Prototype,%New%Dev,%Test...
Demo%
1.!Show!IaaS!and!PaaS!and!Partner%%%%%
%%%%(Store/Marketplace)!OpUons!
2.!Example!PaaS!database:!
!!!!!Windows!Azure...
n"actually
rio"that"ca
Scena

eal"world
n"in"the"r
"h a p p e

"
"

Need%to%Share%Files%Publicly%%
(or%selec6vely)%
•  Vi...
Highly!Durable!Blob!Storage!(Azure)!
24!CDN!Nodes!(8!Data!Centers)!

Image!credit:!h#p://welyClau.net/2012/05/10/an[introducUon[to[windows[azure[part[2/!
n"actually
rio"that"ca
Scena

eal"world
n"in"the"r
"h a p p e

"
"

Need%a%temporary[?]%dev%environment%
• 
• 
• 
• 
• 

...
Demo%
Windows!Azure!Virtual!Machines!
with!MSDN!Benefits!
(The!meta[demo!!)!
download_blob_to_file.py!
from!azure.storage!import!*!
!
blob_service!=!BlobService(!
!!!!!!!!!account_name!=!!az_storage_a...
n"actually
rio"that"ca
Scena

eal"world
n"in"the"r
"h a p p e

"
"

Too%many%usernames%&%passwords%
•  Internal%apps%
•  ...
Demo%
Federated!AuthenUcaUon!
ASP.NET!+!WAAD!
actually
"that"can"
Scenario

"∏"
eal"world
n"in"the"r
"h a p p e

I%have%a%startup%or%want%to%learn%
•  Join%BizSpark%(Mi...
o"that"can
Scenari

al"world"
"in"the"re
lly"happen
"actua

Customers%complain%about%stability%
Monitoring!
AlerUng!!
Autoscale!
n"actually
io"that"ca
Scenar

eal"world
n"in"the"r
"h a p p e

[your%scenario%here]%
•  What’s%le<?%%
•  Ques6ons?%

!"
"
Scenario

"≠"
real"world
en"in"the"
a l l y "h a p p
t"can"actu
"tha

Service%[or%app]%needs%to%scale%
"" "

actually
"that"can"
Scenario

eal"world
n"in"the"r
"h a p p e

Service%[or%app]%needs%to%really%scale%
•  CloudCNa6v...
Windows Azure Compute
Options

•  Hadoop!(HDInsight)!–!specialized:!big!data!
•  Mobile!Services!–!specialized:!devices!
•...
Traditional Architecture
(“SOA”)

Load!!
Balancer!

Web!Tier!

Service!Tier!
Cloud-Native
Services

•  Build!highly!scalable!apps!and!
• 
• 
• 
• 

services!
MulU[Uer,!mulU[instance!
architectures!
C...
Cloud Services

.csdef

cscfg

Web!Roles!! “Service!Model”!
Worker!Roles!!
•  1+!types! •  Deployment!
•  1+!types!
•  Win...
Reliable Queue
Services
•  Rentable!–!off[the[shelf!service!
•  Efficient!–!resource[!and!cost[efficient!
•  Reliable!–!backed!...
Scalable
Architecture

Web!Tier!

Service!Bus!
Queue!

Service!Tier!
(“Workers”)!
Pa#ern!in!AcUon:!User!Uploads!Photo!

Web!
Server!

Reliable%Queue%

Reliable%Storage%

Compute!
Service!
QCW![on!Windows!Azure]!
WE%NEED:%

•  Compute!(VM)!resources!to!run!our!code!
% Web%Roles!(IIS)!and!Worker%Roles!(w/o!IIS)...
www.pageofphotos.com!

Pa#ern!in!AcUon:!User!Uploads!Photo!
push!
Web!
Tier!

pull!
Reliable%
Queue%

Service!
Tier!

Reli...
Pa#ern!enables!Responsive!UX!
•  Response!to!interacUve!users!is!as!fast!as!a!
work!request!can!be!persisted!
•  Time!cons...
Pa#ern!supports%bi[direcUonal!scaling!
•  Decoupled!front/back!provides!insula6on%
–  Blocking!is!Bane!of!Scalability!
–  ...
General!Case:!!
%
Many!Roles,!Many!Queues
Web!
Role!
(Admin)!
Web!
Web!
Role!
Web!
Role!
(Public)!
Role!
(IIS)!
(IIS)!

Qu...
Reliable!Queue!&!2[step!Delete!
var%url!=!“h#p://pageofphotos.blob.core.windows.net/up/<guid>.png”;%
queue.AddMessage(!new...
Pa#ern!requires!Idempotent!
•  Perform"idempotent"opera)on"more"than"
once,"end"result"same"as"if"we"did"it"once"
•  Examp...
Pa#ern!expects%Poison!Messages!
•  A!Poison!Message!cannot!be!processed!
– Error!condiUon!for!non[transient!reason!
– Use!...
Pa#ern!assumes%“Plan!for!Failure”!
•  VM%restarts%will%happen%
–  Hardware!failure,!O/S!patching,!crash!(bug)!

•  Bake!in...
What’s%Up?%Reliability!as!EMERGENT!PROPERTY!
Typical%Site% Any%1%Role%Inst% Overall%System%
Opera6ng%System%
Upgrade%
Appl...
Aside:!Is!QCW!same!as!CQRS?!
•  Short%answer:%“no”%
•  CQRS%
–  Command%Query%Responsibility%Segrega6on%

• 
• 
• 
• 
• 

...
What!about!the!DATA?!
•  You:%Azure!Web!Roles!and!Azure!Worker!
Roles!
–  Taking!user!input,!dispatching!work,!doing!work!...
Azure!Services!
In!Closing…!
•  SaaS!+!APIs!
–  ALM,!user!feedback!gathering,!…!

•  PaaS!
–  Host!enUre!applicaUons!(e.g.,!Web!Sites)!
– ...
?!

QuesUons?!
Comments?!
More!informaUon?!
Business!Card!
BostonAzure.org!
•  Boston!Azure!cloud!user!group!
•  Focused!on!Microsoi’s!Public!Cloud!PlaXorm!

•  Monthly,!6:00[8:30!P...
Contact%Me%
Looking"for"…"
•  consul)ng"help"with"Windows"Azure"PlaJorm?""
•  someone"to"bounce"Azure"or"cloud"ques)ons"off...
Cloud!Architecture!Pa#erns!book!
Primer%Chapters%
1. 
2. 
3. 
4. 

Scalability!
Eventual!Consistency!
MulUtenancy!and!!
Co...
Cloud!Architecture!Pa#erns!book!!
Pa:ern%Chapters%
1.  Horizontally!Scaling!Compute!Pa#ern!
2.  Queue[Centric!Workflow!Pa#e...
DONE!
Reality!is!Resource[Constrained!

“Security!is!always!a!
tradeoff;!it!must!be!
balanced!with!the!cost.”"
!

!

![!Bruce!Sch...
Members%of%%
Windows%Azure%
Security%Team%
@Bill!Wilder!

69!
Defense!in!Depth!Approach!

Layer
Data

Applica6on*

Host

DefenseCinCDepth
&  Strong!storage!keys!for!access!control!
&  ...
Defenses!Inherited!by!Windows!Azure!PlaXorm!
ApplicaUons!
Spoofing!

Tampering/!
Disclosure!

VLANs!
!
Top!of!Rack!
Switche...
Compliance!
•  Surrogate!for!“security”!
•  Windows!Azure:!
h#p://www.windowsazure.com/en[us/
support/trust[center/complia...
Developer!Resources!
•  www.windowsazure.com/develop/!is!
LOADED!with!Dev!Libraries,!Training!Kits,!
How!To!Guides!across:...
PORTAL%DEMO%
%

www.windowsazure.com%
manage.windowsazure.com%%

@Bill!Wilder!

74!
Make the Cloud Less Cloudy: A Perspective for Software Development Teams
Upcoming SlideShare
Loading in...5
×

Make the Cloud Less Cloudy: A Perspective for Software Development Teams

112

Published on

With so many technologies branded as “cloud” products, it can be difficult to distinguish good technology from good marketing. The resulting confusion complicates the work of software development teams who are trying not only to architect software effectively but also trying to accelerate building, testing, and delivering software. To cut through this confusion, Bill Wilder defines key cloud terms, compares the different types of clouds, and drills into concrete examples of specific cloud services. Introducing several software architecture concepts and patterns, Bill illustrates how to position applications to run reliably, at high scale (if needed), and with maximum cost efficiency on modern cloud platforms. Specific examples are drawn from the Windows Azure and Amazon cloud platforms, though the concepts are generally applicable. Leave with an understanding of relevant cloud concepts, a better idea of how moving to the “cloud” can impact application architecture, and some practical ideas for exploiting the cloud to improve software development team productivity.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
112
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Make the Cloud Less Cloudy: A Perspective for Software Development Teams"

  1. 1. BW7 Concurrent Session 11/13/2013 2:15 PM "Make the Cloud Less Cloudy: A Perspective for Software Development Teams" Presented by: Bill Wilder Development Partners Software Corporation Brought to you by: 340 Corporate Way, Suite 300, Orange Park, FL 32073 888 268 8770 904 278 0524 sqeinfo@sqe.com www.sqe.com
  2. 2. Bill Wilder Development Partners Software Corporation Bill Wilder is a hands-on architect, trainer, writer, and community leader focused on helping companies and individuals succeed with the cloud using the Windows Azure Platform. Bill began working with Windows Azure when it was unveiled at the Microsoft PDC in 2008 and in 2009 founded Boston Azure (bostonazure.org), the first Windows Azure user group in the world. He is recognized by Microsoft as a Windows Azure MVP and an Azure Insider. Bill is the author of Cloud Architecture Patterns, blogs atblog.codingoutloud.com, and is on Twitter at @codingoutloud. Got cloud questions? Feel free to reach out to Bill via devpartners.comor billw@devpartners.com.
  3. 3. Make%the%Cloud%Less%Cloudy% A"Perspec)ve"for"" So.ware"Development"Teams! It’s%all%about%Produc6vity! Be:er%So<ware%Conference%East% 13CNovemberC2013% (2:15%–%3:30%PM)% Boston%Azure%User%Group% h#p://www.bostonazure.org! @bostonazure% Bill%Wilder% h#p://blog.codingoutloud.com! @codingoutloud%
  4. 4. My!name!is!Bill!Wilder! ill B er ild W codingoutloud@gmail.com! blog.codingoutloud.com! @codingoutloud% % www.devpartners.com%
  5. 5. www.cloudarchitecturepa:erns.com% Who!is!Bill!Wilder?! www.bostonazure.org% www.devpartners.com%
  6. 6. Talk!Roadmap! 1.  Assume!you!are!on!a!dev!team! –  Tester,!Developer,!Release!Engineer,!Project!Manager,! Team!Leader,!Architect,!…!! –  Or!are!a!DBA!or!in!Ops!or!in!DevOps! 2.  You!are!a!Windows!/!.NET!shop! –  Or!Linux,!or!Python,!or!Java,!or!Node,!or!PHP,!or!…! 3.  Focus!on!the!PracUcal! –  Scenarios"that"can"actually"happen"in"the"real"world" –  Examples!drawn!from!Public!Cloud!PlaXorms! –  Emphasis!on!Scenarios!&!Demos% 4.  ApplicaUon!Architecture!for!cloud[naUve!apps! (final!15!minutes)! Overall%Theme:%specific,!acUonable!uses!for!cloud!
  7. 7. “The%Cloud”%(according!to!some!vendors)! Copyright!©!2013!Elizabeth!B.!O’Connor!•!used!with!permission!•!www.elizabethboconnor.com!!
  8. 8. “The%Cloud”%(according!to!customers)! Let’s"be"prac)cal"and"fact?based" Using!the!cloud!(for!anything)!means:! •  Taking!a!dependency!on!the!public!Internet! •  Some!loss!of!control! For!apps:! •  SomeUmes!need!or!benefit!from!updaUng! For!people:! •  New!concepts!&!skills!to!be!learned!&!applied! But!many!prac6cal!uses!that%work!(stay!tuned!!)!
  9. 9. d…! yon Be Cost!transparency! Pay[by[use!rental! Opex!(not!capex)! Measurable!Cost! "!Benefits!less!easily! quanUfied! A!Business!InnovaUon! The%Cloud%>>%a%bunch%of% useful%services%with%APIs% "!API[driven!is!mega.trend! !
  10. 10. NIST!Terminology! Power?! Rigidity! Simplicity! •  SaaS!=!Soiware!as!a!Service!(BYO!users)! •  PaaS!=!Plaform!as!a!Service!(BYO!apps)! •  IaaS!=!Infrastructure!as!a!Service!(BYO!VMs)! h#p://csrc.nist.gov/publicaUons/nistpubs/800[145/SP800[145.pdf! Complexity! Flexibility! Power?!
  11. 11. Cloud!CompuUng! On[Premises! Soiware! You!manage! Data Data (as!a!Service)! Data Runtime Runtime Runtime Middleware Middleware Middleware O/S O/S O/S Virtualization Virtualization Virtualization Servers Servers Storage Storage Networking Networking Runtime Middleware Servers Storage Networking O/S Virtualization Managed!by!vendor! Data Managed!by!vendor! Applications Managed!by!vendor! Applications You!manage! Applications Soiware! (as!a!Service)! (as!a!Service)! Applications You!manage! PlaXorm! Infrastructure! Servers Storage Networking |%%%%%%%%%%Public%Cloud%Rental%Models%%%%%%%%%%%|!
  12. 12. oncept! Key!C So<ware%as%a%Service%(“SaaS”)! BYO%Users%(or%Dev%Team)% ! ! ! ! And!others…!
  13. 13. oncept! Key!C Pla_orm%as%a%Service%(“PaaS”)! BYO%Apps! ! ! ! ! And!others…!
  14. 14. oncept! Key!C Infrastructure%as%a%Service%(“IaaS”)! BYO%VMs%(and%Admins%&%DBAs)! ! ! ! And!others…!
  15. 15. oncept! Key!C SaaS%#%PaaS%#%IaaS%is!a%spectrum" How!to!choose?! Not!mutually!exclusive.! PlaXorm!Services!are!your!friend.!
  16. 16. n"actually io"that"ca Scenar orld%©" the"real"w appen"in" "h Need%Departmental%web%site% (Ini6al)%Requirements:%% •  Public% •  Sta6c% •  Small%audience%
  17. 17. What!happens!to!Departmental!Web!Site…! ! Business%Requirements% 1.  Public!staUc!web!site! 2.  15!users! 3.  Dynamic!pages!updated! by!pulling!from!API! 4.  Control!access!to!some! pages!w/!login! 5.  Add!database! 6.  Open!up!to!whole! company!of!40k!people! Technical%Solu6on% 1.  Simple!Web!App! 2.  Shared!VM! 3.  Need!more!memory! and!CPU! 4.  Use!Federated! AuthenUcaUon! 5.  Need!backups! 6.  Need!more!resources!+! monitoring!+!DR!
  18. 18. Demo% Windows!Azure!Web!Sites! Using!Azure!Web!Site!Gallery!
  19. 19. Demo% Federated!AuthenUcaUon! ASP.NET!+!WAAD!(if!4me!allows,!at!end)!
  20. 20. n"actually io"that"ca Scenar ld"! " "real"wor pen"in"the "h a p Deployment%takes%too%long% •  Time%from%checkCin%to%available%for% dev/test% •  Produc6on%vs.%other%environments%
  21. 21. Demo% Windows!Azure!Web!Sites! Automated!Deployment!from!GitHub! (one!of!many!opUons)!
  22. 22. n"actually rio"that"ca Scena l"world"™" in"the"rea "happen" Need%a%test%instance% •  •  •  •  Poten6al%Customer(s)%(kick%6res,%PoC)% CEO%(conference!demo)% Marke6ng%(to%brag%about%it)% EVEN%for%“NONCCLOUD”%SOFTWARE…%
  23. 23. Demo% Windows!Azure!Virtual!Machine! 1.  Use!Azure!VM!Image!GALLERY! 2.  Automate!with!CLI!
  24. 24. Flexible!VM!“Template”!OpUons! Out[of[the[box!Vendor!Gallery! •  Curated!by!Vendor! Community[driven!Gallery! •  Not!limited!to!“cloud!stuff”! •  Azure!VM!Depot!h#p://vmdepot.msopentech.com/!! •  Amazon!AMI!Marketplace!h#ps://aws.amazon.com/marketplace/!! Your!own!Images! •  Easy!to!create!within!your!account! •  Can!keep!Private!or!Share!the!VM! •  Sharing!with!other!accounts!is!out[of[band!
  25. 25. n"actually rio"that"ca Scena eal"world n"in"the"r "h a p p e " " Need%a%Database% Experiment,%Prototype,%New%Dev,%Test,%Prod,%…% IaaS%vs.%PaaS%&%% Vendor%vs.%3rd%Party:% Windows!Azure!SQL!Database,!SQL!Server,!RDS,! MySQL,!Oracle,!Mongo,!Azure!Tables,!SimpleDB,!and! many!more…! •  • 
  26. 26. Demo% 1.!Show!IaaS!and!PaaS!and!Partner%%%%% %%%%(Store/Marketplace)!OpUons! 2.!Example!PaaS!database:! !!!!!Windows!Azure!SQL!Database!
  27. 27. n"actually rio"that"ca Scena eal"world n"in"the"r "h a p p e " " Need%to%Share%Files%Publicly%% (or%selec6vely)% •  Videos,%Documents,%Installa6ons,%…% •  Amazon%S3,%Azure%Blob% •  CDNCbacked,%Global,%SuperCscalable,% CrazyCreliable,%Inexpensive%
  28. 28. Highly!Durable!Blob!Storage!(Azure)!
  29. 29. 24!CDN!Nodes!(8!Data!Centers)! Image!credit:!h#p://welyClau.net/2012/05/10/an[introducUon[to[windows[azure[part[2/!
  30. 30. n"actually rio"that"ca Scena eal"world n"in"the"r "h a p p e " " Need%a%temporary[?]%dev%environment% •  •  •  •  •  Hire%a%ShortCterm%Contractor% Need%to%test%on%fresh%OS% Dev%on%vaca%needs%to%debug% Or%“just%because”…% Give%a%talk%or%give%demos%
  31. 31. Demo% Windows!Azure!Virtual!Machines! with!MSDN!Benefits! (The!meta[demo!!)!
  32. 32. download_blob_to_file.py! from!azure.storage!import!*! ! blob_service!=!BlobService(! !!!!!!!!!account_name!=!!az_storage_account_name,!! !!!!!!!!!account_key!=!az_storage_account_key)! % stream!=!blob_service.get_blob(! !!!!!!!!!!blob_container_name,!blob_name)! with!open(file_path,!'w')!as!f:! !!!!!!!!!!f.write(stream)!
  33. 33. n"actually rio"that"ca Scena eal"world n"in"the"r "h a p p e " " Too%many%usernames%&%passwords% •  Internal%apps% •  Our%customerCfacing%app% requires%custom%username% •  Our%dev%tools%are%guilty%too%
  34. 34. Demo% Federated!AuthenUcaUon! ASP.NET!+!WAAD!
  35. 35. actually "that"can" Scenario "∏" eal"world n"in"the"r "h a p p e I%have%a%startup%or%want%to%learn% •  Join%BizSpark%(Microso<)%or% AWS%Ac6vate%(Amazon)% •  Use%the%free%6er%or%free%trial% •  GitHub%is%free%for%open%source% •  Apply%“unused”%MSDN%credits…% •  But%even%“full%price”%ain’t%bad% % azure%aws
  36. 36. o"that"can Scenari al"world" "in"the"re lly"happen "actua Customers%complain%about%stability%
  37. 37. Monitoring! AlerUng!! Autoscale!
  38. 38. n"actually io"that"ca Scenar eal"world n"in"the"r "h a p p e [your%scenario%here]% •  What’s%le<?%% •  Ques6ons?% !" "
  39. 39. Scenario "≠" real"world en"in"the" a l l y "h a p p t"can"actu "tha Service%[or%app]%needs%to%scale%
  40. 40. "" " actually "that"can" Scenario eal"world n"in"the"r "h a p p e Service%[or%app]%needs%to%really%scale% •  CloudCNa6ve:%HA,%high% resourceCefficiency,%and%high% costCefficiency% •  Impact%is%Architectural% •  Some%pa:erns%may%help…%
  41. 41. Windows Azure Compute Options •  Hadoop!(HDInsight)!–!specialized:!big!data! •  Mobile!Services!–!specialized:!devices! •  Virtual!Machines!–!most!flexible! •  Web!Sites!–!most!convenient! •  Cloud!Services!–!most!scalable,!most!efficient!
  42. 42. Traditional Architecture (“SOA”) Load!! Balancer! Web!Tier! Service!Tier!
  43. 43. Cloud-Native Services •  Build!highly!scalable!apps!and! •  •  •  •  services! MulU[Uer,!mulU[instance! architectures! Can!be!combined!with!other! compute!services! Maintain%stateless%nodes%&% horizontal%scaling%approach% Automatable!management!
  44. 44. Cloud Services .csdef cscfg Web!Roles!! “Service!Model”! Worker!Roles!! •  1+!types! •  Deployment! •  1+!types! •  Windows! Package! •  Windows! Server!! •  Config:!VM!sizes%&! Server!! •  Running!IIS! instance!counts,! •  Could!run! seyngs,!endpoints,! Tomcat,!etc.! certs…!
  45. 45. Reliable Queue Services •  Rentable!–!off[the[shelf!service! •  Efficient!–!resource[!and!cost[efficient! •  Reliable!–!backed!by!SLA!and!ops!team! •  Durable!–!won’t!lose!your!data! •  Scalable!–!Internet"scale" •  Approachable!–!REST!+!SDKs! •  Feature!rich!–!!support!“at!least!once”!and! “at!most!once”!delivery!guarantees! •  Examples:!! $  Azure!Service!Bus!&!Storage!Queue!Services! $  Amazon!Simple!Queue!Service!(SQS)!
  46. 46. Scalable Architecture Web!Tier! Service!Bus! Queue! Service!Tier! (“Workers”)!
  47. 47. Pa#ern!in!AcUon:!User!Uploads!Photo! Web! Server! Reliable%Queue% Reliable%Storage% Compute! Service!
  48. 48. QCW![on!Windows!Azure]! WE%NEED:% •  Compute!(VM)!resources!to!run!our!code! % Web%Roles!(IIS)!and!Worker%Roles!(w/o!IIS)! •  Reliable!Queue!to!communicate! % Azure!Storage!Queues! •  Durable/Persistent!Storage! % Azure!Storage!Blobs%&!Tables;!WASD!
  49. 49. www.pageofphotos.com! Pa#ern!in!AcUon:!User!Uploads!Photo! push! Web! Tier! pull! Reliable% Queue% Service! Tier! Reliable%File% Storage% UX%implica6ons:%user!does!not!wait!for!thumbnail! (architecture!)!
  50. 50. Pa#ern!enables!Responsive!UX! •  Response!to!interacUve!users!is!as!fast!as!a! work!request!can!be!persisted! •  Time!consuming!work!done!asynchronously! •  Comparable!total!resource!consumpUon,! arguably!be#er!subjecUve!UX! •  UX%challenge!–!how!to!express!Async!to!users?! –  Communicate!Progress! –  Display!Final!results! –  Long!Polling/Web!Sockets!(e.g.,!SignalR!or!Node.io)!
  51. 51. Pa#ern!supports%bi[direcUonal!scaling! •  Decoupled!front/back!provides!insula6on% –  Blocking!is!Bane!of!Scalability! –  Order!processing!partner!doing!maintenance! –  Twi#er!down! –  Email!server!unreachable! –  Internet!connecUvity!interrupUon! •  Loosely!coupled,!concernCindependent%scaling% –  (see!next!slide)! –  Get!Scale%Units!right! – “Scale”!in!BOTH!DIRECTIONS! – Key!to!opUmizing!operaUonal!CO$T$%
  52. 52. General!Case:!! % Many!Roles,!Many!Queues Web! Role! (Admin)! Web! Web! Role! Web! Role! (Public)! Role! (IIS)! (IIS)! Queue! Queue! Type!1! Type!1! Queue! Queue! Type!2! Type!2! Queue! Type!3! Worker! Worker! Role! Worker! Role! Worker! Role! Role! Type!1! Worker! Worker! Role! Worker! Role! Worker! Worker! Role! Role! Worker! Role! Worker! Type!2! Role! Type!2! Role! Type!2! Type!2! • !Scaling!best!when!Investment%α%Benefit% • %Op6mize%for%CO$T%EFFICIENCY% • !Logical!vs.!Physical!Architecture!depends!on!current!scale!
  53. 53. Reliable!Queue!&!2[step!Delete! var%url!=!“h#p://pageofphotos.blob.core.windows.net/up/<guid>.png”;% queue.AddMessage(!new!CloudQueueMessage(!url!)!);! Web% Tier% Queue% Service% Tier% (Workers)% var!invisibilityWindow!=!TimeSpan.FromSeconds(!10!);% CloudQueueMessage!!msg!=! !!!!!!!!!!!!!!!!queue.GetMessage(!invisibilityWindow!);! (…"do"some"processing"then"…)" queue.DeleteMessage(%msg%);!
  54. 54. Pa#ern!requires!Idempotent! •  Perform"idempotent"opera)on"more"than" once,"end"result"same"as"if"we"did"it"once" •  Example!with!Thumbnailing!(easy!case)! •  App[specific!concerns!dictate!approaches! – CompensaUng!acUon,!Last!write!wins,!etc.! •  PARTNERSHIP:!division!of!responsibility! between!cloud!plaXorm!&!app! –  Far!cry!from!database!transacUon!
  55. 55. Pa#ern!expects%Poison!Messages! •  A!Poison!Message!cannot!be!processed! – Error!condiUon!for!non[transient!reason! – Use!dequeue!count!property! •  Be!proacUve! – Falling!off!the!queue!may!kill!your!system! •  Determine!a!Max!Retry!policy!per!queue! – Delete,!put!on!“bad”!queue,!alert!human,!…!
  56. 56. Pa#ern!assumes%“Plan!for!Failure”! •  VM%restarts%will%happen% –  Hardware!failure,!O/S!patching,!crash!(bug)! •  Bake!in!handling!of!restarts!into!our!apps! –  Restarts!are!rouUne:!system!“just!keeps!working”! –  Idempotent!support!needed!important! –  Event!Sourcing!(commonly!seen!with!CQRS)!may! help! •  Not!an!excepUon!case!!Expect!it!! •  Consider!N+1!Rule!
  57. 57. What’s%Up?%Reliability!as!EMERGENT!PROPERTY! Typical%Site% Any%1%Role%Inst% Overall%System% Opera6ng%System% Upgrade% Applica6on%Code% Update%% Scale%Up,%Down,%or%In% Hardware%Failure% So<ware%Failure%(Bug)% Security%Patch%
  58. 58. Aside:!Is!QCW!same!as!CQRS?! •  Short%answer:%“no”% •  CQRS% –  Command%Query%Responsibility%Segrega6on% •  •  •  •  •  Commands!change!state! Queries!ask!for!current!state! Any!operaUon!is!one!or!the!other! SomeUmes!includes!Event!Sourcing! SomeUmes!modeled!using!Domain!Driven! Design!(DDD)!
  59. 59. What!about!the!DATA?! •  You:%Azure!Web!Roles!and!Azure!Worker! Roles! –  Taking!user!input,!dispatching!work,!doing!work! –  Follow!a!decoupled!queue[in[the[middle!pa#ern! –  Stateless!compute!nodes! •  Cloud:!“Hard!Part”:!persistent,!scalable!data! –  Azure!Queue!&!Blob%Services! –  Three!copies!of!each!byte! –  Geo[replicated!to!sister!data!center! –  Busy%Signal%Pa:ern%
  60. 60. Azure!Services!
  61. 61. In!Closing…! •  SaaS!+!APIs! –  ALM,!user!feedback!gathering,!…! •  PaaS! –  Host!enUre!applicaUons!(e.g.,!Web!Sites)! –  Make!it!easier!to!build!applicaUons!(leverage! Database!/!Queue!/!File!Storage!/!VM!services)! •  IaaS! –  Also!many!uses!for!dev/test!! •  Use!services!to!help!you!scale!cost[!and!resource[ efficiently!using!Architecture!
  62. 62. ?! QuesUons?! Comments?! More!informaUon?!
  63. 63. Business!Card!
  64. 64. BostonAzure.org! •  Boston!Azure!cloud!user!group! •  Focused!on!Microsoi’s!Public!Cloud!PlaXorm! •  Monthly,!6:00[8:30!PM!in!Boston!area! –  Food;!wifi;!free;!great!topics;!growing!community! •  Follow!on!Twi#er:!@bostonazure%% •  More!info!or!to!join!our!Meetup.com!group:!! h:p://www.bostonazure.org%
  65. 65. Contact%Me% Looking"for"…" •  consul)ng"help"with"Windows"Azure"PlaJorm?"" •  someone"to"bounce"Azure"or"cloud"ques)ons"off?" •  a"speaker"for"your"user"group"or"" company"technology"event?" Just!Ask!! % Find!this!slide! deck!here! %Bill%Wilder% %@codingoutloud% %h:p://blog.codingoutloud.com% %community%inquiries:%codingoutloud@gmail.com% %business%inquiries:%www.devpartners.com%% %book:%www.cloudarchitecturepa:erns.com%%
  66. 66. Cloud!Architecture!Pa#erns!book! Primer%Chapters% 1.  2.  3.  4.  Scalability! Eventual!Consistency! MulUtenancy!and!! Commodity!Hardware! Network!Latency!
  67. 67. Cloud!Architecture!Pa#erns!book!! Pa:ern%Chapters% 1.  Horizontally!Scaling!Compute!Pa#ern! 2.  Queue[Centric!Workflow!Pa#ern! 3.  Auto[Scaling!Pa#ern! 4.  MapReduce!Pa#ern! 5.  Database!Sharding!Pa#ern! 6.  Busy!Signal!Pa#ern! 7.  Node!Failure!Pa#ern! 8.  Colocate!Pa#ern! 9.  Valet!Key!Pa#ern! 10.  CDN!Pa#ern! 11.  MulUsite!Deployment!Pa#ern!
  68. 68. DONE!
  69. 69. Reality!is!Resource[Constrained! “Security!is!always!a! tradeoff;!it!must!be! balanced!with!the!cost.”" ! ! ![!Bruce!Schneier! ! ! h#p://www.schneier.com/essay[207.html! @Bill!Wilder! 68!
  70. 70. Members%of%% Windows%Azure% Security%Team% @Bill!Wilder! 69!
  71. 71. Defense!in!Depth!Approach! Layer Data Applica6on* Host DefenseCinCDepth &  Strong!storage!keys!for!access!control! &  SSL!support!for!data!transfers!between!all!parUes! &  Front[end!.NET!framework!code!running!under!parUal!trust! &  Windows!account!with!least!privileges! &  Hardened!version!of!Windows!Server!2008!OS!for!both!VM!Host! and!VM!Guest!operaUng!systems! &  Host!boundaries!enforced!by!external!hypervisor! Network &  Host!firewall!limiUng!traffic!to!VMs! &  VLANs!and!packet!filters!in!routers! Physical &  World[class!physical!security! &  ISO!27001!and!SAS!70!Type!II!cerUficaUons!for!datacenter! processes! @Bill!Wilder! 70!
  72. 72. Defenses!Inherited!by!Windows!Azure!PlaXorm! ApplicaUons! Spoofing! Tampering/! Disclosure! VLANs! ! Top!of!Rack! Switches! ! Custom! packet! filtering! VM!switch! hardening! ! CerUficate! Services! ! Shared[ Access! Signatures! ! HTTPS!! ! Sidechannel! protecUons! RepudiaUon! Monitoring!! ! DiagnosUcs! Service! @Bill!Wilder! Denial!of! Service! ! Configurable! scale[out! ElevaUon!of! Privilege! ParUal!Trust! RunUme! ! Hypervisor! custom! sandboxing! ! Virtual! Service! Accounts! 71!
  73. 73. Compliance! •  Surrogate!for!“security”! •  Windows!Azure:! h#p://www.windowsazure.com/en[us/ support/trust[center/compliance/! •  Amazon!Web!Services:! h#p://aws.amazon.com/compliance/!!
  74. 74. Developer!Resources! •  www.windowsazure.com/develop/!is! LOADED!with!Dev!Libraries,!Training!Kits,! How!To!Guides!across:! –  Mobile!(iOS,!Android,!Win!Phone,!Win!8!SDKs)! –  .NET,!Node.js,!Java,!PHP,!Python,!REST! –  PowerShell,!CLI! •  Example:!Create!Node.js%web%site!from!Mac!CLI! h#ps://www.windowsazure.com/en[us/develop/nodejs/tutorials/create[a[website[(mac)/!! •  Example:!Create!Linux%(CentOS)%VM!from!CLI! (Node[based!CLI!–!Windows!not!required)! h#ps://www.windowsazure.com/en[us/develop/php/how[to[guides/command[line[tools/! h#ps://www.windowsazure.com/en[us/develop/nodejs/how[to[guides/command[line[ tools/!!! •  Example:!Install!Couchbase%+%VNet!on!VM! h#p://blogs.msdn.com/b/jimoneil/archive/2012/06/16/couchbase[on[azure[a[tour[of[ new[windows[azure[features.aspx!! @Bill!Wilder! 73!
  75. 75. PORTAL%DEMO% % www.windowsazure.com% manage.windowsazure.com%% @Bill!Wilder! 74!

×