43
5/30/22 | SLIDE 1

Running PHP In The Cloud

Embed Size (px)

DESCRIPTION

An introduction to running PHP on Windows Azure

Citation preview

Page 1: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 1

Page 2: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 2

www.realdolmen.com

Running PHP in the cloud

Maarten Balliauw – RealDolmenE-mail: [email protected]

Blog: http://blog.maartenballiauw.be Twitter: @maartenballiauw

Page 3: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 3

WHO AM I?

Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web

ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, … MVP ASP.NET

Interested in interoperability PHPExcel, PHPLinq, Windows Azure SDK for PHP, ...

http://blog.maartenballiauw.be http://twitter.com/maartenballiauw

Page 4: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 4

Page 5: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 5

AGENDA

Windows Azure? Application architecture Using PHP with Windows Azure Demo time! Resources Q&A

Page 6: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 6

What’s in the cloud?WINDOWS AZURE

Page 7: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 7

DEFINITION OF CLOUD (NIST)

On-demand self service Standardized access Location independant resource pooling Rapid elasticity Pay per use

Page 8: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 8

IT AS A SERVICE

Private(On-Premise)

Infrastructure

(as a Service)

Platform(as a

Service)

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

man

age

Managed by vendor

Managed by vendor

You

man

age

You

man

age

Page 9: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 9

THE WINDOWS AZURE PLATFORM

Windows Azure SQL Azure Windows Azure platform AppFabric Microsoft Codename “Dallas”

Developer tools

Page 10: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 10

AZURE SERVICE PLATFORM

Windows Azure is an Operating System as a Service for the Cloud.

Compute – auto-provisioning 64-bit application containers in Windows Server VMs; supports a wide range of application models

Storage – highly available distributed table, blob, queue, & cache

