Introducing Windows Azure- P21

Introducing Windows Azure- P21:The cloud platform is getting more and more attractive to the computing world. Today, service-oriented architecture (SOA) and aspect-oriented programming (AOP) techniques are widely used in enterprise solutions. A question an IT management team or a software development team may ask is, what is the next trend going to be? Cloud computing seems to be the right answer. | CHAPTER 3 WORKING WITH CLOUD QUEUE AND BLOB STORAGE bool containerAndQueueCreated false while containerAndQueueCreated try containerAndQueueCreated true catch WebException e if Error Connect failure The most likely reason is that the local Development Storage tool is not running or your storage account configuration is incorrect. Message 0 5000 else throw while true try Message msg if msg null string path Information Done with 0 path else 1000 catch StorageException e Error Exception when processing queue item. Message 0 73 CHAPTER 3 WORKING WITH CLOUD QUEUE AND BLOB STORAGE public override RoleStatus GetHealthStatus This is a sample worker implementation. Replace with your logic. return Create the Queue Programatically Listing 3-3 is an example of creating a queue programatically inside a C class instead of reading the information from a configuration file. This code snippet can be used to replace the highlighted part in Listing 3-2. Listing 3-3. Create the Queue Programatically string accountName devstoreaccountl string accountKey ACCOUNT KEY string address http 10001 StorageAccountInfo accountinfo new StorageAccountInfo new Uri address null accountName accountKey QueueStorage queueStorage accountlnfo MessageQueue messageQueue XML PAYLOAD QUEUE NAME Before a client can access the cloud queue one of the two initialization steps shown in the previous listing is required. Put a Message into the Queue There are three data types you can use as a raw queue message stream byte array and string. In this exercise we are going to use the class Address defined in Chapter 1 and Chapter 2 as a data entity class. Since XML is the most .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.