tailieunhanh - Introducing Windows Azure- P23

Introducing Windows Azure- P23: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 object in the message queue event handler. Figure 3-7 shows the screenshot of the Default .aspx page at runtime and Figure 3-8 shows the results of using SQL Server Management Studio to query tables Accounts AcctBlobContainerMap BlobContainer and Blob from the local DevelopmentStorageDb. The results show the structure of the relation between these tables and how the tables reference each other as we have presented in Figure 3-1 and Figure 3-2 at the beginning of this chapter. It also shows that access scope of the blob container has been set to public a value of 1 . Listing 3-10. Create a Blob to Store Information from a Message Sent from a Queue private void OnMessageReceive object sender EventArgs args Message message args as MessageReceivedEventArgs .Message 0 OnMessageReceive message 1 string blobName 0 1 SUFFIX if blobName BlobProperties properties new BlobProperties blobName Create metadata to be associated with the blob NameValueCollection metadata new NameValueCollection metadata MediaID metadata text xml Create the blob byte buffer .GetBytes .Replace r n MemoryStream ms new MemoryStream buffer BlobContents mediaBlob new BlobContents ms properties mediaBlob true DataBind 83 CHAPTER 3 WORKING WITH CLOUD QUEUE AND BLOB STORAGE Figure 3-7. Screenshot of the blob creating results 84 CHAPTER 3 WORKING WITH CLOUD QUEUE AND BLOB STORAGE - Henry Li 52 select from from dbo Blob dbo select from I select from Account Name ContainerName BlobContainerld devstoreaccount 1 blobcontainerpayload 2C491C34-E6764339-99C9-F9A4254BDB85 devstoreaccount 1 Id IsAdmin IsPublic MetaData CreatedDate Modified