windows azure platform + php - jonathan wong

41
Windows Azure Platform + PHP Jonathan Wong Microsoft Innovation Centre Singapore innovativesingapore.com | twitter.com/innovativesg

Upload: spiffy

Post on 13-May-2015

9.154 views

Category:

Technology


1 download

DESCRIPTION

Presentation by Jonathan Wong at PHP User Group Meetup (Apr 27, 2010) .

TRANSCRIPT

Page 1: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure Platform + PHP

Jonathan WongMicrosoft Innovation Centre Singapore

innovativesingapore.com | twitter.com/innovativesg

Page 2: Windows Azure Platform + PHP - Jonathan Wong

The Non-Cloud View

TIME

IT C

APAC

ITY

Actual Load

Allocated IT-

capacities

“Waste“ of capacities

“Under-supply“ of capacities

Fixed cost of IT-capacities

Load Forecast

Barrier forinnovations

Page 3: Windows Azure Platform + PHP - Jonathan Wong

Actual Load

Allocated IT capacities

Reduction of initial

investments

Reduction of “over-

supply“

No “under-supply“

Possible reduction of IT-capacities

in case of reduced load

TIME

IT C

APAC

ITY

Load Forecast

However, In a Cloud View

Page 4: Windows Azure Platform + PHP - Jonathan Wong

The Microsoft Cloud

Quincy, WA Chicago, IL San Antonio, TX Dublin, Ireland Generation 4 DCs

~100 Globally Distributed Data Centers

Page 5: Windows Azure Platform + PHP - Jonathan Wong

The Microsoft Cloud

Page 6: Windows Azure Platform + PHP - Jonathan Wong

Introducing the Windows Azure Platform

Page 7: Windows Azure Platform + PHP - Jonathan Wong

Private(On-Premise)

Infrastructure

(as a Service)

Platform(as a

Service)

Types of Clouds

Storage

Server HW

Networking

Servers

Databases

Virtualization

Runtimes

Applications

Security & Integration

Storage

Server HW

Networking

Servers

Databases

Virtualization

Runtimes

Applications

Security & Integration

Storage

Server HW

Networking

Servers

Databases

Virtualization

Runtimes

Applications

Security & Integration

You m

anage M

anaged b

y v

endor

Managed b

y v

endor

You m

anage

You m

anage

Page 8: Windows Azure Platform + PHP - Jonathan Wong

Private(On-Premise)

Types of Clouds

Infrastructure

(as a Service)

Platform(as a

Service)

Page 9: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure for Application Developers

Portal HostedService

Storage

SDK

Develop Deploy Run

Page 10: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure Compute Roles

Role

Code Configuration

Page 11: Windows Azure Platform + PHP - Jonathan Wong

Web vs. Worker Role

Web Role

IIS Host

Your Code

Worker Role

System Host

Your Code

Page 12: Windows Azure Platform + PHP - Jonathan Wong

Sample Application Architecture

Web Role Worker Role

Blob

Queue

http://yourapp.cloudapp.net

Page 13: Windows Azure Platform + PHP - Jonathan Wong

Development Fabric and Storage

Local Machine

Windows Azure Simulation Environment

Development Fabric Development Storage

Page 14: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure Developer Portal

Page 15: Windows Azure Platform + PHP - Jonathan Wong

How does Windows Azure Work with PHP?>Running PHP in Windows Azure

Page 16: Windows Azure Platform + PHP - Jonathan Wong

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

PHP Web RoleInstance 2

VIP

Load

Bal

ance

r

PHP Web RoleInstance 1

Page 17: Windows Azure Platform + PHP - Jonathan Wong

This is all you need!

\HelloCloudPHPServiceDefinition.csdefServiceConfiguration.cscfg\WebRole

web.roleconfigweb.config\phpindex.php <your php application>etc...

Make sure you change your php.ini to use

relative paths!

Page 18: Windows Azure Platform + PHP - Jonathan Wong

How does Windows Azure Work with PHP?>Running PHP in Windows Azure

>Windows Azure Tools for Eclipse

>Windows Azure Command Line Tools for PHP

Page 19: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure Tools for Eclipse

>http://windowsazure4e.org

Page 20: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure Command-Line Tools for PHP