Languages – .NET 3.5 (C#, VB.NET, etc.), IronRuby, IronPython, PHP, native Win32 code

SQL Azure is a Relational Database for the Cloud.

RDBMS – Tables, Views, Indexes, Stored Procedures, Triggers, ...

Programmability – Managed ADO.NET data access, native ODBC, support for PHP

Tools – SQLCMD and the SQL Azure Database account portal

AppFabric is the glue between on-premises and the cloud.

Service Bus – connectivity to on-premises applications; secure, federated fire-wall friendly Web services messaging intermediary; durable & discoverable queues

Identity Management – rules-driven federated identity; AD federation; claims-based authorization

Live Services is a building block within the Azure Services Platform.

Live Mesh

Live ID

Live Contacts

Live …

Live Services

Page 11: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 11

WINDOWS AZURE

Flexible application hosting Lights-out service management

Provide code & service model, hit ENTER

Storage at massive scale Blobs, tables, queues

Compute StorageManagement

There’s an SDK for this: http://phpazure.codeplex.com

Page 12: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 12

WINDOWS AZURE

Page 13: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 13

SQL AZURE

Relational database as a service Highly available, automatically maintained

Extension of the SQL Server Data Platform

Database

Business AnalyticsReporting Data Sync

There’s a driver for this: http://sqlsrvphp.codeplex.com

Page 14: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 14

SQL AZURE

Relational database, provided as a service Highly symmetrical development and tooling experience (use

TDS protocol and T-SQL) Highly scaled out, on commodity hardware Built on the SQL Server technology foundation

Beyond “hosted database” High availability, DB provisioning, and DB management are

provided by the service Pay for what you use

Page 15: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 15

WINDOWS AZURE APPFABRIC

Secure connections between services Across organizational boundaries

Claims-based access control

ServiceBus

AccessControl

There’s an SDK for this: http://dotnetservicesphp.codeplex.com/

Page 16: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 16

WINDOWS AZURE APPFABRIC - SERVICE BUS

Securely connect applications Over the internet Across any network topology Across organizational boundaries

Primary application patterns Eventing:

Notify applications and/or devices Service Remoting:

Securely project on-premises services out to the cloud Tunneling:

App-to-app communication with NAT/Firewall traversal

Page 17: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 17

SERVICE BUS OVERVIEW

Page 18: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 18

MICROSOFT CODENAME “DALLAS”

Content brokerage and discovery platform Available as a CTP at commercial launch

Microsoft Codename “Dallas”

Information Services

Page 19: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 19

Page 20: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 20

Page 21: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 21

What’s in the cloud?WINDOWS AZURE APPLICATION ARCHITECTURE

What would a typical cloud application look like?

Page 22: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 22

TYPICAL ARCHITECTURE ON AZURE

Windows Azure Storage (Blob, Table, Queue)

VIP Web

RoleWorker

Role

Service Unavailable

Page 23: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 23

WEB + WORKER ROLE SERVICE MODEL

Windows Azure Storage (Blob, Table, Queue)

Worker RoleWeb

Role

VIP

Web Role

Worker Role

Worker Role

Worker Role

Worker RoleService Still Available

Page 24: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 24

What’s in the cloud?USING PHP WITH WINDOWS AZURE

Page 25: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 25

Your CloudApplication

XML

SOAP

REST

Windows Azure Platform

Developers

End Users

Other Development Platforms

ENABLING INTEROPERABILITY

PHP, Java, Ruby SDKs for AppFabric

PHP and Java SDKs for Windows Azure

Your Software

Application

XML

SOAP

REST

.NET SDKs

Page 26: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 26

USING PHP WITH WINDOWS AZURE

It’s all about…

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

Page 27: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 27

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 athttp://windowsazure4e.org does the above for you

PHP Web RoleInstance 2

VIP

Load

Bala

nce

r

PHP Web RoleInstance 1

Page 28: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 28

DEVELOPER TOOLS

Development Use your favourite editor

Local debugging Windows with IIS 7.x Visual Studio Windows Azure tools for Eclipse

Packaging Windows Azure SDK

Deployment Any browser

I’m whining for this one!

Page 29: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 29

PHP + CLOUD STORAGE

PHPWeb Role

VIP

Load

Bala

nce

r

Windows Azure Storage

SQL Azure

PHP App

Windows Azure Platform

On-Premis

e

Page 30: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 30

PHP WITH WINDOWS AZURE STORAGE

Windows Azure SDK for PHP at http://phpazure.codeplex.com

PHP programming model for Windows Azure Storage

Features PHP classes for Blobs, Tables & Queues Store PHP sessions in Table Storage File system wrapper for Blob Storage

Page 31: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 31

PHP Runtime

WINDOWS AZURE SDK FOR PHP

Overview Enables PHP developers to take

advantage of the Microsoft Cloud Services Platform  – Windows Azure.  

Open source project being contributed to Zend Framework (http://framework.zend.com)

Features PHP classes for Windows Azure

Blobs, Tables & Queues (for CRUD operations)

Helper Classes for HTTP transport, AuhN/AuthZ, REST & Error Management

Manageability, Instrumentation & Logging support

Project site: http://phpazure.codeplex.com/

Logical architecture

Deployment scenarios

Windows Azure SDK for PHP

Blobs, Tables, Queues

Manageability, Instrumentation,

logging

Helper for Http, Auth, REST,

Error

Your PHP application

Compute Storage Manage

REST

Any internet connected Server

PHP RuntimeREST

REST

Windows Azure SDK for PHP

Blobs, Tables, Queues

Manageability, Instrumentation,

logging

Helper for Http, Auth, REST, Error

Your PHP application

Windows Azure SDK for PHP

Blobs, Tables, Queues

Manageability, Instrumentation,

logging

Helper for Http, Auth, REST, Error

Your PHP application

Page 32: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 32

PHP WITH SQL AZURE

SQL Server Driver for PHP at 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-premise apps or in Windows Azure

Page 33: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 33

PHP WITH APPFABRIC

AppFabric SDK for PHP developers athttp://dotnetservicesphp.codeplex.com/

Supports PHP on service bus and access control

Features Expose on-premise apps on an external endpoint without

opening firewall Pub/sub scenario’s …

Page 34: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 34

SOLUTION ACCELERATORS

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

Memcached http://code.msdn.microsoft.com/winazurememcached

MediaWiki http://code.msdn.microsoft.com/winazuremediawiki

Tomcat http://code.msdn.microsoft.com/winazuretomcat

Page 35: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 35

What’s in the cloud?DEMOSFinally!

Page 36: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 36

DEMOS

Eclipse Tools for Windows Azure Windows Azure SDK for PHP

And a demo app!

Page 37: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 37

IMAGECLOUD

Upload your images! Free, unlimited storage! Images stored in multiple formats! Delivered trough a high-speed

content-delivery network!

Repurposed adaptive functionality! Empowered best-of-breed methodology! Virtualized granular service! Integrated cloud-based deliverable!

ImageCloud

Page 38: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 38

IMAGECLOUD ARCHITECTURE

WebRole

Worker Role

Table Storage

Blob Storage

Queue Service

Computation Services

Storage Services

End Users ImageCloud

Page 39: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 39

What’s in the cloud?RESOURCES

Page 40: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 40

RESOURCES Windows Azure

http://www.azure.com

Windows Azure SDK for PHPhttp://phpazure.codeplex.com

SQL Server Driver for PHPhttp://sqlsrvphp.codeplex.com

AppFabric SDK for PHP developershttp://dotnetservicesphp.codeplex.com

PDChttp://microsoftpdc.com

PHP Architect December 2009 issuehttp://www.phparch.com

Steve Marxhttp://blog.smarx.com/

Clemens Vastershttp://vasters.com/clemensv/

Simon Guesthttp://simonguest.com/blogs/smguest

My bloghttp://blog.maartenballiauw.be/category/Azure.aspx

RealDolmen blogs is running on Azure!http://www.realdolmenblogs.com

Page 41: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 41

BEFORE SKIPPING TO Q&A...

Do I need Visual Studio / Eclipse? Only for local debugging.

Do I need Windows & the Windows Azure SDK? Only for packaging. I’ll keep whining to make this available on Linux.

Page 42: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 42

QUESTIONS, POSSIBLY ANSWERS…

?Maarten Balliauw – RealDolmen

Blog: http://blog.maartenballiauw.beTwitter: @maartenballiauw

Page 43: Running PHP In The Cloud

APRIL 11, 2023 | SLIDE 43

THANK YOU!

Maarten Balliauwhttp://blog.maartenballiauw.be