Things to think about whilearchitecting Azure solutions<br />
Famous Last Words…<br />“It is a very humbling experience to make a multimillion-dollar mistake, but it is also very memor...
So, What is Software Architecture exactly?<br />
Software architecture is the fundamentalorganization of a system, embodied in its components, their relationships to each ...
Architecture forces<br />Stakeholders<br />Quality <br />Attributes<br />Constraints<br />Principles<br />Community <br />...
Dequeue/Delete pattern<br />The  Network is reliable<br />
Dequeue/Delete pattern<br />The  Network is reliable<br />Still a problem <br />If we crash here<br />
Idempotencyf(x) = f(f(x))<br />
Messages Process At Least Once<br />Debit bank account $100 message<br />Worker role reads message<br />Balance debited $1...
Solving the Idempotency Problem<br />Debit bank account $100 message with transaction ID<br />Worker role reads message. C...
Latency is zero<br />
It might be infinite for all purposes but it costs…<br />Bandwidth is infinite <br />
Authentication with ACS<br />The Network is Secure<br />Slide by Alik Levin<br />
Service Bus<br />Provides secure messaging and connectivity across different network topologies<br />Enables hybrid applic...
Enabling hybrid applications<br />Datacenter<br />Partner<br />LOB app<br />Mobile Device<br />LOB web service<br />
Enabling hybrid applications<br />Datacenter<br />Partner<br />ACS<br />LOB app<br />SB<br />Mobile Device<br />LOB web se...
Enabling hybrid applications<br />Datacenter<br />Partner<br />ACS<br />LOB app<br />SB<br />Mobile Device<br />LOB web se...
Enabling hybrid applications<br />Partner<br />Datacenter<br />ACS<br />LOB app<br />SB<br />Mobile Device<br />LOB web se...
Enabling hybrid applications<br />Partner<br />Datacenter<br />ACS<br />LOB app<br />SB<br />Mobile Device<br />LOB web se...
Electricity <br />Power Grid<br />Demo<br />
Don’t assume specific instances<br />Virtual IP : 1.1.1.2<br />Virtual IP : 1.1.1.3<br />Virtual IP : 1.1.1.4<br />Worker ...
Inter-role communications<br />
Reduced Headache on  the one handNew challenges on the other<br />There is one administrator<br />
Azure MMC Snap-in <br />http://code.msdn.microsoft.com/windowsazuremmc<br />
Cerebrata – Azure Diagnostics Manager<br />http://www.cerebrata.com/Products/AzureDiagnosticsManager/Default.aspx<br />
Distribution cost in serialization, time on the wire, security <br />Transport cost is zero<br />
A lot of calls to fulfill a business function<br />
Bring Data close to computation<br />
It isn’t – but it’s abstractedunless of course you use Azure connect<br />The Network is homogenous <br />Quickly connect ...
Deployment view<br />Consider xsmall instances for development<br />Test if you can use less than medium for production <b...
Cost considerations<br />You pay when you’re deployed (there is no “shelving”)<br />Shutdown doesn’t help<br />(keep CPUs ...
2 Small instances cost the same as 1 medium instance<br />
2 instances can give you better availability<br />Need to be on different fault and upgrade domains<br />
I/O performance on smaller instances might be problematic<br />
You can control Azure from scripts and code (even dev fabric)<br />Testing<br />
Demo Cloudoscope Acceptance Tests<br />
Illustrations<br />Slide 11 http://www.sxc.hu/photo/1201443<br />Slide  http://www.sxc.hu/photo/1160486<br />
Upcoming SlideShare
Loading in …5
×

Things to think about while architecting azure solutions

2,184 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
2,184
On SlideShare
0
From Embeds
0
Number of Embeds
124
Actions
Shares
0
Downloads
25
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • More than 30 years ago (1975)
  • IEEE 1471 – recommended practice for architecture description of software intensive systemSoftware architecture is the collection of the fundamental decisions about a software product/solution designed to meet the project&apos;s quality attributes (i.e. requirements). The architecture includes the main components, their main attributes, and their collaboration (i.e. interactions and behavior) to meet the quality attributes. Architecture can and usually should be expressed in several levels of abstraction (depending on the project&apos;s size). If an architecture is to be intentional (rather than accidental), it should be communicated. Architecture is communicated from multiple viewpoints to cater the needs of the different stakeholders.Architectural decisions are global tied to quality attributesDesigns decisions are local –tied to functionality
  • Fallacies of ditributed computingPeter Deutsch (first 7 in 94) &amp; James Gosling (last in 97)
  • Slide ObjectiveIntroduce idempotencySpeaking NotesWhen describing the function“F of X equals F of F of X” – More simply put You get the same result no matter how many time you call the functionThis is important for us in this situation as the approach that Windows Azure takes to queues;Read the message and hideDelete the message on completionIs vulnerable do executing the same message twice. The pattern guarantees that each message will be processed to completion AT LEAST onceNotes
  • Slide ObjectiveUnderstand the need for idempotent operations with a simple exampleSpeaking NotesThere are number of reasons why you may not call deleteMessage, including:Your code failsThere is a hardware failure, effectively killing your worker role codeThere worker role is instructed to stop, and you have no code implemented to do that in a timely fashion.For this reason, you should design the tasks your worker role does to be Idempotent – which basically means that you should be able to do the same task twice, without it having an adverse effect on the system state.e.g. – If the worker is sent the name of a picture stored in blob storage that it would resize, it does not matter how many times it resizes the image, the outcome is the same. This is idempotent. If a worker is decrementing a balance, it DOES matter how many times this occurs – this is NOT idempotent.Notes
  • Slide ObjectiveUnderstand a way to make the previous example idempotent- or at least robust against multiple message processingSpeaking NotesThe approach in this slide is to use a Replay LogThis allows us to track whether we have seen a message before and if so take a different course of actionThere will be various levels of remedial action we may choose to take based on the contents of our replay logWe may be able to fully compensate for the previous failureWe may need human interventionNotesSome good (older) posts on creating idempotent web services. Worth readinghttp://blogs.msdn.com/b/ramkoth/archive/2004/03/12/88423.aspxhttp://blogs.msdn.com/b/ramkoth/archive/2004/03/13/88778.aspxGood MSDN mag article that touches on the topicsAlso discusses MSMQ and WCF which have different approaches- are transactionalhttp://msdn.microsoft.com/en-us/magazine/cc663023.aspx Discussion on dealing with situations where processing time may inadvertently exceed the invisibility timeouthttp://blog.smarx.com/posts/deleting-windows-azure-queue-messages-handling-exceptions
  • Things to think about while architecting azure solutions

    1. 1. Things to think about whilearchitecting Azure solutions<br />
    2. 2. Famous Last Words…<br />“It is a very humbling experience to make a multimillion-dollar mistake, but it is also very memorable….”<br />(Fred Brooks - “Mythical Man-Month” p.47)<br />
    3. 3. So, What is Software Architecture exactly?<br />
    4. 4. Software architecture is the fundamentalorganization of a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolution<br />
    5. 5. Architecture forces<br />Stakeholders<br />Quality <br />Attributes<br />Constraints<br />Principles<br />Community <br />experience<br />Architect<br />Architecture<br />Patterns & <br />Anti-patterns<br />Key<br />people<br />Technology<br />A “deliverable”<br />Produce<br />Is an input <br />
    6. 6.
    7. 7. Dequeue/Delete pattern<br />The Network is reliable<br />
    8. 8. Dequeue/Delete pattern<br />The Network is reliable<br />Still a problem <br />If we crash here<br />
    9. 9. Idempotencyf(x) = f(f(x))<br />
    10. 10. Messages Process At Least Once<br />Debit bank account $100 message<br />Worker role reads message<br />Balance debited $100<br />Worker role is torn before message can be deleted<br />3 minutes later, message re-appears on queue<br />Worker role reads message<br />Balance debited $100<br />Message deleted from queue<br />Chaos ensues.....<br />Customer calls bank.....<br />Web Role<br />Worker Role<br />Balance = $1000<br />Balance = $900<br />Balance = $800<br />Worker Role<br />Web Role<br />Worker Role<br />Worker Role<br />Queue<br />Storage<br />LB<br />LB<br />
    11. 11. Solving the Idempotency Problem<br />Debit bank account $100 message with transaction ID<br />Worker role reads message. Checks transaction ID not present.<br />Writes transaction ID with state ‘Started’ to ‘Replay Log’<br />Balance debited $100<br />Worker role is torn before message can be deleted<br />3 minutes later, message re-appears on queue<br />Worker role reads message. Checks transaction ID. It is present in state started.<br />Compensating message written to another queue<br />Message deleted from queue<br />Compensatory message processed.<br />Balance = $1000<br />Balance = $900<br />Web Role<br />Worker Role<br />Worker Role<br />Web Role<br />Storage<br />Worker Role<br />Worker Role<br />Query<br />Query<br />Queue<br />Queue<br />Table<br />LB<br />LB<br />
    12. 12. Latency is zero<br />
    13. 13. It might be infinite for all purposes but it costs…<br />Bandwidth is infinite <br />
    14. 14. Authentication with ACS<br />The Network is Secure<br />Slide by Alik Levin<br />
    15. 15. Service Bus<br />Provides secure messaging and connectivity across different network topologies<br />Enables hybrid applications that span on-premises and the cloud<br />Enables various communication protocols and patterns for developers to engage in reliable messaging<br />Topology doesn’t change<br />
    16. 16. Enabling hybrid applications<br />Datacenter<br />Partner<br />LOB app<br />Mobile Device<br />LOB web service<br />
    17. 17. Enabling hybrid applications<br />Datacenter<br />Partner<br />ACS<br />LOB app<br />SB<br />Mobile Device<br />LOB web service<br />
    18. 18. Enabling hybrid applications<br />Datacenter<br />Partner<br />ACS<br />LOB app<br />SB<br />Mobile Device<br />LOB web service<br />
    19. 19. Enabling hybrid applications<br />Partner<br />Datacenter<br />ACS<br />LOB app<br />SB<br />Mobile Device<br />LOB web service<br />
    20. 20. Enabling hybrid applications<br />Partner<br />Datacenter<br />ACS<br />LOB app<br />SB<br />Mobile Device<br />LOB web service<br />
    21. 21. Electricity <br />Power Grid<br />Demo<br />
    22. 22. Don’t assume specific instances<br />Virtual IP : 1.1.1.2<br />Virtual IP : 1.1.1.3<br />Virtual IP : 1.1.1.4<br />Worker Role<br />Worker Role<br />Web Role<br />Service <br />Service <br />IIS<br />Instance<br />Instance<br />Windows Kernel<br />Windows Kernel<br />Windows Kernel<br />TCP/IP<br />TCP/IP<br />TCP/IP<br />TCP/IP<br />TCP/IP<br />NLB Driver<br />NIC Driver<br />NIC Driver<br />NIC Driver<br />Virtual NIC<br />Virtual NIC<br />Virtual NIC<br />Virtual IP : 1.1.1.1<br />
    23. 23. Inter-role communications<br />
    24. 24. Reduced Headache on the one handNew challenges on the other<br />There is one administrator<br />
    25. 25. Azure MMC Snap-in <br />http://code.msdn.microsoft.com/windowsazuremmc<br />
    26. 26. Cerebrata – Azure Diagnostics Manager<br />http://www.cerebrata.com/Products/AzureDiagnosticsManager/Default.aspx<br />
    27. 27. Distribution cost in serialization, time on the wire, security <br />Transport cost is zero<br />
    28. 28. A lot of calls to fulfill a business function<br />
    29. 29. Bring Data close to computation<br />
    30. 30. It isn’t – but it’s abstractedunless of course you use Azure connect<br />The Network is homogenous <br />Quickly connect on-premise computers with the cloud, no networking configuration required<br />Supports standard IP protocols; secured using end-to-end IPSec<br />Integrated with the Windows Azure Service Model; all role types supported<br />
    31. 31. Deployment view<br />Consider xsmall instances for development<br />Test if you can use less than medium for production <br />
    32. 32. Cost considerations<br />You pay when you’re deployed (there is no “shelving”)<br />Shutdown doesn’t help<br />(keep CPUs running..)<br />
    33. 33. 2 Small instances cost the same as 1 medium instance<br />
    34. 34. 2 instances can give you better availability<br />Need to be on different fault and upgrade domains<br />
    35. 35. I/O performance on smaller instances might be problematic<br />
    36. 36. You can control Azure from scripts and code (even dev fabric)<br />Testing<br />
    37. 37. Demo Cloudoscope Acceptance Tests<br />
    38. 38. Illustrations<br />Slide 11 http://www.sxc.hu/photo/1201443<br />Slide http://www.sxc.hu/photo/1160486<br />

    ×