> Create new applications or convert existing PHP applications to Windows Azure applications

> Deploy to Local Development Fabric or the Windows Azure Cloud

> No IDE required

> http://azurephptools.codeplex.com/

Page 21: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure Command-Line Tools for PHP

C:\>php package.php--project=MyProject--source=..\php_source\--phpRuntime="C:\Program Files\PHP\“--target="..\workspace\“--runDevFabric

Page 22: Windows Azure Platform + PHP - Jonathan Wong

How does Windows Azure Work with PHP?>Running PHP in Windows Azure

>Windows Azure Tools for Eclipse

>Windows Azure Command Line Tools for PHP

>PHP with Windows Azure Storage

>PHP with SQL Azure

Page 23: Windows Azure Platform + PHP - Jonathan Wong

PHP + Cloud Storage

PHPWeb Role

VIP

Load

Bal

ance

r

Windows Azure Storage

SQL Azure

PHP App

Windows Azure Platform

On-Premises

Page 24: Windows Azure Platform + PHP - Jonathan Wong

PHP with Windows Azure Storage

>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

Page 25: Windows Azure Platform + PHP - Jonathan Wong

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

Page 26: Windows Azure Platform + PHP - Jonathan Wong

Migrate MySQL DB to SQL AzureUsing the SQL Server Migration Assistant for MySQL

>http://www.microsoft.com/downloads/details.aspx?FamilyID=0e6168b0-2d0c-4076-96c2-60bd25294a8e

SQL AzureDatabase

SQL Server Migration Assist for MySQL

MySQL Databas

e

Page 27: Windows Azure Platform + PHP - Jonathan Wong

How does Windows Azure Work with PHP?>Running PHP in Windows Azure

>Windows Azure Tools for Eclipse

>Windows Azure Command Line Tools for PHP

>PHP with Windows Azure Storage

>PHP with SQL Azure

>Running MySQL in Windows Azure

Page 28: Windows Azure Platform + PHP - Jonathan Wong

Running MySQL in Windows Azure

>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

Page 29: Windows Azure Platform + PHP - Jonathan Wong

Simple Configuration

VIP

Load Balancer

MySQL

Web Role

Worker Role

Page 30: Windows Azure Platform + PHP - Jonathan Wong

Replication

VIP

Load Balancer

MySQL MySQLMySQL

MS S

Web Role

Worker Roles

Page 31: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure Drive with Hot Spare

VIP

Load Balancer

MySQL MySQL

Web Role

Worker Roles

Windows AzureStorage

Page 32: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure MySQL PHP Solution Accelerator

> http://code.msdn.microsoft.com/winazuremysqlphp

> 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

Page 33: Windows Azure Platform + PHP - Jonathan Wong

How does Windows Azure Work with PHP?>Running PHP in Windows Azure

>Windows Azure Tools for Eclipse

>Windows Azure Command Line Tools for PHP

>PHP with Windows Azure Storage

>PHP with SQL Azure

>Running MySQL in Windows Azure

>Solution Accelerators

Page 34: Windows Azure Platform + PHP - Jonathan Wong

Solution Accelerators

> http://www.microsoft.com/windowsazure/interop/

> memcached, Tomcat, MediaWiki Solution Accelerators, plus others in the future

> Solution Accelerators are 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

Page 35: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure Pricing – Compute Services

Variable instance sizes to handle complex workloads of any size

Small

$0.12 per service hour

Medium

$0.24 per service hour

Large

$0.48 per service hour

X Large

$0.96 per service hour

Unit of Compute Defined

Equivalent compute capacity of a 1.6Ghz processor (on 64bit platform)

1.6 GHz(moderate IO)

1.75 GB Memory250 GB Instance Storage

Small

2 x 1.6 GHz(high IO)

3.50 GB Memory500 GB Instance Storage

Medium

4 x 1.6 GHz(high IO)

7 GB Memory1000 GB Instance Storage

Large

8 x 1.6 GHz(high IO)

14 GB Memory2000 GB Instance Storage

X Large

Page 36: Windows Azure Platform + PHP - Jonathan Wong

Windows Azure Pricing – Other Services

