New England Code Camp October-2010

Slides:



Advertisements
Similar presentations
System Center 2012 R2 Overview
Advertisements

What’s New in Windows Azure A platform overview + how it can fit into my development shop today… New England Microsoft Dev Group 06-June-2013 (6:30-8:30.
Page 1 Ricardo Villalobos Windows Azure Architect Evangelist Microsoft Corporation Designing, Building, and Deploying Windows Azure applications.
Azure Services Platform Piotr Zierhoffer. Agenda Cloud? What is Azure? Environment Basic glossary Architecture Element description Deployment.
Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the.
Queue can be created by either Web Role or Worker Role – “guard” code in both – don’t know start order – Queue will go away when empty???
Platform as a Service (PaaS)
Cloud Computing Systems Lin Gu Hong Kong University of Science and Technology Sept. 21, 2011 Windows Azure—Overview.
Cross Platform Mobile Backend with Mobile Services James
A Brief Overview by Aditya Dutt March 18 th ’ Aditya Inc.
Eric Nelson Developer Evangelist Microsoft UK | Lap around.
Robert MacLean BBD Software Get Ready For The Cloud TRACK: Cloud & ALM.
Components of Windows Azure - more detail. Windows Azure Components Windows Azure PaaS ApplicationsWindows Azure Service Model Runtimes.NET 3.5/4, ASP.NET,
Training Workshop Windows Azure Platform. Presentation Outline (hidden slide): Technical Level: 200 Intended Audience: Developers Objectives (what do.
Getting Started with Windows Azure Name Title Microsoft Corporation.
Austin code camp 2010 asp.net apps with azure table storage PRESENTED BY CHANDER SHEKHAR DHALL
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
Your First Azure Application Michael Stiefel Reliable Software, Inc.
Mostafa Abdollahi Mazandaran University Of Science And Technology January 2011.
Windows Azure Conference 2014 Deploy your Java workloads on Windows Azure.
AZR308. Building distributed systems on an abstraction against commodity hardware at Internet scale, composed of multiple services. Distributed System.
Bill Wilder – brief bio Bill Wilder has been a professional software developer for more than 20 years. Last year he founded the Boston Azure User Group,
Cloud-Native in Azure Zoran B. Djordjevic’s CSCI E-175 Cloud Computing and Software as a Service class at Harvard University 19-November-2010 Copyright.
Windows Azure. Azure Application platform for the public cloud. Windows Azure is an operating system You can: – build a web application that runs.
Azure in a Day Training: Windows Azure Module 1: Windows Azure Overview Module 2: Development Environment / Portal – DEMO: Signing up for Windows Azure.
Cloud Architecture Patterns for Mere Mortals New England Code Camp #16 29-October-2011 Copyright (c) 2011, Bill Wilder – Use allowed under Creative Commons.
Microsoft Cloud Computing. Topics to be covered 1.Environmental Features of windows azure 2.What is Cloud Computing 3.Roles in Cloud Computing 4.Benefits.
Technology Drill Down: Windows Azure Platform Eric Nelson | ISV Application Architect | Microsoft UK |
Building Cloud Solutions Presenter Name Position or role Microsoft Azure.
(re)-Architecting cloud applications on the windows Azure platform CLAEYS Kurt Technology Solution Professional Microsoft EMEA.
 Cloud Computing technology basics Platform Evolution Advantages  Microsoft Windows Azure technology basics Windows Azure – A Lap around the platform.
Cloud-Native Architecture Patterns (Or… why your pre-cloud architecture won’t work so well in the cloud) Azure Florida Association 28-March-2012 Boston.
Data storage services in the cloud Matt Milner Pluralsight.
Platform as a Service (PaaS)
Connected Infrastructure
Accounting for Azure in Your Data Architecture
Cloud Architecture Patterns for Mere Mortals
Deploying Web Application
Platform as a Service (PaaS)
Business Continuity & Disaster Recovery
Platform as a Service (PaaS)
Design considerations for storing data in the Cloud
Beyond SQL Azure What’s Up with Storing Data in the Cloud?
Cloud Data platform (Cloud Application Development & Deployment)
Platform as a Service.
Connected Infrastructure
Utilization of Azure CDN for the large file distribution
Exploring Azure Event Grid
Architecture Patterns for Scalability & Reliability
Hello Farmington! 4:30-5:30, then dinner.
Business Continuity & Disaster Recovery
IaaS Part II Stefan Geiger Gerry
Windows Azure 講師: 李智樺, Ruddy Lee
File Manager for Microsoft Office 365, SharePoint, and OneDrive: Extensible Via Custom Connectors in Enterprise Deployments, Ideal for End Users OFFICE.
Outline Virtualization Cloud Computing Microsoft Azure Platform
Building a Database on S3
Demystifying the Cloud
microsoft cloud platform: enterprise-class architecture
Design pattern for cloud Application
Cloud computing mechanisms
Demystifying the Cloud
Saranya Sriram Developer Evangelist | Microsoft
Developing Advanced Applications with Windows Azure
MS AZURE By Sauras Pandey.
Building Scalable and Reliable Applications with Windows Azure
5 Azure Services Every .NET Developer Needs to Know
Building global and highly-available services using Windows Azure
Day 2, Session 2 Connecting System Center to the Public Cloud
Microsoft Virtual Academy
06 | SQL Server and the Cloud
Presentation transcript:

New England Code Camp 14 02-October-2010 Going Native Building Cloud-Native Applications on Microsoft’s Windows Azure Stack New England Code Camp 14 02-October-2010 Not representing my day job Several slides stolen borrowed (with permission) from http://www.meetup.com/Boston-cloud-services/files/ (http://files.meetup.com/1460349/azure.ppt – Jim O’Neil’s Windows Azure presentation from March 17, 2010 meetup) + from Chris Bowen’s “roadshow” talk (March 2010) Boston Azure User Group http://bostonazure.org @bostonazure Bill Wilder http://blog.codingoutloud.com @codingoutloud Boston West Toastmasters http://bwtoastmasters.com Not here with my day job Only Bill’s personal views Copyright (c) 2010, Bill Wilder

Agenda Lightning-quick overview of Azure Two Major Shifts in Cloud-Native Apps: Using Scalable and Cost-effective Storage Using Roles and Queues for Scalability and Resilienceyness Scalable and Resilient

Cloud-Native Applications Effort focuses on business functionality Development is highly productive Time-to-market is short Modification is straight-forward Infrastructure is not a limiting factor Cost structure is a good fit Downtime is not necessary Scale is efficient Innovation / experimentation is enabled

[Azure] Cloud Platform The rise of focused, specialized services Really good at one thing True of other Cloud Platforms “Scalable” Persistent Storage abstractions Set of Services Illusion of infinite scale out Same performance with x clients as with 10x as with 100x as with 1000x as with … Billing model: pay only for what you use Friction-free access to add’l or less storage

Part A A

Part A – Executive Summary Use Azure Blobs and Tables and your DATA will be resilient to failure and will scale like crazy…

Persistent Storage Services – Options Type of Data Traditional Azure Way Relational SQL Server SQL Azure Blob File System, or SQL Server Azure Blobs File File System Azure Drives, or Azure Blobs Reliable Queue MSMQ (maybe) Azure Queues Non-Relational Azure Tables

Azure Storage Services Family of specialized, complementary storage services Abstractions High level services Blobs + Queues + Tables [+ Drives + CDN]

All Azure Storage is Replicated Resilient in case of failure “All data replicated multiple times” – Sriram Krishnan, Programming Windows Azure, p130+ Supports scale-out Replicate specific data if it gets too hot to keep up

Azure Blob Storage The place to put ANY LARGE OBJECT Private or Public Public blobs can be anonymously accessed Images, videos, CSS files Need not be binary Public blobs can be cached in Azure CDN 20 locations around the world Different locations than data centers Time-limited signed-access available “You have until tomorrow to download this video” http://msdn.microsoft.com/en-us/library/ff919703.aspx – Windows Azure CDN http://blogs.msdn.com/b/windowsazure/archive/2010/08/09/20-nodes-available-globally-for-the-windows-azure-cdn.aspx – 20 CDN nodes available across the world

Azure Blob Storage Two types of Azure Blobs “Block Blob” “Page Blob” Parallel upload scenarios Resume download scenarios Up to 200 GB “Page Blob” Random access scenarios Azure Drives Up to 1000 GB http://msdn.microsoft.com/en-us/library/ff919703.aspx – Windows Azure CDN http://blogs.msdn.com/b/windowsazure/archive/2010/08/09/20-nodes-available-globally-for-the-windows-azure-cdn.aspx – 20 CDN nodes available across the world

Azure Table Storage Best place for granular, semi-structured data No rigid database schema Fast and easy to instantiate Strongly Consistent No performance lag Programming model is WCF Data Services All data access and data updates LINQ

Azure Table Storage Storage Account Table [*] Entity [*, 1 MB data] PartitionKey + RowKey Property [255x] Name/Value/Type Up to 64k Entity is like a Row

Azure Table Storage Partition Key Row Key Along a “logical grouping” – a “shard” PartitionKey value of up to 64 KB Row Key Identify specific row within a partition RowKey value is String of up to 64 KB Table access requires Partition Key + Row Key Not to mention (cryptographic) Access Key (for the digital signing of the http header)

Relational Data vs. Azure Tables Approach SQL Azure Azure Tables Normalization Normalized Denormalized (Duplication) (No duplication) (Lots of duplication) Structure Schema Flexible Transactions Distributed Limited scope Responsibility Database Developer Knobs Many Few Scale Up (or Sharding) Out Cost Reasonable Less expensive http://en.wikipedia.org/wiki/NoSQL

http://www.freefoto.com/preview/04-28-6?ffid=04-28-6&k=Pile+of+Money

Pay As You Go – Storage Storage Applies equally to: $0.15 per GB stored per month $0.01 per 10,000 storage transactions Applies equally to: Queues Tables Blobs Drives http://www.microsoft.com/windowsazure/pricing/

Pay As You Go – Data Transfer North America and Europe regions $0.10 per GB in $0.15 per GB out Asia Pacific Region $0.30 per GB in $0.45 per GB out No charge for transfer within a data center http://www.microsoft.com/windowsazure/pricing/

What is Cost of 1 Byte? Azure Storage cost/byte = x SQL Azure cost/byte = 66x

Part B B

Part B – Executive Summary Scale out, not up, and your COMPUTE will be resilient to failure and will scale like crazy…

Azure Does Compute Compute Services Web Roles Worker Roles VM Role (Nov 2010) Your Code Runs Here Image: http://t3.gstatic.com/images?q=tbn:lBdXOeap8CbUoM:http://regulus2.azstarnet.com/blogs/images/7064.jpg&t=1

Web Roles vs. Worker Roles Runs in IIS 7 (always listening) Built using ASP.NET, MVC Good to handle interactive users Addressable over Internet Good for hosting Web API (WCF) Runs Continuously Smarx “The only difference between a web role and a worker role is that in the web role, IIS (actually Hosted Web Core) gets started and pointed at your app data directory. You can still put code in WebRole.cs that does exactly the same thing as you would do in your worker role, so the decision should really be "Do you want IIS?" If so, use a web role. If not, use a worker role.” One is always running, one is always listening

“Out” is the New “Up” Scaling Out has hard limits at CPU, Memory Architecturally more limiting

Azure Storage Services in Concert http://commons.wikimedia.org/wiki/File:Boston_Pops_Esplanade_Orchestra_2005-07-04.jpg

Key Pattern: Roles + Queues Web Role (IIS) Worker Role Queues AJAX – orthogonal concern Worker Role not related to HTML 5 concept of Web Worker Blobs Tables

Canonical Example: Thumbnails Web Role (IIS) Worker Role Queues AJAX – orthogonal concern Worker Role not related to HTML 5 concept of Web Worker Blobs Tables

Adding to Queue - Conceptual Queue Name: “thumbnailer-7” http://bostonazure.queue.core.windows.net/thumbnailer-7

Adding to Queue - Actual 314159 265358 979323 Azure Blob Storage 3.14159 265358 979323 846264 338327 950288 419716 939937 510582 097494 459230 314159 265358 979323

Roles + Queues: API queue.AddMessage( new CloudQueueMessage( statusUpdateMessage)); Web Role (IIS) Worker Role Queues AJAX – orthogonal concern Worker Role not related to HTML 5 concept of Web Worker CloudQueueMessage statusUpdateMessage = queue.GetMessage( TimeSpan.FromSeconds(10)); … queue.DeleteMessage(statusUpdateMessage);

General Case: Rolesn + Queuesn RnQnRn Worker Role Worker Role Web Role (IIS) Worker Role Web Role (IIS) Worker Role Type 1 Web Role (IIS) Web Role (IIS) Worker Role Worker Role Queues Worker Role AJAX – orthogonal concern Worker Role not related to HTML 5 concept of Web Worker Worker Role Type 2

Azure Queue Storage Service for RELIABLE message delivery 7 days = default TTL for item to stay in queue 30 seconds = default “invisibility window” 8 KB = max size of a queued item 500 = approx number of transactions a queue can handle per second Beware of “spinning” – may get throttled, disabled N = number of queues you can have (N >> 1)

Key Metric Queue length (and trend) is key data point for tuning Role deployment numbers Available programmatically for monitoring May vary across queue types

RnQnRn enables Responsive Response to interactive users is as fast as a work request can be persisted Time consuming work done off-line Same total resource consumption, better subjective experience UX challenge – how to express Async to users? Communicate Progress Display Final results

RnQnRn enables Scalable Loosely coupled, concern-independent scaling Blocking is Bane of Scalability Decoupled front/back ends insulate from other system issues if… Twitter down Email server unreachable Order processing partner doing maintenance Internet connectivity interruption

RnQnRn enables Distribution Scale out systems better suited for geographic distribution More efficient and flexible because more granular Hard for a mega-machine to be in more than one place Failure need not be binary Chainsaw: http://commons.wikimedia.org/wiki/File:Chainsaw_cutting_tree.jpg

Optimization is optional Individual role utilization may be low Role is a VM – lots of resources You pay by instance, not resource use within Make sure VM instances are “right sized” Small, Medium, Large, XL Make sure enough roles for uptime SLA requires minimum of 2 instances Business Trade-Off for further optimizations Optimize for CPU utilization (multiple threads) Combine types of processing into fewer role types

RnQnRn requires Idempotent If we do a task twice, end result same as if we did it once App-specific concerns dictate approaches Compensating transactions Last in wins Many others possible – hard to say Example with Thumnailing

RnQnRn requires Poison Message Strategy A Poison Message cannot be processed Error condition Non-transient reason Strategy One: Fall off the queue (TTL) Message stays in queue for 7 days (default) Strategy Two: Specify retry threshold Remove poison messages

RnQnRn enables Resilient And Requires that you “Plan for failure” There will be role restarts Bake in handling of restarts Not an exception case! Expect it! Restarts are routine, system “just keeps working” If you follow the pattern, the payoff is substantial…

What’s Up? Aspirin-free Reliability as EMERGENT PROPERTY Typical Site Any Azure Role Overall System Operating System Upgrade Application Update / Deploy Change Topology Hardware Failure Software Bug / Crash / Failure Security Patch Tech Windows

Questions? ?

BostonAzure.org Boston Azure cloud user group Focused on Microsoft’s cloud solution Next meeting: 6-8:30 PM Thurs Oct 21st 2010 Hacking on “Boston Azure Project” Silverlight and Azure – better together Meetings usually 4th Thursday of month No cost; food; great topics; growing community; wifi Join email list: http://bostonazure.org Follow on Twitter: @bostonazure

Slides available from Bill’s blog http://blog.codingoutloud.com hmbl.me is URL shortener running on Azure: http://hmbl.me/3KTBOE http://blog.codingoutloud.com/2010/07/14/key-architectural-design-pattern-for-cloud-native-azure-apps

Bill Wilder @codingoutloud http://blog.codingoutloud.com