450 likes | 587 Views
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
E N D
SVC51 Using PHP and MySQL 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 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
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 • …
Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda
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
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
PHP + Cloud Storage Windows Azure Storage On-Premises VIP PHP Web Role Load Balancer PHP App SQL Azure Windows Azure Platform
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
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
PHP + Cloud Storage Demo Windows Azure Storage & SQL Azure
Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda
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
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
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)
Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda
MySQL: Simple Configuration VIP Load Balancer Web Role MySQL Worker Role
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
MySQL Demo
Simple Configuration VIP Load Balancer MySQL
Replication VIP Load Balancer M S S MySQL MySQL MySQL
Windows Azure Drive with Hot Spare VIP Load Balancer MySQL MySQL
Windows Azure Drive with Hot Spare VIP Load Balancer MySQL MySQL
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
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
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
Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda
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
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
Interoperability PHP & Eclipse memcached MySQL Customer Showcases Technology Drilldowns Agenda
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
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
Glympse Demo
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
Powerful platform primitives Support for PHP and Eclipse Accelerators for MySQL and Memcached In use in real-world applications Takeaways
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)
YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com
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….