Page 1 Queue Storage Jeff Chu | 2010-6-24. Page 2 Agenda Queue Storage Overview Programming Queue Storage Queue Storage tips Lab Time.

Slides:



Advertisements
Similar presentations
Windows Azure Storage Deep Dive
Advertisements

Building a Database on S3 Matthias Brantner, Daniela Florescu, David Graf, Donald Kossmann, Tim Kraska Xiang Zhang
Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
Mark Dixon Page 1 23 – Object Oriented Programming in PhP.
Building loosely-coupled Apps with Windows Azure Service Bus Topics and Queues Name Title Microsoft Corporation.
Azure Services Platform Piotr Zierhoffer. Agenda Cloud? What is Azure? Environment Basic glossary Architecture Element description Deployment.
CS 106 Introduction to Computer Science I 12 / 11 / 2006 Instructor: Michael Eckmann.
CSE 373 Data Structures and Algorithms Lecture 2: Queues.
WINDOWS AZURE STORAGE 11 de Mayo, 2011 Gisela Torres – Windows Azure MVP Aventia-Renacimiento Twitter:
Inside Windows Azure Storage Name Title Microsoft Corporation.
Data Parallel Application Development and Performance with Windows Azure Advisor : Professor Gagan Agrawal Present by : Yu Zhang.
Training Workshop Windows Azure Platform. Presentation Outline (hidden slide): Technical Level: 300 Intended Audience: Developers Objectives (what do.
Windows Azure featureISO 27001SSAE 16 SOC 1 Type 2 EU Model Clauses HIPAA BAA Web Sites Virtual Machines Cloud Services Storage (Tables,
Customers Live on Windows Azure Platform
MSDN Event. WINDOWS AZURE STORAGE Windows Azure Storage Storage in the Cloud –Scalable, durable, and available –Anywhere at anytime access –Only pay.
Larisa kocsis priya ragupathy
Austin code camp 2010 asp.net apps with azure table storage PRESENTED BY CHANDER SHEKHAR DHALL
Windows Azure Storage – Essential Cloud Storage Services Denver Cloud Computing User Group
Bring your own machines, connectivity, software, etc. Complete control Complete responsibility Static capabilities Upfront capital costs for the infrastructure.
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.
Azure in a Day Training Azure Queues Module 1: Azure Queues Overview Module 2: Enqueuing a Message – DEMO: Creating Queues – DEMO: Enqueuing a Message.
Mostafa Abdollahi Mazandaran University Of Science And Technology January 2011.
Windows Azure Storage Name Title Microsoft Corporation.
Web Role Worker Role Storage Queue LBLB LBLB LBLB LBLB Worker Role Web Role Worker Role Blob Container Table 1.User uploads large image file 2.Image.
Windows Azure Storage Cloud Computing Soup to Nuts Mike Benkovich Microsoft Corporation btlod-72.
TabiCan: Massive Multi- Agent System Reference: Architecture and Performance Evaluation of a Massive Multi-Agent System, G. Yamamoto and Y. Nakamura, Autonomous.
T.N.C.Venkata Rangan CEO, Vishwak Solutions Your Data on Cloud.
Pradeep S Pushpendra Singh Consultants, Neudesic Technologies, Hyderabad, India.
CSC 205 Programming II Lecture 22 Carwash Simulation.
Building Applications with Windows Azure Storage Brad Calder Director/Architect Microsoft Corporation.
Creating PHPs to Insert, Update, and Delete Data CS 320.
Peng Lu. CPU Scheduling 1. Basic Concepts 2. Scheduling Criteria 3. Scheduling Algorithms 4. Multiple-Processor Scheduling 5. Real-Time Scheduling 2.
Virtual techdays INDIA │ august 2010 Building & Migrating Web applications using Windows Azure storage Ramaprasanna Chellamuthu │ Developer Evangelist;
Now Jan Feb 1 Business Analytics Reporting Data Sync.
 Brad Calder Director/Architect Microsoft Corporation ES04.
North America Europe Asia Pacific Data centers.
CSE 373: Data Structures and Algorithms Lecture 2: Queues.
Windows Azure Fundamentals Services Storage. Table of contents Overview Cloud service basics Managing cloud services Cloud storage basics Table storage.
SharePoint Online Migration API and Improvements
Module 6: Administering Reporting Services. Overview Server Administration Performance and Reliability Monitoring Database Administration Security Administration.
(re)-Architecting cloud applications on the windows Azure platform CLAEYS Kurt Technology Solution Professional Microsoft EMEA.
AZURE: THE GOOD PARTS WEBAPPS Presented By RICHARD TASKER blog: richardtasker.co.uk.
Building web applications with the Windows Azure Platform Ido Flatow | Senior Architect | Sela | This session.
Windows Azure Custom Software Development Mobile Middleware Windows Azure Storage Dipl.-Ing. Damir Dobric Lead Architect daenet
5 Worker Role Your Code public class WorkerRole : RoleEntryPoint { public override void Run() { while (true) { Thread.Sleep(1000); //Do something.
Windows Azure Custom Software Development Mobile Middleware Windows Azure Storage Dipl.-Ing. Damir Dobric Lead Architect daenet
BlobContainerAccount sally pictures IMG001.JPG IMG002.JPG movies MOV1.AVI.
Nivo 300 Windows Azure Storage Bojan Vrhovnik Microsoft
The story of an IoT solution
Objectives In this lesson, you will learn to: Define stacks
Windows Azure Storage Basics
Microsoft Dynamics.
Welcome! In this module- Learn where the bathroom is.
Bomgar Remote support software
Hello Farmington! 4:30-5:30, then dinner.
Office 365 Development.
Data Structures and Database Applications Queues in C#
Principles of Computing – UFCFA3-30-1
Windows Azure Storage Queue Storage.
Bob Tabor | Microsoft Azure Fundamentals: Data Understanding Microsoft Azure Storage Queues Bob Tabor |
Windows Azure Cloud.
Code Walkthrough of a Cloud Application Running on the Windows Azure Platform
Power-up NoSQL with Azure Cosmos DB
Introduction to Building Applications with Windows Azure
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Building Scalable and Reliable Applications with Windows Azure
Sayed Ibrahim Hashimi Program Manager Microsoft Corporation
Tech Ed North America /12/2019 6:45 AM Required Slide
INFO 344 Web Tools And Development
INFO 344 Web Tools And Development
Presentation transcript:

Page 1 Queue Storage Jeff Chu |

Page 2 Agenda Queue Storage Overview Programming Queue Storage Queue Storage tips Lab Time

Page 3 Queue Storage Overview MessageQueueAccount order processing customer ID order ID cohowinery

Page 4 Queue Storage Overview Data Structure… –FIFO (First-in, First-out) –FCFS (First-come, First-serve) Unlimited message stores –Message size limits: 8KB –Base on byte count, not text length. Inter-role communication –Web to Worker communication –Worker to Web communication

Page 5 Queue Storage Overview Azure Queue Input Queue (Work Items)

Page 6 QUEUE’S RELIABLE DELIVERY Guarantee delivery/processing of messages (two-step consumption) 1.Worker Dequeues message and it is marked as Invisible for a specified “Invisibility Time” 2.Worker Deletes message when finished processing it If Worker role crashes, message becomes visible after the invisibility time for another Worker to process Azure Queue Input Queue (Work Items)

Page C1C1 C1C1 C2C2 C2C2 Removing Poison Messages Producers Consumers P2P2 P2P2 P1P1 P1P GetMessage(Q, 30 s)  msg 2 1. GetMessage(Q, 30 s)  msg

Page 8 C1C1 C 1 C2C2 C2C2 Removing Poison Messages Producers Consumers P2P2 P2P2 P1P1 P1P GetMessage(Q, 30 s)  msg 2 3. C2 consumed msg 2 4. DeleteMessage(Q, msg 2) 7. GetMessage(Q, 30 s)  msg 1 1. GetMessage(Q, 30 s)  msg 1 5. C 1 crashed msg1 visible 30 s after Dequeue

Page 9 C1C1 C1C1 C2C2 C2C2 Removing Poison Messages Producers Consumers P2P2 P2P2 P1P1 P1P Dequeue(Q, 30 sec)  msg 2 3. C2 consumed msg 2 4. Delete(Q, msg 2) 7. Dequeue(Q, 30 sec)  msg 1 8. C2 crashed 1. Dequeue(Q, 30 sec)  msg 1 5. C 1 crashed 10. C1 restarted 11. Dequeue(Q, 30 sec)  msg DequeueCount > Delete (Q, msg1) msg1 visible 30s after Dequeue 9. msg1 visible 30s after Dequeue

Page 10 Programming Queue Storage Get Client –CloudQueue.CreateIfNotExist() Create Message –CloudQueueMessage class –CloudQueue.AddMessage() Get Message –Get CloudQueueMessage, and change message’s property to invisible. –GetMessages() accept max 32 messages. Peek Message –Get CloudQueueMessage, but DON’T change invisible property. Delete Message –CloudQueue.DeleteMessage() –CloudQueue.Clear ()

Page 11 Programming Queue Storage Get queue count –RetrieveApproximentMessageCount() : must call this to update active message count. –ApproximentMessageCount Property CloudQueueMessage class –Message can archive any string or data, but length cannot over 8KB. –DequeueCount Times –ExpirationTime: Time of message will be deleted by Queue Storage. –InsertionTime: Time of message inserted into queue. –NextVisibleTime: Time of next visible time. Metadata –Queue Container support metadata (like BLOB storage).

Page 12 Programming Queue Storage CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting("CloudStorageAccount"); CloudQueueClient queueClient = new CloudQueueClient( account.QueueEndpoint, account.Credentials); //Create Queue CloudQueue queue = queueClient.GetQueueReference(queueName); queue.CreateIfNotExist(); //Add Message CloudQueueMessage message = new CloudQueueMessage(“some content"); queue.AddMessage(message); //Get Message message = queue.GetMessage(TimeSpan.FromMinutes(3) /*Invisibility timeout*/); // Process Message within the Invisibility Timeout //Delete Message queue.DeleteMessage(message);

Page 13 Queue Storage tips Messages can be up to 8KB –Use blob to store large messages, and store blob ref in message A message may be processed more than once –Make message processing idempotent Work should be repeatable and can be done multiple times Assume messages put into queue can be processed in any order For higher throughput –Batch multiple work items into a single message or into a blob –Use multiple queues Use DequeueCount to remove poison messages –Enforce threshold on message’s dequeue count Monitor message count to dynamically increase/reduce workers

Page 14 Queue Storage tips If your message must over 8KB… –Store your message into BLOB storage and pass the reference to queue. Producer and Consumer Problem –Delete after data consumed. –Pass reference to consumer to process finalized data.

Page 15 Show time for you!

Page 16 References Windows Azure SDK – Table Storage – Tech.Ed 2010 North America Session –COS310: Windows Azure Storage Deep Dive – 邊做邊學 Windows Azure: Table, BLOB and Queue – 認識 Table Storage – 01/vs2010.and.azure.platform.understanding.table.stora ge.service.aspxhttp:// 01/vs2010.and.azure.platform.understanding.table.stora ge.service.aspx