Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Creation of cloud application using microsoft azure by vaishali sahare [katkar]

323 views

Published on

Creation of cloud application using Microsoft Azure platform, demo how to use Azure for cloud application

Published in: Engineering
  • Be the first to comment

Creation of cloud application using microsoft azure by vaishali sahare [katkar]

  1. 1. By, Vaishali Sahare (Katkar)
  2. 2. Outline  Overview of Azure  Key Components A. Windows Azure B. SQL Azure C. Windows Azure Platform AppFabric  Demos  HelloCloud  GuestBook
  3. 3. Overview  Cloud-computing platform  Platform-as-a-Service running custom applications on pre-configured virtual machines  Why Azure?  Common Cloud Benefits  Virtualization  Scalability  Utility Computing  The “Familiarity” of the Stack and the integrated toolchain
  4. 4. Overview  Runs on Microsoft data centers  Commodity hardware  Wide range of app dev technology:  .NET Framework, Unmanaged code, others..  C#, VB, C++, Java, ASP.NET, WCF, PHP  Several Storage Options  BLOBs and simple data structures  RESTful approach to Windows Azure storage  Traditional Relational, SQL Azure Database  Connectivity with other distributed applications
  5. 5. A. Windows Azure
  6. 6. What is an Azure application?  A service must include at least one role of either type  Web role is frontend, Worker Role is backend  Web role is worker role with IIS installed
  7. 7. Design Issues  Application  Web Roles and Worker Roles  Stateless design  Easy-to-Scale  Fault Tolerance and Recovery  Under-the-cover Multiple instances  Each runs in Microsoft Virtual Machine  Handled automatically by hypervisor
  8. 8. Agent and Fabric  Fabric  Allocate resources according to configuration file  Detect and restart failed web roles and workers  Agent  Exposes the API  Monitors the failure conditions of the application
  9. 9. Windows Azure Storage  Scalable storage in the cloud  100 TB per storage account  Auto-scale to meet massive volume and throughput  4 Types: Tables, Queues, BLOBs, Drives  Accessible via RESTful Web Service API  Access from Windows Azure Compute  Access from anywhere via internet  Support .NET client library  Features  Fault-Tolerance: All data replicated 3 times  Guaranteed consistency  Globally Visible: Accessible by non-Azure apps
  10. 10. BLOBs (Basic Large OBjects)  Intended for unstructured data  Containers and BLOBs  Each Azure account has containers  Containers have one or more BLOBs.  BLOBs can be as large as terabyte
  11. 11. XDrives  Mechanism for viewing persistent storage as if it were a local drive  BLOBs can be exposed via Xdrives  A mounted drive on a BLOB  NTFS VHD mounted into Compute instance  Cannot be remotely mapped
  12. 12. Tables  Structured data but not quite relational  Table has a collection of entities  Entities are similar to ‘rows’  Entity has a primary key and properties (set of name/value pairs)  E.g. an Entity of GuestBook which contains the guest user’s information  [“GuestName”] = Joe Smith  [“Address”] = 30 Rockefeller Plaza, New York, NY  In addition, Entity has PartitionKey and Timestamp  PartitionKey for load balancing
  13. 13. Queues  Simple message queue  Not transactional  Asynchronous  E.g., Web role receives a request and adds it to the queue. Worker role can wait on the queue.  Read at least once  Delete to remove message, otherwise is returned to queue
  14. 14. Windows Azure Storage Fundamentals • Storage characteristics • Durable – replicated three times • Scalable (capacity and throughput) • Highly available • Simple and familiar programming interfaces • REST (HTTP and HTTPS) • .NET accessible
  15. 15. Storage Objects • Blobs • Provide a simple interface for storing named files along with metadata for the file • Tables • Provide lightly structured storage with a set of entities that contain a set of properties • Queues • Provide reliable storage and delivery of messages
  16. 16. Storage Account and Blob Containers • Storage account • An account can have many blob containers • Container • A container is a set of blobs • Sharing policies are set at the container level • Public READ or Private • Associate metadata with container • Metadata is <name, value> pairs • Up to 8KB per container • List the blobs in a container
  17. 17. Blob Storage Concepts BlobContainerAccount sally pictures IMG001.JPG IMG002.JPG movies MOV1.AVI
  18. 18. Table Data Model • Table • A storage account can create many tables • .NET classes and LINQ • A table is a set of entities (rows) • An entity is a set of properties (columns) • Billions of entities and TBs of data • Two “key” properties that together are the unique ID of the entity in the table • PartitionKey – enables scalability • RowKey – uniquely identifies the entity within the partition
  19. 19. Table Storage Concepts EntityTableAccount sally users Name =… Email = … Name =… Email = … photo index Photo ID =… Date =… Photo ID =… Date =…
  20. 20. Windows Azure Queues • Provide reliable message delivery • Simple, asynchronous work dispatch • Programming semantics ensure that a message can be processed at least once • Queues are highly available, durable and performance efficient • Maximum size is 64K • FIFO in general, but not guaranteed • Pulling an item from the queue doesn’t delete it • It becomes invisible for a visibility timeout • Item must be deleted before timeout or else it becomes visible
  21. 21. Queue Storage Concepts MessageQueueAccount sally thumbnail jobs 128x128, http://… 256x256, http://… photo processing jobs http://… http://…
  22. 22. Account Container Blobs Table Entities Queue Messages Windows Azure Data Storage Concepts http://<account>.blob.core.windows.net/<contain er> http://<account>.table.core.windows.net/<table> http://<account>.queue.core.windows.net/<queue >
  23. 23. Azure Storage – Design Issues  Transmission Problems with BLOBs?  Divided into blocks for efficient transfer and retransmissions  Finding information?  BLOBs can have associated metadata (e.g., photo)  Fast access?  Geolocation via content delivery network  Storing frequently accessed data closer to apps that use it
  24. 24. B. SQL Azure  SQL Azure Database  Cloud version of Microsoft SQL Server  Indexes, views, stored procedures, triggers, etc..  SQL Server Reporting Services can hook into it  Similar in usage to SQL Server  SQL semantics (CREATE, SELECT, UPDATE, etc)  Difference in administration  Cannot control physical resources allocation  Automatic fail-over, replication
  25. 25. Key Benefits  Self-Managing  No-hassle management  High Availability  Replication  Automatic fail-over from hardware failures  Scalability  Simply increase data storage in config  Familiar and Standard Data Model  SQL, relational
  26. 26. C. AppFabric  Not to be confused with Window Azure’s Fabric Controller  Connecting distributed applications 1. Service Bus 2. Access Control
  27. 27. Service Bus – What it does  Connect Cloud app and Non-Cloud (on-premise) app  NAT, firewall challenges  Bidirectional Communication
  28. 28. Service Bus – How it works 1. Rendez-vous Relaying  Support Several Patterns:  One-way messaging  Request-response  Pub-Sub (multicast)  Asynchronous / Buffered
  29. 29. Service Bus – How it works 2. Direct Connection  Better throughput  Try to predict and probe NAT  E.g., file transfer in IM
  30. 30. Access Control  Service Registry allows endpoints to be discoverable  Control on who can access these Service Bus endpoints  Claim-based security model
  31. 31. Access Control  Claim-based Security Model  Client must present token for action  Security token for “listen” claim  Security token for “send” claim  Clients and Services supply credentials to Access Control to acquire security tokens  Access Control has GUI for managing rules for issuing claims
  32. 32. DEMO
  33. 33. Getting ready for Developing Azure applications 1. Install the following:  IIS 7.0 (Internet Information Services)  Microsoft Visual Studio 2008 or 2010  .NET Framework 4.0 2. Download the Azure Platform SDK  http://www.microsoft.com/windowsazure/ 3. Sign-up for an Account (Optional)  Needed if you want to deploy your app to the cloud  Unfortunately their free trial ended on Oct 30
  34. 34. DEMO 1: Hello Cloud What we are going to do… 1. Create Visual Studio Project for Cloud 2. Create WebRole to implement “Hello Cloud” 3. Debug locally 4. Deploy – say hello to the cloud!
  35. 35. Visual Studio 2010
  36. 36. Create Project
  37. 37. Visual C# -> Cloud
  38. 38. Web Roles and Worker Roles
  39. 39. ASP.NET of our Cloud App
  40. 40. Write our web page..
  41. 41. Run locally
  42. 42. Local Simulator Started
  43. 43. Development Fabric
  44. 44. Hello Cloud on localhost
  45. 45. Let’s Deploy it!
  46. 46. Publish…
  47. 47. Create Service Package
  48. 48. Package for Deployment
  49. 49. Azure Developer Portal
  50. 50. Select Project
  51. 51. New “Hosted Services” Service
  52. 52. Create a Service
  53. 53. Instantiate our application
  54. 54. Deploy and Run
  55. 55. Live on the cloud…
  56. 56. DEMO2: Guestbook I. Storage Service II. App Design with Worker Role & Storage
  57. 57. I. Create a Storage Service on Cloud
  58. 58. Portal – Create “Storage Account”
  59. 59. “Secrets” you need to connect…
  60. 60. From now on, access using…  You will need this info  Account Name: awesomecloud0001  Primary Key: Yn0OzqXmlCxiHcXBY2SB71qroiWVqbarXWZS3rNCz2 Po23Od+4LDYm6czQqxCVYdz1rWyCca5CtTD1mhjaP WQg==
  61. 61. II. Guestbook Application  ‘guestbook’ signing you see on web pages
  62. 62. Guestbook Application  Key components of this app  WebRole: display the guest book  WorkerRole: update the image so it’s a thumbnail  Windows Azure Storage: store guestbook entry
  63. 63. Application & Service Configuration
  64. 64. Deploy to Staging Data Center
  65. 65. Modify Service Configuration
  66. 66. GuestBook running on staging
  67. 67. Worker Role  Waits for message on queue  On which image it should shrink  Stores new thumbnail image in BLOB
  68. 68. WorkerRole.cs
  69. 69. Creating Storage Components
  70. 70. Initializing Storage Components
  71. 71. Processing Queue Message
  72. 72. Connecting to Storage Service
  73. 73. GuestBook Data  Azure Table Storage  Schema  Entry indexes by <PARTITION KEY, ROW KEY>
  74. 74. GuestBookDataSource
  75. 75. GuestBookDataContext
  76. 76. Reading List [1] “Introducing the Windows Azure Platform” David Chappell [2] “An Introduction to Windows Azure AppFabric for Developers” Keith Brown

×