BandwidthPer GB transfer in or out of a datacenterUS/EU Bandwidth = $0.10 in / $0.15 out / GB Asia Pacific = $0.30 in / $0.45 out / GB

Windows Azure StoragePer GB stored & transactionsBlob & table $0.15 / GBStorage Access = $0.10 / 100K Transactions

Web Edition Per DB per MonthUp to 1GB DB $9.99 + BW charges

Business EditionPer DB per MonthUp to 10GB DB$99.99 + BW charges

Data Transfers Windows Azure and SQL Azure data transfers within a sub-region are not subject to BW charges

Service BusPer connection/month$3.00 connection/month(multi connection packs avail)

Access ControlPer AC transactions/month$.015/100K AC transactions(pay per use basis)

Page 37: Windows Azure Platform + PHP - Jonathan Wong

Offers & Promotions

Development Accelerator Designed to accelerate cloud app development. Flexible (on/off) consumption for scaling. Predictable payment and discounted price.

•6 month subscription (38%-45% discount)

•Offered as a unit (can order multiple units)

•Cancel first 30 days; anytime after first 6 months

•Overage at Standard Consumption rates

CORE ($59.95/month)

Amount Included in BaseCompute 750 hrs/mo Storage 10 GB/mo Storage Transactions 1M/mo NET - Messages 1M/moData Transfers 7 GB In / 14 GB Out

EXTENDED ($109.95/month)

Amount Included in BaseSame as Core except also includes 1 SQL Azure Business Edition DB (10 GB)

Introductory Free Offer No-cost developer starter offer. Provides no-cost allocation to run a cloud service.

•Available to all partner/customers

•Limit of one per customer

•Overage at Standard Consumption rates

NO-COSTWindows AzureCompute 25 Hrs/monthStorage 0.5 GB/monthBandwidth 0.5 GB/monthStorage Transactions 10K/month

SQL Azure1 Web Edition DB (1GB DB) 90 day trial

Service Bus and Access Control Service Messages 100K/mo

MSDN Premium Mobilize committed .NET developer base. Enable them to build, deploy, manage multiple cloud projects w/in MSDN subscription.

• Available to MSDN Premium subscribers with limit of one per subscription (one per Windows Live ID)

• 12-month term

• Overage at partner Consumption rates

• Limited time to sign up (thru 6/30/10)

• After 6/30/10 quantities may be reduced

NO-COSTWindows AzureCompute 750 hrs Storage 10 GBStorage Transaction 1M

SQL Azure - 3 Web DB (1 GB)

Service Bus and Access Control Service Messages 1 Million

Data Transfer 7GB In/14GB Out

Page 38: Windows Azure Platform + PHP - Jonathan Wong

Sign up at the Windows Azure Platform developers’ portal

Windows Azure accessDeveloper tools White papersSample applications

Plan pilot applications, proofs of concept, and architectural design sessions with Windows Azure partners

http://www.windowsazure.com

Page 39: Windows Azure Platform + PHP - Jonathan Wong

Lastly, Microsoft can help your company!

BizSpark• www.bizspark.com

• For startups– Less than 3 years old– Less than USD 1M in annual

revenue– Must make software product or

service

• You get a bunch of free stuff (software, support, visibility)

• Free Windows Azure usage (up to a certain limit)

WebsiteSpark• www.websitespark.com

• For companies that build web sites and applications for their customers– Less than 10 employees

• You get a bunch of free stuff (software, support, visibility)

• No Windows Azure usage unfortunately…

Page 40: Windows Azure Platform + PHP - Jonathan Wong

Learn and BuildFree Training on the Microsoft Web Platform

Interested in learning how new innovations in Microsoft's Web Platform and developer tools like ASP.NET 4 and Visual Studio 2010 can make you a more productive web developer?

If you're currently working with PHP, Ruby, ASP or older versions of ASP.NET and want to hear how you can create amazing websites more easily, then register for a Web Camp near you today!

REGISTER TODAY! http://www.webcamps.ms/#singapore_panel

4 -5 June 2010Singapore

function WebCamps() {    Day1.Learn();    Day2.Build(); } /* Life Runs On Code */

Page 41: Windows Azure Platform + PHP - Jonathan Wong

Thank You!

innovativesingapore.com twitter.com/innovativesg

© 2010 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.