Running PHP In The Cloud


Published on

An introduction to running PHP on Windows Azure

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Take your application to the next level
  • Vragen: zijn er managers aanwezig?
  • Running PHP In The Cloud

    1. 1.
    2. 2. Running PHP in the cloud<br />Maarten Balliauw – RealDolmenE-mail: maarten.balliauw@realdolmen.comBlog: http://blog.maartenballiauw.beTwitter: @maartenballiauw<br />
    3. 3. Who am I?<br />Maarten Balliauw<br />Antwerp, Belgium<br /><br />Focus on web<br />ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, …<br />MVP ASP.NET<br />Interested in interoperability<br />PHPExcel, PHPLinq, Windows Azure SDK for PHP, ...<br /><br /><br />
    4. 4.
    5. 5. Agenda<br />Windows Azure?<br />Application architecture<br />Using PHP with Windows Azure<br />Demo time!<br />Resources<br />Q&A<br />
    6. 6. What’s in the cloud?<br />Windows Azure<br />
    7. 7. Definition of cloud (NIST)<br />On-demand self service<br />Standardized access<br />Location independant resource pooling<br />Rapid elasticity<br />Pay per use<br />
    8. 8. IT as a Service<br />Private<br />(On-Premise)<br />Infrastructure<br />(as a Service)<br />Platform<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 />You manage<br />Databases<br />Databases<br />Databases<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 />
    9. 9. The Windows Azure Platform<br />Windows Azure<br />SQL Azure<br />Windows Azure platform AppFabric<br />Microsoft Codename “Dallas”<br />Developer tools<br />
    10. 10. Azure Service Platform<br />Windows Azure is an Operating System as a Service for the Cloud.<br /><ul><li>Compute– auto-provisioning 64-bit application containers in Windows Server VMs; supports a wide range of application models
    11. 11. Storage– highly available distributed table, blob, queue, & cache
    12. 12. Languages – .NET 3.5 (C#, VB.NET, etc.), IronRuby, IronPython, PHP, native Win32 code</li></ul>SQL Azure is a Relational Database for the Cloud. <br /><ul><li>RDBMS – Tables, Views, Indexes, Stored Procedures, Triggers, ...
    13. 13. Programmability – Managed ADO.NET data access, native ODBC, support for PHP
    14. 14. Tools – SQLCMD and the SQL Azure Database account portal</li></ul>AppFabric is the glue between on-premises and the cloud. <br /><ul><li>Service Bus – connectivity to on-premises applications; secure, federated fire-wall friendly Web services messaging intermediary; durable & discoverable queues
    15. 15. Identity Management – rules-driven federated identity; AD federation; claims-based authorization</li></ul>Live Services is a building block within the Azure Services Platform.<br /><ul><li>Live Mesh
    16. 16. Live ID
    17. 17. Live Contacts
    18. 18. Live …</li></ul>Live Services<br />
    19. 19. Windows Azure<br />Flexible application hosting<br />Lights-out service management<br />Provide code & service model, hit ENTER<br />Storage at massive scale<br />Blobs, tables, queues<br />Compute<br />Storage<br />Management<br />There’s an SDK for this:<br />
    20. 20. Windows Azure<br />
    21. 21. SQL Azure<br />Relational database as a service<br />Highly available, automatically maintained<br />Extension of the SQL Server Data Platform<br />Business Analytics<br />Reporting<br />Data Sync<br />Database<br />There’s a driver for this:<br />
    22. 22. SQL Azure<br />Relational database, provided as a service<br />Highly symmetrical development and tooling experience (use TDS protocol and T-SQL)<br />Highly scaled out, on commodity hardware<br />Built on the SQL Server technology foundation<br />Beyond “hosted database”<br />High availability, DB provisioning, and DB management are provided by the service<br />Pay for what you use<br />
    23. 23. Windows Azure AppFabric<br />Secure connections between services<br />Across organizational boundaries<br />Claims-based access control<br />ServiceBus<br />AccessControl<br />There’s an SDK for this:<br />
    24. 24. Windows Azure AppFabric - Service Bus<br />Securely connect applications<br />Over the internet<br />Across any network topology<br />Across organizational boundaries<br />Primary application patterns<br />Eventing: <br />Notify applications and/or devices<br />Service Remoting: <br />Securely project on-premises services out to the cloud<br />Tunneling: <br />App-to-app communication with NAT/Firewall traversal<br />
    25. 25. Service Bus Overview<br />
    26. 26. Microsoft Codename “Dallas”<br />Content brokerage and discovery platform <br />Available as a CTP at commercial launch<br />Microsoft Codename “Dallas”Information Services<br />
    27. 27.
    28. 28.
    29. 29. What’s in the cloud?<br />Windows Azure Application Architecture<br />What would a typical cloud application look like?<br />
    30. 30. Typical Architecture on Azure<br />Service Unavailable<br />VIP<br />Worker Role<br />Web Role<br />Windows Azure Storage <br />(Blob, Table, Queue)<br />
    31. 31. Web + Worker Role Service Model<br />Worker Role<br />Service Still Available<br />Worker Role<br />Web Role<br />VIP<br />Worker Role<br />Web Role<br />Worker Role<br />Worker Role<br />Windows Azure Storage <br />(Blob, Table, Queue)<br />
    32. 32. What’s in the cloud?<br />Using PHP with Windows Azure<br />
    33. 33. Windows Azure Platform<br />SOAP<br />SOAP<br />REST<br />Your Cloud<br />Application<br />REST<br />XML<br />End Users<br />Other Development Platforms<br />Enabling Interoperability<br />XML<br />.NET SDKs<br />PHP and Java SDKs for Windows Azure<br />Your Software Application<br />PHP, Java, Ruby SDKs for AppFabric<br />Developers<br />
    34. 34. Using PHP with Windows Azure<br />It’s all about…<br />Running PHP Code in Windows Azure<br />Eclipse Tooling<br />Build, Test, Deploy PHP Projects<br />Create New or Use Existing PHP Projects<br />Scaling PHP Apps<br />Using Cloud Storage from PHP<br />Using Windows Azure Storage<br />Using SQL Azure<br />
    35. 35. 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 FastCGIconfiguration in<br />Web.config<br />Web.roleConfig<br />Eclipse Tooling at does the above for you<br />PHP <br />Web Role<br />Instance 1<br />VIP<br />Load Balancer<br />PHP <br />Web Role<br />Instance 2<br />
    36. 36. Developer tools<br />Development<br />Use your favourite editor<br />Local debugging<br />Windows with IIS 7.x<br />Visual Studio<br />Windows Azure tools for Eclipse<br />Packaging<br />Windows Azure SDK<br />Deployment<br />Any browser<br />I’m whining for this one!<br />
    37. 37. PHP + Cloud Storage<br />Windows Azure Storage<br />On-Premise<br />VIP<br />PHP<br />Web Role<br />Load Balancer<br />PHP App<br />SQL Azure<br />Windows Azure Platform<br />
    38. 38. PHP with Windows Azure Storage<br />Windows Azure SDK for PHP at<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 />File system wrapper for Blob Storage<br />
    39. 39. Windows Azure SDK for PHP<br />Overview<br />Enables PHP developers to take advantage of the Microsoft Cloud Services Platform  – Windows Azure.  <br />Open source project being contributed to Zend Framework (<br />Features<br />PHP classes for Windows Azure Blobs, Tables & Queues (for CRUD operations)<br />Helper Classes for HTTP transport, AuhN/AuthZ, REST & Error Management<br />Manageability, Instrumentation & Logging support<br />Project site: <br /><br />Logical architecture <br />Your PHP application<br />REST<br />Compute<br />Storage<br />Manage<br />Deployment scenarios<br />PHP Runtime<br />Any internet connected Server<br />PHP Runtime<br />REST<br />REST<br />
    40. 40. PHP with SQL Azure<br />SQL Server Driver for PHP at<br />Supports PHP access to SQL Azure<br />Features<br />Choose between SQL Server and SQL Azure by changing connection string<br />Use from on-premise apps or in Windows Azure<br />
    41. 41. PHP with AppFabric<br />AppFabric SDK for PHP developers at<br />Supports PHP on service bus and access control<br />Features<br />Expose on-premise apps on an external endpoint without opening firewall<br />Pub/sub scenario’s<br />…<br />
    42. 42. Solution accelerators<br />MySQL<br /><br />Memcached<br /><br />MediaWiki<br /><br />Tomcat<br /><br />
    43. 43. What’s in the cloud?<br />DEMOS<br />Finally!<br />
    44. 44. Demos<br />Eclipse Tools for Windows Azure<br />Windows Azure SDK for PHP<br />And a demo app!<br />
    45. 45. ImageCloud<br />Upload your images!<br />Free, unlimited storage!<br />Images stored in multiple formats!<br />Delivered trough a high-speedcontent-delivery network!<br />Repurposed adaptive functionality!<br />Empowered best-of-breed methodology!<br />Virtualized granular service!<br />Integrated cloud-based deliverable!<br />ImageCloud<br />
    46. 46. ImageCloud Architecture<br />WebRole<br />Worker Role<br />Computation Services<br />End Users<br />ImageCloud<br />Table Storage<br />Blob Storage<br />Queue Service<br />Storage Services<br />
    47. 47. What’s in the cloud?<br />Resources<br />
    48. 48. Resources<br />Windows Azure<br />Windows Azure SDK for PHP<br />SQL Server Driver for PHP<br />AppFabric SDK for PHP developers<br />PDC<br />PHP Architect December 2009 issue<br />Steve Marx<br />Clemens Vasters<br />Simon Guest<br />My blog<br />RealDolmen blogs is running on Azure!<br />
    49. 49. Before skipping to Q&A...<br />Do I need Visual Studio / Eclipse?<br />Only for local debugging.<br />Do I need Windows & the Windows Azure SDK?<br />Only for packaging.<br />I’ll keep whining to make this available on Linux.<br />
    50. 50. Questions, possibly Answers…<br />?<br />Maarten Balliauw – RealDolmenBlog: http://blog.maartenballiauw.beTwitter: @maartenballiauw<br />
    51. 51. THANK YOU!<br />Maarten Balliauw<br />