Windows Azure: Lessons From the Field
Upcoming SlideShare
Loading in...5
×
 

Windows Azure: Lessons From the Field

on

  • 3,228 views

The demos and presentations that show you how awesome a certain technology is are certainly exciting. But, let’s be real – there are often times when the demo “happy path” doesn’t work for ...

The demos and presentations that show you how awesome a certain technology is are certainly exciting. But, let’s be real – there are often times when the demo “happy path” doesn’t work for real-world projects. Creating production ready Windows Azure applications often require deviating from the “next, next, publish, magic, let’s party” path often seen. In this session we will pull back the curtains on common Windows Azure scenarios such as debugging and diagnostics, environment setup, build and deployment process, Access Control Services (ACS), and role upgrades – just to name a few. Coming away from this session you’ll have gained valuable, real-world inspired knowledge you can apply to your Windows Azure applications right now!

Statistics

Views

Total Views
3,228
Views on SlideShare
1,273
Embed Views
1,955

Actions

Likes
0
Downloads
2
Comments
0

39 Embeds 1,955

http://michaelcollier.wordpress.com 1354
http://oakleafblog.blogspot.com 293
http://oakleafblog.blogspot.in 44
http://oakleafblog.blogspot.co.uk 33
http://subscribe.ru 29
http://oakleafblog.blogspot.kr 19
http://oakleafblog.blogspot.de 16
http://oakleafblog.blogspot.jp 14
http://oakleafblog.blogspot.se 13
http://oakleafblog.blogspot.com.au 12
http://oakleafblog.blogspot.ca 11
http://oakleafblog.blogspot.be 9
http://www.paraleap.com 9
http://oakleafblog.blogspot.ru 8
http://oakleafblog.blogspot.nl 7
http://oakleafblog.blogspot.ro 7
http://oakleafblog.blogspot.com.es 6
http://oakleafblog.blogspot.fi 6
http://oakleafblog.blogspot.co.il 5
http://oakleafblog.blogspot.fr 5
http://oakleafblog.blogspot.com.br 5
http://oakleafblog.blogspot.it 5
http://webcache.googleusercontent.com 4
http://oakleafblog.blogspot.hu 4
http://oakleafblog.blogspot.pt 4
http://oakleafblog.blogspot.sk 4
http://core.traackr.com 4
http://oakleafblog.blogspot.sg 4
http://oakleafblog.blogspot.co.nz 4
http://oakleafblog.blogspot.no 4
http://oakleafblog.blogspot.tw 3
http://www.oakleafblog.blogspot.co.uk 2
http://oakleafblog.blogspot.mx 2
http://oakleafblog.blogspot.ch 1
http://oakleafblog.blogspot.hk 1
http://cc.bingj.com 1
http://oakleafblog.blogspot.com.ar 1
http://oakleafblog.blogspot.co.at 1
http://oakleafblog.blogspot.dk 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Windows Azure National ArchitectWindows Azure MVPHelp customers nationwide with their Windows Azure projects. This can include architectural design sessions, training, development, evangelism, etc.Reach me via email, Twitter, or my blog.
  • Cover several areas of Windows Azure.Not going to go deep on any of these areas – assuming you have some working knowledge of Windows Azure.Question – ask. Leave time at end for Q & A too.Purpose – show you some things in Windows Azure that aren’t always like the happy path demo.This isn’t to say that Windows Azure is difficult – its not. Often there are a few extra things you need to do.
  • Range based system – using the Partition Key to help define the ranges.Can use unique Partition Key.Try to avoid prepend or append patterns w/ the Partition Key – one area always more active. Not an even distribution.Distribute load/keys evenly.
  • Example – one table that contains two different entities (Courses and Comments)RowKey – multiple values using a separatorRecord Type to distinguish Course vs. CommentCourseId to have a unique value for the courseComment entityReverse timestamp to take advantage of lexical sort order (default) of the table – most recent firstUnique CommentId value
  • CompareTo - Compares this instance with a specified object or String and returns an integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified object or String
  • Request validation for all requests in ASP.NET 4.; Security feature – cross-site scripting attacks
  • WIF relies on settings in the web.config – which we typically can’t change easily w/ Azure apps
  • Show ACSClaimsAuthenticationManagerLogon w/ RegistrationLogoutWIF setting update in WebRolehttp://www.istockphoto.com/stock-photo-19150373-thumbs-up.php?refnum=5882518&source=sxchu04&muuid=sxc651f81d74d3fe87ac55b5d6d01045
  • Diagnosticconfig code persisted to a file in blob storageAbility to remotely configure diagnostics – API for updating the config file in blob storageRole instance recycles – changes the config file back to what the code states, not what you’ve previously updated
  • Sometimes easiest way to diagnose a problem – RDP into the server instance.
  • Retry Policy – how often to retryRetry Strategy – what triggers a retry action
  • http://stackoverflow.com/questions/9207603/windows-azure-acs-unable-to-find-assembly-microsoft-identitymodelhttp://msdn.microsoft.com/en-us/library/windowsazure/hh411551
  • Windows Azure National ArchitectWindows Azure MVPHelp customers nationwide with their Windows Azure projects. This can include architectural design sessions, training, development, evangelism, etc.Reach me via email, Twitter, or my blog.

