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.

Microsoft/Zend Webcast on Cloud Computing


Published on

This is the presentation that I presented during a webcast with Microsoft and Zend on Cloud Computing. The demo focused on the API

Published in: Technology
  • Be the first to comment

Microsoft/Zend Webcast on Cloud Computing

  1. 1. Cloud Computing with Zend Framework and Windows Azure<br />Josh Holmes<br />@joshholmes<br /><br /><br />
  2. 2. Agenda<br />Testing the Waters<br />What is cloud computing?<br />What are the advantages of cloud computing?<br />How’s Azure fit in?<br />Diving Deep<br />Digging into PHP on Azure<br />Leveraging Azure Storage<br />Leveraging SQL Azure<br />
  3. 3. We are all excited about the cloud<br />
  4. 4. In House or Hosted Servers<br />Allocated IT-capacities<br />Load Forecast<br />“Under-supply“ of capacities<br />“Waste“ of capacities<br />Fixed cost of IT-capacities<br />IT CAPACITY<br />Barrier for<br />innovations<br />ActualLoad<br />TIME<br />
  5. 5. Cloud Computing<br />Load Forecast<br />Allocated IT capacities<br />No “under-supply“<br />IT CAPACITY<br />Reduction of “over-supply“<br />Possible reduction of IT-capacities in case of reduced load<br />Reduction of initial investments<br />ActualLoad<br />Time<br />
  6. 6. Types of Hosting Solutions<br />Platform<br />(as a Service)<br />Private<br />(On-Premise)<br />Infrastructure<br />(as a Service)<br />You manage<br />Applications<br />Applications<br />Applications<br />You manage<br />Runtimes<br />Runtimes<br />Runtimes<br />Security & Integration<br />Security & Integration<br />Security & Integration<br />Managed by vendor<br />Databases<br />Databases<br />Databases<br />You manage<br />Servers<br />Servers<br />Servers<br />Managed by vendor<br />Virtualization<br />Virtualization<br />Virtualization<br />Server HW<br />Server HW<br />Server HW<br />Storage<br />Storage<br />Storage<br />Networking<br />Networking<br />Networking<br />
  7. 7. The Microsoft Cloud<br />~100 Globally Distributed Data Centers<br />Quincy, WA<br />Chicago, IL<br />San Antonio, TX<br />Dublin, Ireland<br />Generation 4 DCs<br />
  8. 8.
  9. 9. ZENDFRAMEWORK<br />
  10. 10. Two sides to talk about…<br />Storage<br />Compute<br />User Code<br />Runtime API<br />VM Setup<br />Cloud VM<br />
  11. 11. Data Storage<br />
  12. 12. PHP with Windows Azure Storage<br />SimpleCloud API @<br />Windows Azure SDK for PHP @<br />PHP programming model for Windows Azure Storage<br />Features <br />PHP classes for Blobs, Tables & Queues<br />Store PHP sessions in Table Storage<br />
  13. 13. Windows Azure 4 Eclipse<br />Does a lot of the heavy lifting for you<br />Creates the Web.config, Web.roleConfig, PHP implementation and debugs in the dev fabric<br /><br />Does a lot of the heavy lifting for you<br />
  14. 14. Windows Azure Data Storage<br />Queue<br />Blob<br />Account<br />Tables<br />Drives<br />
  15. 15. Azure Platform Data Storage Options<br /><ul><li>Windows Azure Data Storage
  16. 16. Blobs
  17. 17. Unstructured data storage
  18. 18. Tables
  19. 19. Semi-structured or tabular data storage
  20. 20. Queues
  21. 21. Buffered delivery data storage
  22. 22. Drives
  23. 23. Durable NTFS volumes that Windows Azure applications can use. See:</li></ul>SQL Azure<br /><ul><li>Relational data storage</li></li></ul><li>Windows Azure Data Storage - Blobs<br />Unstructured data storage<br />Partitioned by container<br />Unlimited containers<br />
  24. 24. Storage: XDrive<br />NTFS drive in the cloud: X:<br />Fixed size between 16MB and 1TB<br />Max 8 drives on your VM<br />Implemented as a page blob<br />Single instance write<br />Multiple instance read<br />
  25. 25. Queue Workflow Concepts<br />Windows Azure Queue Provides<br />Guarantee delivery (two-step consumption)<br />Worker Dequeues Message and mark it as Invisible<br />Worker Deletes Message when finished processing it<br />If Worker role crashes, message becomes visible for another Worker to process<br />Doesn’t guarantee “only once” delivery<br />Doesn’t guarantee ordering<br />Best effort FIFO<br />Worker Role<br />Web Role<br />Input Queue (Work Items)<br />Worker Role<br />Azure Queue<br />Web Role<br />Worker Role<br />Web Role<br />Worker Role<br />
  26. 26. Azure Queues<br />RemoveMessage<br />GetMessage (Timeout)<br />Worker Role<br />PutMessage<br />Queue<br />Msg 1<br />Msg 2<br />Msg 2<br />Msg 1<br />Web Role<br />Worker Role<br />Worker Role<br />Msg 3<br />Msg 4<br />Msg 2<br />
  27. 27. Loosely Coupled Work with Queues<br />Worker-Queue Model<br />Load work in a queue<br />Many workers consume the queue<br />Input Queue (Work Items)<br />Azure Queue<br />Worker Role<br />Web Role<br />Worker Role<br />Web Role<br />Worker Role<br />Web Role<br />Worker Role<br />
  28. 28. Windows Azure Data Storage - Tables<br />Semi-Structured data<br />Tables contain entities<br />Entities contain properties<br />May be partitioned across thousands of servers.<br />Support ACID transactions over single entities<br />Queries over entire table<br />.NET and REST interfaces<br />
  29. 29. Windows Azure Data Storage – Tables (Terms Part 1)<br />Table<br />Contains a set of entities. <br />Entity (Row) <br />Basic data items stored in a table. <br />Property (Column)<br />Single value in an entity. <br />RowKey<br />Unique ID of the entity within a partition<br />Timestamp<br />Time it was created<br />
  30. 30. Windows Azure Data Storage – Tables (Terms Part 2)<br />Partition <br />Entities in a table with the same partition key<br />PartitionKey<br />Segments entities in to partitions to automatically distribute the table’s entities over many storage nodes.<br />Sort Order<br />There is a single index provided for the CTP, where all entities in a table are sorted by PartitionKey and then RowKey<br />
  31. 31. Key Example – Blog Posts<br />Partition 1<br />Partition 2<br />Getting all of dunnry’s blog posts is fast<br />Single partition<br />Getting all posts after 2008-03-27 is slow<br />Traverse all partitions<br />
  32. 32. SQL Azure and Windows Azure Table Comparison<br />Windows Azure Tables<br />SQL Azure Tables<br />Semi-structured<br />Loosely typed<br />Non-Relational (Not RDMS)<br />Massively scalable<br />Fully structured<br />Strongly typed<br />Relational (RDMS)<br />Highly scalable<br />
  33. 33. SQL Azure<br />
  34. 34. SQL Azure Features<br />Supported<br />Tables, Indexes, Views<br />Stored Procedures<br />Triggers<br />Constraints<br />Table Variables<br />Temp Tables (#Name)<br />Not Supported<br />Physical Server Access <br />Catalog DDL<br />Common Language Runtime<br />Service Broker<br />Reporting Services<br />Analysis Services<br />Distributed Transactions and Queries<br />
  35. 35. SQL AzureDeployment<br />Web Portal<br />(API)<br />DB Script<br />SQL Azure<br />TDS<br />
  36. 36. SQL AzureAccessing databases<br />Web Portal<br />(API)<br />Your App<br />SQL Azure<br />TDS<br />Change Connection String<br />
  37. 37. Database Replicas<br />Single Database<br />Multiple Replicas<br />Replica 1<br />Single Primary<br />Replica 2<br />DB<br />Replica 3<br />
  38. 38. SQL AzureDatabase Monitoring & Recovery<br />Web Portal<br />(API)<br />!<br />Your App<br />SQL Azure<br />TDS<br />
  39. 39. SQL Azure Database Connection String<br />An administrative user is created with the server<br />User has system administrator permissions likesa”<br />; Database=FabrikamAzureDB;User ID=SaPaulM;Password=myPassword;Trusted_Connection=False;Encrypt=True;<br />
  40. 40. Windows Azure VMs<br />Small<br />Medium<br />Large <br />X Large<br />$0.12 <br />$0.24 <br />$0.48 <br />$0.96 <br />Per service hour<br />Per service hour<br />Per service hour<br />Per service hour<br />1 x 1.6Ghz <br />2 x 1.6Ghz <br />4 x 1.6Ghz <br />8 x 1.6Ghz<br />(moderate IO) <br />(high IO)<br />(high IO) <br />(high IO)<br />1.75 GB memory <br />3.5 GB memory <br />7.0 GB memory<br />14 GB memory<br />
  41. 41. Windows Azure, In One Picture<br />Business Portal<br />Developer Portal<br />Service Management Service<br />REST<br />User Code<br />…<br />…<br />Runtime API<br />Storage Cluster<br />VS Tools<br />Compute Cluster<br />…<br />WA SDK<br />VM Setup<br />REST<br />MSFT Datacenters<br />Desktop<br />Cloud VM<br />
  42. 42. Windows Azure Roles<br />WorkerRole<br /><ul><li>Internal Facing
  43. 43. TCP/HTTP Endpoint
  44. 44. Long running processes
  45. 45. Think Service or Deamon</li></ul>WebRole<br /><ul><li>External Facing
  46. 46. HTTP/HTTPS Endpoint
  47. 47. Short lived calls
  48. 48. Think Web Server</li></li></ul><li>Running PHP in Windows Azure<br />How to Do It<br />Host in Web role (like .NET)<br />Supply PHP runtime<br />Point to runtime via FastCGI configuration in<br />Web.config<br />Web.roleConfig<br />PHP <br />Web Role<br />Instance 1<br />VIP<br />Load Balancer<br />PHP <br />Web Role<br />Instance 2<br />
  49. 49. Running EXEs in the Worker Process<br />Start with a Worker Role Process to <br />Copy the exes to the worker role’s app directory<br />Execute the process<br />Monitor the health of the process<br />Other auxiliary tasks…<br />
  50. 50.
  51. 51. More resources<br />Microsoft Windows Azure Interop<br /><br />Interop Bridges<br /><br />
  52. 52. More resources<br />PHP<br /><br /> <br /><br />MySQL<br />Windows Azure MySQL PHP Solution Accelerator<br /><br />
  53. 53. And of course<br />Josh Holmes<br /><br />
  54. 54. Cloud Computing with Zend Framework and Windows Azure<br />Josh Holmes<br />@joshholmes<br /><br /><br />