Just another WordPress weblog, but more cloudyMaarten Balliauw – RealDolmenE-mail: maarten.balliauw@realdolmen.comBlog: http://blog.maartenballiauw.beTwitter: @maartenballiauw
Who am I?Maarten BalliauwAntwerp, Belgiumwww.realdolmen.comFocus on webASP.NET, ASP.NET MVC, PHP, Azure, VSTS, …MVP ASP.NETInterested in interoperabilityPHPExcel, PHPLinq, Windows Azure SDK for PHP, ...http://blog.maartenballiauw.behttp://twitter.com/maartenballiauw
AgendaCloud computing?Windows Azure?Application architectureUsing PHP with Windows AzureWordpressResourcesQ&A
What’s in the cloud?Cloud Computing
What is Cloud Computing ?What is cloud computing ?Offering infrastructure, platform and software as a service over the internet to a global market.Move on-premises management of non functional IT assets to a provider.Difference from traditional hostingsSold on demand “pay as you grow”Elastic scalabilityService is fully managed by the providerEnd user centric (IW or developer)Strong focus on integration (cloud-cloud or cloud-on-premises)
Definition of cloud (NIST)On-demand self serviceStandardized accessLocation independant resource poolingRapid elasticityPay per use
IT as a ServicePrivate(On-Premise)Infrastructure(as a Service)Platform(as a Service)You manageApplicationsApplicationsApplicationsYou manageRuntimesRuntimesRuntimesSecurity & IntegrationSecurity & IntegrationSecurity & IntegrationManaged by vendorYou manageDatabasesDatabasesDatabasesServersServersServersManaged by vendorVirtualizationVirtualizationVirtualizationServer HWServer HWServer HWStorageStorageStorageNetworkingNetworkingNetworking
What’s in the cloud?Windows Azure
The Windows Azure PlatformWindows AzureSQL AzureWindows Azure platform AppFabricMicrosoft Codename “Dallas”Developer tools
Azure Service PlatformWindows 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 codeSQL 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 portalAppFabric 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 authorizationLive Services is a building block within the Azure Services Platform.Live Mesh
Live ID
Live Contacts
Live …Live Services
Windows AzureFlexible application hostingLights-out service managementProvide code & service model, hit ENTERStorage at massive scaleComputeStorageManagementThere’s an SDK for this: http://phpazure.codeplex.com
Windows Azure
SQL AzureRelational database as a serviceHighly available, automatically maintainedExtension of the SQL Server Data PlatformBusiness AnalyticsReportingData SyncDatabaseThere’s a driver for this: http://sqlsrvphp.codeplex.com
SQL AzureRelational database, provided as a serviceHighly symmetrical development and tooling experience (use TDS protocol and T-SQL)Highly scaled out, on commodity hardwareBuilt on the SQL Server technology foundationBeyond “hosted database”High availability, DB provisioning, and DB management are provided by the servicePay for what you use
Windows Azure AppFabricSecure connections between servicesAcross organizational boundariesClaims-based access controlServiceBusAccessControlThere’s an SDK for this: http://dotnetservicesphp.codeplex.com/
Windows Azure AppFabric - Service BusSecurely connect applicationsOver the internetAcross any network topologyAcross organizational boundariesPrimary application patternsEventing: Notify applications and/or devicesService Remoting: Securely project on-premises services out to the cloudTunneling: App-to-app communication with NAT/Firewall traversal
Service Bus Overview
Microsoft Codename “Dallas”Content brokerage and discovery platform Available as a CTP at commercial launchMicrosoft Codename “Dallas”Information Services
Developer toolsDevelopmentUse your favourite editorLocal debuggingWindows with IIS 7.xVisual StudioWindows Azure tools for EclipsePackagingWindows Azure SDKDeploymentAny browserI’m whining for this one!
What’s in the cloud?Application Architecture
Typical Architecture on AzureService UnavailableVIPWorker RoleWeb RoleWindows Azure Storage (Blob, Table, Queue)
Web + Worker Role Service ModelWorker RoleService Still AvailableWorker RoleWeb RoleVIPWorker RoleWeb RoleWorker RoleWorker RoleWindows Azure Storage (Blob, Table, Queue)
What’s in the cloud?Using PHP with Windows Azure
Using PHP with Windows AzureIt’s all about…Running PHP Code in Windows AzureEclipse ToolingBuild, Test, Deploy PHP ProjectsCreate New or Use Existing PHP ProjectsScaling PHP AppsUsing Cloud Storage from PHPUsing Windows Azure StorageUsing SQL Azure
Running PHP in Windows AzureHow to Do ItHost in Web role (like .NET)Supply PHP runtimePoint to runtime via FastCGIconfiguration inWeb.configWeb.roleConfigEclipse Tooling athttp://windowsazure4e.org does the above for youPHP Web RoleInstance 1VIPLoad BalancerPHP Web RoleInstance 2
PHP + Cloud StorageWindows Azure StorageOn-PremiseVIPPHPWeb RoleLoad BalancerPHP AppSQL AzureWindows Azure Platform
PHP with Windows Azure StorageWindows Azure SDK for PHP at http://phpazure.codeplex.comPHP programming model for Windows Azure StorageFeatures PHP classes for Blobs, Tables & QueuesStore PHP sessions in Table StorageFile system wrapper for Blob Storage
PHP with SQL AzureSQL Server Driver for PHP at http://sqlsrvphp.codeplex.com/Supports PHP access to SQL AzureFeaturesChoose between SQL Server and SQL Azure by changing connection stringUse from on-premise apps or in Windows Azure
PHP with AppFabricAppFabric SDK for PHP developers athttp://dotnetservicesphp.codeplex.com/Supports PHP on service bus and access controlFeaturesExpose on-premise apps on an external endpoint without opening firewallPub/sub scenario’s…
What’s in the cloud?WordpressFinally!
WordpressBlogging engineWidely usedEasy installationGazillion pluginsHuge community around itFree and open-source
But...Runs on top of MySQLHas no database abstraction layerSo: only runs on MySQLWindows Azure has Table Storage and SQL AzureI feellots of work coming…
There are ways around!Easy way outWordpress on Windows AzureMySQL on-premise / at other hosterMedium way outWordpress on Windows AzureMySQL as wellHard way outWordpress on Windows AzureMySQL out, SQL Azure in
The easy way outWindows Azure StorageVIPPHPWeb RoleLoad BalancerMySQLWindows Azure PlatformOn-Premise / hosted
The easy way outFresh Windows Azure project in EclipseFresh Wordpress.org downloadPoint wp-config.php to some MySQL serverPackage & deploy
The medium way outWindows Azure StorageVIPPHPWeb RoleLoad BalancerWorkerRolerunningMySQLWindows Azure PlatformOn-Premise / hosted
The medium way outFresh Windows Azure project in EclipseFresh Wordpress.org download“Windows Azure MySQL PHP Solution Accelerator”http://code.msdn.microsoft.com/winazuremysqlphpSome configurationSome angerSome configurationPoint wp-config.php to the above MySQL serverPackage & deploy
So...Yes, you can run MySQL on Windows Azure!More “solution accelerators”:MySQLhttp://code.msdn.microsoft.com/winazuremysqlphpMemcachedhttp://code.msdn.microsoft.com/winazurememcachedMediaWikihttp://code.msdn.microsoft.com/winazuremediawikiTomcathttp://code.msdn.microsoft.com/winazuretomcat
The hard way outWindows Azure StorageVIPPHPWeb RoleLoad BalancerSQL AzureWindows Azure PlatformOn-Premise / hosted
The hard way outFresh Windows Azure project in EclipseFresh Wordpress.org downloadPoint wp-config.php to SQL AzurePackage & deployFail!There’s no SQL Server / SQL Azure support in Wordpress, remember?
Have you ever looked at Wordpress?MySQL queries all over the place!“Data layer” (wp-db.php) = very thinRaw MySQL queries passed from app to dbLoggingSome other stuffThat’s nowhere near a database abstraction...
Strategic optionsRequired:Re-build wp-db.php using SQL Server Driver for PHPhttp://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspxOptions...Re-write every single query in WordpressFuture proof?Insane!Build a query translation tool, rewriting queries on-the-flyFuture proof!Insane!
Here’s what we did...Hooks in WordpressWp-contents/db.phpWp-includes/wp-db.phpStrategyCreate wp-db.php class on top of SQL Server Driver for PHPhttp://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspxCreate custom DB schema, compatible with SQL ServerBuild a query translation tool, rewriting queries on-the-flySomeone at Microsoft had this laying around
But there’s also... resourcesResourcesImages, other file uploads, ...Normally stored on server diskBut this may not survive on Windows Azure...SolutionPlugin using Windows Azure SDK for PHPStoring everything on Blob StorageServing everything from Blob StorageThere’s a CDN available!

