Đang chuẩn bị liên kết để tải về tài liệu:
Introducing Windows Azure- P21

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

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 queue.CreateQueue containerAndQueueCreated true catch WebException e if e.Status WebExceptionStatus.ConnectFailure RoleManager.WriteToLog Error string.Format 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 e.Message System.Threading.Thread.Sleep 5000 else throw while true try Message msg queue.GetMessage if msg null string path msg.ContentAsString RoleManager.WriteToLog Information string.Format Done with 0 path else Thread.Sleep 1000 catch StorageException e RoleManager.WriteToLog Error string.Format Exception when processing queue item. Message 0 e.Message 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 RoleStatus.Healthy 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 127.0.0.1 10001 StorageAccountInfo accountinfo new StorageAccountInfo new Uri address null accountName accountKey QueueStorage queueStorage QueueStorage.Create accountlnfo MessageQueue messageQueue queueStorage.GetQueue 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 .

Đã 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.