1 / 45

Using PHP and M y SQL to Build Applications with Windows Azure

SVC51. Using PHP and M y SQL to Build Applications with Windows Azure. Mohit Srivastava & Tushar Shanbhag. Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns. Agenda. Windows Azure Capabilities On-Demand Computational Resources

xuxa
Download Presentation

Using PHP and M y SQL to Build Applications with Windows Azure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SVC51 Using PHP and MySQL to Build Applications with Windows Azure Mohit Srivastava & Tushar Shanbhag

  2. Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda

  3. Windows Azure Capabilities On-Demand Computational Resources Storage at Massive Scale Automated Service Management Goal: Give You More Time to Write Code …with Skills of your Choice Languages Tools Application Components Windows Azure + Interoperability PHP

  4. Interoperability in this Session • Popular Technologies, Used by • Sites: Facebook, Wikipedia • Apps: WordPress, MediaWiki • …with Windows Azure Benefits • Get Started Easily: PHP/Eclipse Developer Experience • Maintain and Scale: Leverage Platform Primitives • Cloud Storage • Inter-role Communication + Endpoint Discovery • …

  5. Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda

  6. Using PHP with Windows Azure • Running PHP Code in Windows Azure • Eclipse Tooling • Build, Test, Deploy PHP Projects • Create New or Use Existing PHP Projects • Scaling PHP Apps • Using Cloud Storage from PHP • Using Windows Azure Storage • Using SQL Azure

  7. Running PHP in Windows Azure • How to Do It • Host in Web role (like .NET) • Supply PHP runtime • Point to runtime via FastCGI configuration in • Web.config • Web.roleConfig • Eclipse Tooling @ http://windowsazure4e.org does the above for you PHP Web Role Instance 1 VIP Load Balancer PHP Web Role Instance 2

  8. Using PHP & Eclipse with Windows Azure Demo

  9. PHP + Cloud Storage Windows Azure Storage On-Premises VIP PHP Web Role Load Balancer PHP App SQL Azure Windows Azure Platform

  10. Windows Azure SDK for PHP @ http://phpazure.codeplex.com PHP programming model for Windows Azure Storage Features PHP classes for Blobs, Tables & Queues Store PHP sessions in Table Storage PHP with Windows Azure Storage

  11. PHP with SQL Azure • SQL Server Driver for PHP @ http://sqlsrvphp.codeplex.com/ • Supports PHP access to SQL Azure • Features • Choose between SQL Server and SQL Azure by changing connection string • Use from on-premises or in Windows Azure

  12. PHP + Cloud Storage Demo Windows Azure Storage & SQL Azure

  13. Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda

  14. Customer Showcase: Adslot • Highly scalable auction service that enables advertisers to realize significant discounts by bidding on combinations of keywords at a time • Windows Azure Adoption Drivers • Computation-Heavy • Real-time Performance • Interop between .NET and non-.NET technologies • ASP.NET • memcached, a distributed object cache

  15. memcached for ASP.NET MVC Models & Intermediate Computation Results Dynamically Scale memcached Tier Customer Showcase: Adslot VIP Load Balancer Web Role Computation Worker Role memcached Worker Role

  16. memcached Client Code

  17. memcachedSolution Accelerator • Delivered by Infosys • memcached Client (Web Role) • Uses Enyim client library • Supports “consistent” hashing, to minimize cache invalidation when nodes are added or removed • memcached Server (Worker Role)

  18. Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda

  19. MySQL: Simple Configuration VIP Load Balancer Web Role MySQL Worker Role

  20. MySQL in a Windows Azure Application • Running MySQL in a worker role • Copy MySQL to the worker role sub-directory • Copy to read-write local storage • Configure MySQL to listen on the right port • Monitor MySQL health • Consuming MySQL • Discover IP address and port • Normal access from then on • Handle topology changes

  21. MySQL Demo

  22. Simple Configuration VIP Load Balancer MySQL

  23. Replication VIP Load Balancer M S S MySQL MySQL MySQL

  24. Windows Azure Drive with Hot Spare VIP Load Balancer MySQL MySQL

  25. Windows Azure Drive with Hot Spare VIP Load Balancer MySQL MySQL

  26. Built by our partner, Infosys Master/slave configurations in a worker role Leverage Windows Azure Drive Master election and replication on startup Failover and recovery Scale up/down slaves Periodic backups - full and incremental Available with source code MySQL Solution Accelerator

  27. MySQL Solution Accelerator Demo

  28. Administering MySQL • Some users prefer a command-line • Instance Manager solution accelerator • Built by our partner Infosys • Command-line access to worker role instances • Server runs in each worker role instance • Client runs in a web role Worker Worker

  29. Instance ManagerSolution Accelerator Demo

  30. Solution Accelerators • MySQL and Memcached • Best-practice deployments • Leverage Windows Azure primitives: • Windows Azure Drive • Windows Azure storage • Discovering IP addresses, other servers, lifecycle • Dynamic Scaling, Failover, and Upgrades • Automation of application lifecycle • Instance Manager for remote command

  31. Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda

  32. Powers Wikipedia PHP-based, usually with MySQL and Memcached Used by many companies Internal knowledge management Content management system (CMS) Windows Azure benefits Support traffic spikes Support unpredictable growth Minimize possibility of data loss Minimize downtime Spotlight: MediaWiki

  33. Technology Requirements Web server w/PHP support, MySQL for storage, memcached for caching query results What we’ve added : phpMyAdmin and Instance Manager Spotlight: MediaWiki MySQL 1 MySQL 2 Worker Role MySQL Solution Accelerator VIP Load Balancer Instance Manager PhpMyAdmin Mediawiki MCached_1 Memcached Solution Accelerator MCached_2 MCached_3 Worker Role Web Roles

  34. Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda

  35. Mobile consumer application that allows people to share and view their location in real-time Windows Azure Adoption Drivers Support spiky traffic Automated service management Geo-availability Ease of development Customer Showcase: Glympse

  36. Technical Requirements MySQL backend for storing tour data, memcached for caching, phpfor displaying results to web Customer Showcase: Glympse MySQL Worker Role FE_3 MCached_1 VIP Load Balancer FE_2 MCached_2 FE_1 MCached_3 Worker Role Web Role

  37. Glympse Demo

  38. Benefits of Database as a Service SQL Azure Database as a Service MySQL Solution Accelerator Compatibility w/ MySQL apps Pre-configured clustering across multiple compute instances Database maintenance required Metered by compute hour • Lower TCO • Automatic High Availability • Multiple servers with live copies of your data --- instant failover • Automatic Fault-Tolerance • Automatic maintenance • No downtime • Instantly expand/contract databases to meet application needs • Metered by database • Mission-critical SQL Server foundation • Clear commitment to OSS support and application compatibility • SQL Azure is our strategic investment for the Windows Azure Platform

  39. Powerful platform primitives Support for PHP and Eclipse Accelerators for MySQL and Memcached In use in real-world applications Takeaways

  40. Call To Action • Windows Azure Monitoring, Logging, and Management APIs – 11/18 (11:00 AM) • Windows Azure Tables and Queues Deep Dive – 11/18 (3:00 PM) • Windows Azure Blobs and Drives Deep Dive – 11/18 (4:30 PM) • Automating the Application Lifecycle with Windows Azure – 11/19 (10:00 AM)

  41. YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com

  42. Learn More On Channel 9 • Expand your PDC experience through Channel 9 • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses channel9.msdn.com/learn Built by Developers for Developers….

More Related