Just Another Word Press Weblog But More Cloudy

  • 2.
    Just another WordPressweblog, but more cloudyMaarten Balliauw – RealDolmenE-mail: maarten.balliauw@realdolmen.comBlog: http://blog.maartenballiauw.beTwitter: @maartenballiauw
  • 3.
    Who am I?MaartenBalliauwAntwerp, Belgiumwww.realdolmen.comFocus on webASP.NET, ASP.NET MVC, PHP, Azure, VSTS, …MVP ASP.NETInterested in interoperabilityPHPExcel, PHPLinq, Windows Azure SDK for PHP, ...http://blog.maartenballiauw.behttp://twitter.com/maartenballiauw
  • 5.
    AgendaCloud computing?Windows Azure?ApplicationarchitectureUsing PHP with Windows AzureWordpressResourcesQ&A
  • 6.
    What’s in thecloud?Cloud Computing
  • 7.
    What is CloudComputing ?What is cloud computing ?Offering infrastructure, platform and software as a service over the internet to a global market.Move on-premises management of non functional IT assets to a provider.Difference from traditional hostingsSold on demand “pay as you grow”Elastic scalabilityService is fully managed by the providerEnd user centric (IW or developer)Strong focus on integration (cloud-cloud or cloud-on-premises)
  • 8.
    Definition of cloud(NIST)On-demand self serviceStandardized accessLocation independant resource poolingRapid elasticityPay per use
  • 9.
    IT as aServicePrivate(On-Premise)Infrastructure(as a Service)Platform(as a Service)You manageApplicationsApplicationsApplicationsYou manageRuntimesRuntimesRuntimesSecurity & IntegrationSecurity & IntegrationSecurity & IntegrationManaged by vendorYou manageDatabasesDatabasesDatabasesServersServersServersManaged by vendorVirtualizationVirtualizationVirtualizationServer HWServer HWServer HWStorageStorageStorageNetworkingNetworkingNetworking
  • 10.
    What’s in thecloud?Windows Azure
  • 11.
    The Windows AzurePlatformWindows AzureSQL AzureWindows Azure platform AppFabricMicrosoft Codename “Dallas”Developer tools
  • 12.
    Azure Service PlatformWindowsAzure 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
  • 13.
    Storage– highly availabledistributed table, blob, queue, & cache
  • 14.
    Languages – .NET3.5 (C#, VB.NET, etc.), IronRuby, IronPython, PHP, native Win32 codeSQL Azure is a Relational Database for the Cloud. RDBMS – Tables, Views, Indexes, Stored Procedures, Triggers, ...
  • 15.
    Programmability – Managed ADO.NET data access, native ODBC, support for PHP
  • 16.
    Tools – SQLCMD and the SQL Azure Database account portalAppFabric 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
  • 17.
    Identity Management –rules-driven federated identity; AD federation; claims-based authorizationLive Services is a building block within the Azure Services Platform.Live Mesh
  • 18.
  • 19.
  • 20.
  • 21.
    Windows AzureFlexible applicationhostingLights-out service managementProvide code & service model, hit ENTERStorage at massive scaleComputeStorageManagementThere’s an SDK for this: http://phpazure.codeplex.com
  • 22.
  • 23.
    SQL AzureRelational databaseas a serviceHighly available, automatically maintainedExtension of the SQL Server Data PlatformBusiness AnalyticsReportingData SyncDatabaseThere’s a driver for this: http://sqlsrvphp.codeplex.com
  • 24.
    SQL AzureRelational database,provided as a serviceHighly symmetrical development and tooling experience (use TDS protocol and T-SQL)Highly scaled out, on commodity hardwareBuilt on the SQL Server technology foundationBeyond “hosted database”High availability, DB provisioning, and DB management are provided by the servicePay for what you use
  • 25.
    Windows Azure AppFabricSecureconnections between servicesAcross organizational boundariesClaims-based access controlServiceBusAccessControlThere’s an SDK for this: http://dotnetservicesphp.codeplex.com/
  • 26.
    Windows Azure AppFabric- Service BusSecurely connect applicationsOver the internetAcross any network topologyAcross organizational boundariesPrimary application patternsEventing: Notify applications and/or devicesService Remoting: Securely project on-premises services out to the cloudTunneling: App-to-app communication with NAT/Firewall traversal
  • 27.
  • 28.
    Microsoft Codename “Dallas”Contentbrokerage and discovery platform Available as a CTP at commercial launchMicrosoft Codename “Dallas”Information Services
  • 31.
    Developer toolsDevelopmentUse yourfavourite editorLocal debuggingWindows with IIS 7.xVisual StudioWindows Azure tools for EclipsePackagingWindows Azure SDKDeploymentAny browserI’m whining for this one!
  • 32.
    What’s in thecloud?Application Architecture
  • 33.
    Typical Architecture onAzureService UnavailableVIPWorker RoleWeb RoleWindows Azure Storage (Blob, Table, Queue)
  • 34.
    Web + WorkerRole Service ModelWorker RoleService Still AvailableWorker RoleWeb RoleVIPWorker RoleWeb RoleWorker RoleWorker RoleWindows Azure Storage (Blob, Table, Queue)
  • 35.
    What’s in thecloud?Using PHP with Windows Azure
  • 36.
    Using PHP withWindows AzureIt’s all about…Running PHP Code in Windows AzureEclipse ToolingBuild, Test, Deploy PHP ProjectsCreate New or Use Existing PHP ProjectsScaling PHP AppsUsing Cloud Storage from PHPUsing Windows Azure StorageUsing SQL Azure
  • 37.
    Running PHP inWindows AzureHow to Do ItHost in Web role (like .NET)Supply PHP runtimePoint to runtime via FastCGIconfiguration inWeb.configWeb.roleConfigEclipse Tooling athttp://windowsazure4e.org does the above for youPHP Web RoleInstance 1VIPLoad BalancerPHP Web RoleInstance 2
  • 38.
    PHP + CloudStorageWindows Azure StorageOn-PremiseVIPPHPWeb RoleLoad BalancerPHP AppSQL AzureWindows Azure Platform
  • 39.
    PHP with WindowsAzure StorageWindows Azure SDK for PHP at http://phpazure.codeplex.comPHP programming model for Windows Azure StorageFeatures PHP classes for Blobs, Tables & QueuesStore PHP sessions in Table StorageFile system wrapper for Blob Storage
  • 40.
    PHP with SQLAzureSQL Server Driver for PHP at http://sqlsrvphp.codeplex.com/Supports PHP access to SQL AzureFeaturesChoose between SQL Server and SQL Azure by changing connection stringUse from on-premise apps or in Windows Azure
  • 41.
    PHP with AppFabricAppFabricSDK for PHP developers athttp://dotnetservicesphp.codeplex.com/Supports PHP on service bus and access controlFeaturesExpose on-premise apps on an external endpoint without opening firewallPub/sub scenario’s…
  • 42.
    What’s in thecloud?WordpressFinally!
  • 43.
    WordpressBlogging engineWidely usedEasyinstallationGazillion pluginsHuge community around itFree and open-source
  • 44.
    But...Runs on topof MySQLHas no database abstraction layerSo: only runs on MySQLWindows Azure has Table Storage and SQL AzureI feellots of work coming…
  • 46.
    There are waysaround!Easy way outWordpress on Windows AzureMySQL on-premise / at other hosterMedium way outWordpress on Windows AzureMySQL as wellHard way outWordpress on Windows AzureMySQL out, SQL Azure in
  • 47.
    The easy wayoutWindows Azure StorageVIPPHPWeb RoleLoad BalancerMySQLWindows Azure PlatformOn-Premise / hosted
  • 48.
    The easy wayoutFresh Windows Azure project in EclipseFresh Wordpress.org downloadPoint wp-config.php to some MySQL serverPackage & deploy
  • 49.
    The medium wayoutWindows Azure StorageVIPPHPWeb RoleLoad BalancerWorkerRolerunningMySQLWindows Azure PlatformOn-Premise / hosted
  • 50.
    The medium wayoutFresh Windows Azure project in EclipseFresh Wordpress.org download“Windows Azure MySQL PHP Solution Accelerator”http://code.msdn.microsoft.com/winazuremysqlphpSome configurationSome angerSome configurationPoint wp-config.php to the above MySQL serverPackage & deploy
  • 51.
    So...Yes, you canrun MySQL on Windows Azure!More “solution accelerators”:MySQLhttp://code.msdn.microsoft.com/winazuremysqlphpMemcachedhttp://code.msdn.microsoft.com/winazurememcachedMediaWikihttp://code.msdn.microsoft.com/winazuremediawikiTomcathttp://code.msdn.microsoft.com/winazuretomcat
  • 52.
    The hard wayoutWindows Azure StorageVIPPHPWeb RoleLoad BalancerSQL AzureWindows Azure PlatformOn-Premise / hosted
  • 53.
    The hard wayoutFresh Windows Azure project in EclipseFresh Wordpress.org downloadPoint wp-config.php to SQL AzurePackage & deployFail!There’s no SQL Server / SQL Azure support in Wordpress, remember?
  • 54.
    Have you everlooked at Wordpress?MySQL queries all over the place!“Data layer” (wp-db.php) = very thinRaw MySQL queries passed from app to dbLoggingSome other stuffThat’s nowhere near a database abstraction...
  • 55.
    Strategic optionsRequired:Re-build wp-db.phpusing SQL Server Driver for PHPhttp://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspxOptions...Re-write every single query in WordpressFuture proof?Insane!Build a query translation tool, rewriting queries on-the-flyFuture proof!Insane!
  • 56.
    Here’s what wedid...Hooks in WordpressWp-contents/db.phpWp-includes/wp-db.phpStrategyCreate wp-db.php class on top of SQL Server Driver for PHPhttp://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspxCreate custom DB schema, compatible with SQL ServerBuild a query translation tool, rewriting queries on-the-flySomeone at Microsoft had this laying around
  • 57.
    But there’s also...resourcesResourcesImages, other file uploads, ...Normally stored on server diskBut this may not survive on Windows Azure...SolutionPlugin using Windows Azure SDK for PHPStoring everything on Blob StorageServing everything from Blob StorageThere’s a CDN available!
  • 59.
    What’s in thecloud?Demo timeIf the Internet works...
  • 60.
    What’s in thecloud?Resources
  • 61.
    ResourcesWindows Azurehttp://www.azure.comWindows AzureSDK for PHPhttp://phpazure.codeplex.comSQL Server Driver for PHPhttp://sqlsrvphp.codeplex.comAppFabric SDK for PHP developershttp://dotnetservicesphp.codeplex.comPDChttp://microsoftpdc.comPHP Architect December 2009 issuehttp://www.phparch.comSteve Marxhttp://blog.smarx.com/Clemens Vastershttp://vasters.com/clemensv/Simon Guesthttp://simonguest.com/blogs/smguestMy bloghttp://blog.maartenballiauw.be/category/Azure.aspxRealDolmen blogs is running on Azure!http://www.realdolmenblogs.com
  • 62.
    AZUG.BE – AzureUser Group BelgiumFocus on the Azure Services PlatformCommunity-drivenFocus on architectureAnd developmentAnd the business value of Azurewww.azug.be
  • 63.
    And one moreannouncement...Get a free t-shirt at the Microsoft booth!
  • 64.
    Before skipping toQ&A...Is the source code available?No, not at this time.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.
  • 65.
    Questions, possibly Answers…?MaartenBalliauw – RealDolmenBlog: http://blog.maartenballiauw.beTwitter: @maartenballiauw
  • 66.