creating php cloud applications
DESCRIPTION
TRANSCRIPT
Creating PHP Cloud Applications
Cory FowlerWindows Azure Technical [email protected]
http://joind.in/8168
What is the Cloud?
A pool of self-service infrastructure and middleware components which are available on-
demand in near real-time; effectively making IT Infrastructure a
utility
Types of Cloud
IaaSOn-
Premises
SaaS
PaaSPrivateCloud
PublicCloud
Public Cloud Hybrid Cloud Private Cloud
Your Datacenter
Virtualization
O/S
Hardware
Network
Data
Applications
Firewall
Web Sites
Applications
Data
Cloud Services
Applications
Firewall Rules
Data
Virtual Network
Virtual Machines
Virtual Network
Data
Applications
Firewall Rules
O/S
Focus on the Application
Windows Azure
Paradigm Shift…
1. Hardware is a Programmable Resource2. Scale out, over Scale Up.3. Aim for Stateless (or Centralized State) applications4. Decouple application components5. Balancing act of cost, agility, reliability
Programmable Resources
demo
Programmable ResourcesWindows Azure Cross Platform CLI Tools
Environment Automation Resources
Windows Azure CLI Tools http://aka.ms/Azure-SDK-ToolsChef http://aka.ms/Chef
Scale Out, over Scale Up
Scale Out vs. Scale Up
Scale Up Scale Out
Small
Medium
Large
Medium
Medium
Medium
Medium
Medium
Medium
Enter a Load Balancer…
LB
Round RobinClient Affinity
Windows Azure Web Sites InternalsRequest Process Flow for New (Cold) Sites
AzureLB Web Site
SQL
IIS ARR (LB)
Runtime SQL
Web Server
StorageController
Windows Azure Web Sites InternalsRequest Process Flow for Existing (Hot) Sites
AzureLB Web Site
SQL
IIS ARR (LB)
Web Server
StorageController
Web Server A
Web Server A
Web Server C
Windows Azure Web Sites InternalsFTP and Web Deploy Deployment Process
AzureLB
StorageController
Deployment
Servers
Cloud Drive
Web ServerCloud Service
Blob Storage
Legend
Windows Azure Web Sites InternalsGit Deployment Process
AzureLB
StorageController
Cloud Drive
Web ServerCloud Service
Blob Storage
Legend
Supported PHP Versions
FastCGI Bring your own runtime5.4.0
5.3.13
Default Support Customized Support
Change configurations with .user.ini
Load extensions via PHP_Extensions AppSetting
Bin deploy specific PHP Runtime
Configure FastCGI Handler in Web Site Configuration
Uses local php.ini file for extensions and configurations
demo
Load Balanced Web SiteWindows Azure Web Sites
Working with Round Robin Load Balancing
Decoupling Application Components
Tightly Coupled
Store Front End
Drivers
Shipping Service
Tracking
Tightly Coupled
Store Front End
Shipping Service
Drivers
Tracking
Loosely Coupled
Store Front End
Drivers
Shipping Service
Tracking
Order Queue
Loosely Coupled
Store Front End
Order Queue Shipping Service
Drivers
Tracking
Loosely Coupled
Store Front End
Order Queue Shipping Service
Drivers
Tracking
Loosely Coupled
Store Front End
Order Queue
Tracking
Tracking
Shipping Service
Windows Azure SDK for PHP
GitHub: http://aka.ms/AZURESDK-PHP
Developer Center: http://aka.ms/Develop-PHP
Storage
Messaging
Runtime
Manage
composer.json
{ "require": { "microsoft/windowsazure": "*" }, "repositories": [ { "type": "pear", "url": "http://pear.php.net" } ], "minimum-stability": "dev"}
Service Bus Proxy
use WindowsAzure\Common\ServicesBuilder;use WindowsAzure\Common\ServiceException;use WindowsAzure\ServiceBus\models\BrokeredMessage;
$serviceBusRestProxy = ServicesBuilder::getInstance()->createServiceBusService(SERVICE_BUS_CONNECTION_STRING);
// SERVICE_BUS_CONNECTION_STRING:// Endpoint=https://[sb-namespace].servicebus.windows.net;// SharedSecretIssuer=[sb-issuer];// SharedSecretValue=[sb-access-key]
Service Bus Message (Queue)
// Create message$message = new BrokeredMessage();$message->setBody($msg);
// Send message$serviceBusRestProxy ->sendQueueMessage(QUEUE_NAME, $message);
demo
Message MeWindows Azure Service Bus Queue
Cost, Agility and Reliability
“Decoupling” other Resources
• Place static resources in Cloud Storage• Enable a Content Delivery Network (CDN)• Deploy to Multiple Data Centers• Make Geographically Redundant Back-ups
Cory FowlerWindows Azure Technical [email protected]
http://joind.in/8168
Questions?Three truths of cloud computing: hardware fails, software has bugs
and people make mistakes
Resources aka.ms/TEK13-Azure aka.ms/Tek13-Azure-Code aka.ms/WAWS-Cheat aka.ms/WAWS-PHP-Troubleshoot aka.ms/Develop-PHP aka.ms/AZURESDK-PHP aka.ms/WA-Silverlining
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to
be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.