Hello Farmington! 4:30-5:30, then dinner.

Slides:



Advertisements
Similar presentations
Azure Services Platform Piotr Zierhoffer. Agenda Cloud? What is Azure? Environment Basic glossary Architecture Element description Deployment.
Advertisements

Overview Of Microsoft New Technology ENTER. Processing....
12 → Wed Umbraco User Group Kristofer Liljeblad Windows Azure Kristofer Liljeblad, Microsoft Developer Evangelist
COS302. = Managed for YouStandalone Servers IaaSPaaSSaaS Applications Runtimes Database Operating System Virtualization Server Storage Networking.
Platform as a Service (PaaS)
Cloud Computing Systems Lin Gu Hong Kong University of Science and Technology Sept. 21, 2011 Windows Azure—Overview.
VM Role (PaaS)Virtual Machine (IaaS) StorageNon-Persistent StoragePersistent Storage Easily add additional storage DeploymentBuild VHD offsite and upload.
Cross Platform Mobile Backend with Mobile Services James
A Brief Overview by Aditya Dutt March 18 th ’ Aditya Inc.
Components of Windows Azure - more detail. Windows Azure Components Windows Azure PaaS ApplicationsWindows Azure Service Model Runtimes.NET 3.5/4, ASP.NET,
Introduction To Windows Azure Cloud
Training Workshop Windows Azure Platform. Presentation Outline (hidden slide): Technical Level: 200 Intended Audience: Developers Objectives (what do.
Migrating Business Apps to Windows Azure Marc Müller Principal Consultant, 4tecture GmbH
Windows Azure Virtual Machines Speaker Title Organization.
Getting Started with Windows Azure Name Title Microsoft Corporation.
Larisa kocsis priya ragupathy
Austin code camp 2010 asp.net apps with azure table storage PRESENTED BY CHANDER SHEKHAR DHALL
Jimmy Narang 1. A service in the cloud has to: Be able to handle arbitrary node failures Be available all the time Be able to scale up or down on demand.
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
Azure in a Day Training Azure Queues Module 1: Azure Queues Overview Module 2: Enqueuing a Message – DEMO: Creating Queues – DEMO: Enqueuing a Message.
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.
Partner Practice Enablement - Overview This session will focus on integration strategies for applications deployed using Microsoft Azure Websites and Microsoft.
Operating System for the Cloud Runs applications in the cloud Provides Storage Application Management Windows Azure ideal for applications needing:
Windows Azure Conference 2014 Designing Applications for Scalability.
IOS and Android with Windows Azure Websites Name Title Address Website.
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 Virtual Machines Anton Boyko. A Continuous Offering From Private to Public Cloud.
Windows Azure. Azure Application platform for the public cloud. Windows Azure is an operating system You can: – build a web application that runs.
Zvezdan Pavković. Storage Non-Persistent Storage Persistent Storage Easily add additional storage. Networking Internal and Input Endpoints configured.
Windows Azure Cloud Services Anton Boyko.NET developer.
AMQP, Message Broker Babu Ram Dawadi. overview Why MOM architecture? Messaging broker like RabbitMQ in brief RabbitMQ AMQP – What is it ?
Windows Azure Custom Software Development Mobile Middleware Windows Azure Compute Dipl.-Ing. Damir Dobric Lead Architect daenet
Scalability == Capacity * Density.
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.
Windows Azure poDRw_Xi3Aw.
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.
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.
Building web applications with the Windows Azure Platform Ido Flatow | Senior Architect | Sela | This session.
The best of WF 4.0 and AppFabric Damir Dobric MVP-Connected System Developer Microsoft Connected System Division Advisor Visual Studio Inner Circle member.
 Cloud Computing technology basics Platform Evolution Advantages  Microsoft Windows Azure technology basics Windows Azure – A Lap around the platform.
Amazon Web Services. Amazon Web Services (AWS) - robust, scalable and affordable infrastructure for cloud computing. This session is about:
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.
Platform as a Service (PaaS)
Cloud Architecture Patterns for Mere Mortals
Platform as a Service (PaaS)
Platform as a Service (PaaS)
Building Applications with Windows Azure and SQL Azure
Architecture Patterns for Scalability & Reliability
Introduction of Week 3 Assignment Discussion
2017 Real Questions
New England Code Camp October-2010
02 | Hosting Services in Windows Azure
Windows Azure 講師: 李智樺, Ruddy Lee
20409A 7: Installing and Configuring System Center 2012 R2 Virtual Machine Manager Module 7 Installing and Configuring System Center 2012 R2 Virtual.
Outline Virtualization Cloud Computing Microsoft Azure Platform
Windows Azure Cloud.
Learn. Imagine. Build. .NET Conf
Microsoft Virtual Academy
Saranya Sriram Developer Evangelist | Microsoft
MDC-B203 Deploying Applications in Microsoft System Center Virtual Machine Manager Using Services John Messec Program Manager Microsoft.
Developing for Windows Azure
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
02 – Cloud Services Bret Stateham | Senior Technical Evangelist​
06 | SQL Server and the Cloud
Presentation transcript:

Hello Farmington! 4:30-5:30, then dinner

Bill Wilder Boston Azure User Group @codingoutloud & http://blog.codingoutloud.com Building Cloud Applications with Roles and Queues

Windows Azure Platform Core Services Compute Storage Database

Windows Azure Service Architecture The Internet The Internet via TCP or HTTP LB LB LB Web Role IIS as Host Storage Worker Service Worker Role Queues Tables Blobs Windows Azure Data Center

Compute Instance Size Selectable Size defines CPU Cores, RAM, Local Storage, and Pricing Size configured in the Service Definition prior to packaging Key considerations Don’t just throw big VMs at every problem Scale out architectures have natural parallelism More small instances == more redundancy Some scenarios will benefit from more cores Size CPU Memory Local Storage I/O Performance Cost/Hour Extra Small 1.0 GHz 768 MB 20 GB Low $0.04 Small 1 x 1.6 GHz 1.75 GB 225 GB Moderate $0.12 Medium 2 x 1.6 GHz 3.5 GB 490 GB High $0.24 Large 4 x 1.6 GHz 7 GB 1,000 GB $0.48 Extra Large 8 x 1.6 GHz 14 GB 2,040 GB $0.96

Role Types Worker Role Web Role General purpose host for executing code or an executable Implement code in a Run method Similar to a Windows Service Host your own web server, encoder, etc. Typically used for background processing Designed for web sites/services accessible using HTTP Provides all features of a worker role and IIS 7 or 7.5 Execute ASP.NET, WCF, PHP, etc. Can include multiple web sites in the same role Optionally implement RoleEntryPoint

demo Hello Windows Azure

Packaging & Deployment Service Definition Service Configuration Service Package Compute Your Code

Service, Roles, and Instances A service is a logical set of roles (up to 5) Defined in the Service Definition at development time Assigned a public URL (i.e. foo.cloudapp.net) at deployment Service Role defines the type of Virtual Machine that will be used to run each component of your application Defined in the Service Definition at development time Roles An instance is a dedicated virtual machine instance that is running your code with your configuration Instances are created by the Windows Azure fabric at runtime based on the roles defined in the service definition Instances

Service Definition & Configuration Operating System OS Family: Windows Server 2008 SP2 or Server 2008 R2 OS Version: Specific version or automatically updated Config Settings Name/value settings for a role <Setting name="WorkerSleepTime" value="2000" /> Endpoints Define network endpoints for inbound connectivity into a role <InputEndpointname="HttpIn" protocol="http" port="80" /> Startup Tasks Execute a script or exe to configure a role instance at startup <Task commandLine="InstallPHP.cmd" executionContext="elevated" taskType="simple"/>

Upgrading Your Application VIP Swap Uses Staging and Production environments Allows to quickly swap environments Simply changes which deployment the load balancer uses to service requests In-Place Upgrade Performs a rolling upgrade on live service Entire service or a single role Manual or Automatic across update domains

Windows Azure Storage Abstractions Blobs: Simple named files along with metadata for the file Drives: Durable NTFS volumes for Windows Azure applications to use. Based on Blobs. Tables: Structured storage. A Table is a set of entities; an entity is a set of properties Queues: Reliable storage and delivery of messages for an application

Queues  Messaging

Queue Storage Concepts Account Queue Message customer ID order ID http://… adventureworks order processing customer ID order ID http://…

Loosely Coupled with Queues Enables workflow between roles Enqueue message & forget about it Many workers consume the queue Worker Role Worker Role Worker Role Web Role Worker Role Reliable Queue Input Queue (Work Items) Web Role Worker Role Web Role

Reliable FIFO(ish) Queue with… No practical limit to queue length (100 TB acct limit) 64kb per message (base64-encoded) 500 transactions per second per queue Note “transactions” / second, not “queue messages” / second Need more throughput? Use multiple queues Read messages in batches (<=32) Bundle >1 work item per message

Queue Operations Queue operations Queue Message Operations ListQueues – List queues in account CreateQueue – Creates new queue DeleteQueue – Deletes queue along with any messages Clear – Removes all messages from queue Get/SetMetadata Queue Message Operations AddMessage – Adds message to queue GetMessage[s] – Reads one or more messages and hides them PeekMessage[s] – Reads one or more messages w/o hiding them DeleteMessage – Permanently deletes message from queue UpdateMessage – Clients renew the lease and contents

Queue’s Reliable Delivery Guarantee delivery/processing of messages (two-step consumption) Worker dequeues message and it becomes invisible for a specified “Invisibility Time” Worker deletes message when finished processing If Worker Role crashes, message becomes visible for another Worker to process (after “Invisibility Time”)

Queue-based Architecture Pattern CQRS Command Query Responsibility Segregation Commands change state Queries ask for current state Any operation is one or the other Enables systems where the UI and back-end services are Loosely Coupled

CQRS in Windows Azure Compute resource to run our code WE NEED: Compute resource 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; SQL Azure

CQRS in Action Web Server Compute Service Reliable Queue Reliable Storage AJAX – orthogonal concern Worker Role not related to HTML 5 concept of Web Worker

Familiar Example: Thumbnailer Web Role (IIS) Worker Role Azure Queue Azure Blob UX implications: user does not wait for thumbnail AJAX – orthogonal concern Worker Role not related to HTML 5 concept of Web Worker “Thumbnails” sample code available from http://code.msdn.microsoft.com/windowsazuresamples

Reliable Queue & 2-step Delete var url = “http://myphotoacct.blob.core.windows.net/up/<guid>.png”; queue.AddMessage( new CloudQueueMessage( url ) ); (IIS) Web Role Worker Role Queue var invisibilityWindow = TimeSpan.FromSeconds( 10 ); CloudQueueMessage msg = queue.GetMessage( invisibilityWindow ); AJAX – orthogonal concern Worker Role not related to HTML 5 concept of Web Worker queue.DeleteMessage( msg );

CQRS requires Idempotent Perform idempotent operation more than once, end result same as if we did it once Example with Thumbnailing (easy case) App-specific concerns dictate approaches Compensating transactions Last in wins Many others possible – hard to say

CQRS expects Poison Messages A Poison Message cannot be processed Error condition for non-transient reason Detect via CloudQueueMessage.DequeueCount property Be proactive Falling off the queue may kill your system Message TTL = 7 days by default in Azure Determine a Max Retry policy May differ by queue object type or other criteria Then what? Delete, move to “bad” queue, alert human, …

CQRS enables Responsive Response to interactive users is as fast as a work request can be persisted Time consuming work done asynchronously Comparable total resource consumption, arguably better subjective UX UX challenge – how to express Async to users? Communicate Progress Display Final results

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

CQRS enables Distribution Scale out systems better suited than monolithic for geographic distribution More granular  flexible Reduce latency via geographic distribution Failure need not be binary Chainsaw: http://commons.wikimedia.org/wiki/File:Chainsaw_cutting_tree.jpg

MTBF… vs. MTTR… Boots from posterous.wilderclan.com Sneakers: http://www.flickr.com/photos/pinksherbet/3504943955/

CQRS requires “Plan for Failure” There will be VM (or Azure role) restarts Hardware failure, O/S patching, crash (bug) Fabric Controller honors Fault Domains Bake in handling of restarts into our apps Restarts are routine: system “just keeps working” Idempotent support important again Not an exception case! Expect it!

What’s Up? Reliability as EMERGENT PROPERTY Typical Site Any 1 Role Inst Overall System Operating System Upgrade Application Code Update Scale Up, Down, or In Hardware Failure Software Failure (Bug) Security Patch Tech Windows

What about the DATA? Azure Web Roles and Azure Worker Roles Taking user input, dispatching work, doing work Follow a decoupled queue-in-the-middle pattern Stateless compute nodes “Hard Part” – persistent data, scalable data Azure Queue, Blob, Table, SQL Azure 3x copies of each byte Blobs and Tables geo-replicated Retry and Throttle!

Thank You! QUESTIONS?