Windows Azure: Lessons From the Field Windows Azure: Lessons From the Field Presentation Transcript

  • Lessons from the Field
  • National Architect,Windows Azuremichael.collier@neudesic.com@MichaelCollierwww.MichaelSCollier.com
  • • Table Storage• Access Control Service (ACS)• Windows Azure Diagnostics• Retry Logic• Deployment• Environments• Tools• Sell it!
  • • Non-relational data storage• Massive scale (100TB per storage account)• Single Key (Partition Key + Row Key)• Range based partitioning• Requires a different way of thinking – Multiple entity types in a single table – Group data into logical units – a partition – More than 1 key data point? Create your own composite key.
  • Partition RowKey CourseName Comment CommentKey Record Type Count43040 0:dafce7ed-47ff-474a-a94c- Darby Creek 1 8b7d555394c1 CourseId43040 1:dafce7ed-47ff-474a-a94c- Fast 8b7d555394c1:252057602167737 Timestamp greens! 1563:b3abfc42-4e66-4306-b39b- c3972fde5ac743012 …. CommentId Timberview 543016 …. Buck Ridge 343016 ….. Great sand!!
  • Select all the Course entitiespublic IEnumerable<Course> SelectAllCourses(){var tableClient = storageAccount.CreateCloudTableClient();var ctx = tableClient.GetDataServiceContext();var results = (from c in ctx.CreateQuery<Course>(tableName) where c.RowKey.CompareTo("0:") >= 0 && c.RowKey.CompareTo("0;") < 0 select c).AsTableServiceQuery().ToList();return results;}
  • Plan for retriespublic void Add (Course course, Comment comment){ var tableClient = storageAccount.CreateCloudTableClient(); var ctx = tableClient.GetDataServiceContext(); ctx.AddObject(tableName, course); ctx.AddObject(tableName, comment); ctx.SaveChangesWithRetries(SaveChangesOptions.Batch);}Handle entity group transactions too!
  • • Claims-based authentication service• Leverages Windows Identity Foundation (WIF)• No need to build your own identity management solution. What’s your value-add?• Multiple identity providers – Facebook, Windows Live, Google, Yahoo!, ADFSv2• Most demos and walkthroughs show how easy ACS is to add . . . But there’s more.
  • • Install WIF runtime via a startup task• DPAPI not supported – use your own certificate• Change request validation – Use ASP.NET 2 request validation – Custom validator
  • • WIF relies on the web.config file• URLs related to the site are set in the web.config . . . can’t change• Problematic for staging deployments – don’t know the URL until deployed• Add logic to WebRole’s OnStart() to update the WIF settings in web.config – Read in configuration settings from .cscfg – Update and save the web.config – Changing .cscfg settings can cause a role recycle . . . causing web.confg to update
  • • Need claims not provided by Identity Provider? – Claims vary by Identity Providers – Windows Live ID – limited usefulness  – Claims Enrichment – Custom implementation of ClaimsAuthenticationManager – Retrieve additional info from data store – Return as additional claims
  • DEMO TIME!!!
  • • Ability to persist multiple diagnostic sources across roles – Log Files – Event Logs – Performance Counters – IIS Logs• Diagnostics data saved in table or blob storage• Different storage account for diagnostic & app data• Use multiple diagnostic storage accounts & rotate – Easiest way to clean up large amounts of data in tables
  • Configuration via code is easy . . .. . . but potentially problematic
  • • Set diagnostic information via configuration• Special file – diagnostics.wadcfg• File automatically saved to blob storage and accessible from all instances• Don’t get out of sync• Diagnostics config in code overwrites what is in blob storage• Allows operations team, not dev, to control settings
  • • Configure Remote Desktop early• Requires an input endpoint• Changing number of endpoints requires a delete and redeploy – Can’t perform a VIP swap• Don’t want it on all the time? Change the settings in .cscfg.
  • • Transient Fault Handling Application Block• SQL Database, Windows Azure Storage, Service Bus, and more• Very extensible and flexible
  • • Upload .cspkg & .cscfg files to Windows Azure portal• Use Visual Studio• Use Windows Azure PowerShell cmdlets – Humans make mistakes . . . Not good at repetitive tasks – Handle nearly everything via script – Works great in development and for production! – Invoke from other deployment tools like Team Build – Have a .cmd file that will execute the build and then kick off the deployment• Put deployment files in blob storage for quick access later
  • • Use subscriptions to control access and billing.• Get billing and subscription administrators set up . . . . Very difficult to change later (especially the Live ID for account owner) Development QA Production CS CS CS CS CS DB DB Staging Staging Staging CS CS CS CS CS DB DB DB Production Production Production• Developers create & deploy services in ‘Development’ as needed. Co-admins for the ‘Development’ subscription.• QA teams have access to QA. They are co-admins for the QA subscription.• Operations team is co-admins for ‘Production’.
  • Neudesic Azure Storage Explorer Cerebrata Cloud Storage Studio Diagnostics Manager Management Cmdletshttp://azurestorageexplorer.codeplex.com/
  • • What are your pain points? – Cost pressures – Slow to deploy – Scalability – Security• Scenarios – Web Modernization – Gaming – Mobility – Big Data – Enterprise Application Integration
  • Questions?
  • • WIF: A Potentially Dangerous Request.Form Value Was Detected – http://social.technet.microsoft.com/wiki/contents/articles/1725.windows-identity-foundation-wif-a-potentially- dangerous-request-form-value-was-detected-from-the-client-wresult-t-requestsecurityto.aspx• Install WIF Runtime via Startup Task – http://stackoverflow.com/questions/8697596/azure-service-configuration-error• Edit & Apply New WIF Config Settings w/o Redeploying – http://blogs.msdn.com/b/vbertocci/archive/2011/05/31/edit-and-apply-new-wif-s-config-settings-in-your- windows-azure-webrole-without-redeploying.aspx• Publishing a ACS v2 Federated Identity Web Role – http://blogs.msdn.com/b/davidmcg/archive/2011/04/05/publishing-a-acs-v2-federated-identity-web-role.aspx• Windows Azure Active Directory Solutions For Developers – http://social.technet.microsoft.com/wiki/contents/articles/3669.windows-azure-active-directory-solutions-for- developers.aspx• How to get most out of Windows Azure Tables – http://blogs.msdn.com/b/windowsazurestorage/archive/2010/11/06/how-to-get-most-out-of-windows-azure- tables.aspx• Collecting Logging Data by Using Windows Azure Diagnostics – http://msdn.microsoft.com/en-us/library/windowsazure/gg433048.aspx
  • National Architect,Windows Azuremichael.collier@neudesic.com@MichaelCollierwww.MichaelSCollier.com