Just another Wordpress weblog,but more cloudy<br />WUX211<br />Maarten Balliauw<br />@maartenballiauw<br />
While working together with Microsoft on the Windows Azure SDK for PHP, we found that we needed an popular example applica...
Maarten Balliauw<br />Maarten Balliauw is a technical consultant in web technologies at RealDolmen, one of Belgium's bigge...
Start with the title slide<br />Keep the two hidden slides(#2&#3) for speaker and session description<br />Use the “Demo” ...
Who am I?<br />Maarten Balliauw<br />Antwerp, Belgium<br />www.realdolmen.com<br />Focus on web<br />ASP.NET, ASP.NET MVC,...
Agenda<br />Cloud computing?<br />Windows Azure?<br />Application architecture<br />Using PHP with Windows Azure<br />Word...
What’s in the cloud?<br />Cloud Computing<br />
What is Cloud Computing ?<br />What is cloud computing ?<br />Offering infrastructure, platform and software as a service ...
Definition of cloud (NIST)<br />On-demand self service<br />Standardized access<br />Location independant resource pooling...
IT as a Service<br />You manage<br />Private<br />(On-Premise)<br />Infrastructure<br />(as a Service)<br />Platform<br />...
Microsoft’s cloud<br />Windows Azure<br />
The Windows Azure Platform<br />Windows Azure<br />SQL Azure<br />Windows Azure platform AppFabric<br />Microsoft Codename...
Windows Azure<br />Flexible application hosting<br />Lights-out service management<br />Provide code & service model, hit ...
Windows Azure<br />
Windows Azure Data Storage<br />Queue<br />Blob<br />Account<br />Tables<br />Drives<br />
Storage options<br />Blobs, tables, queues<br />Windows Azure Drive (a.k.a. XDrive)<br />Virtual NTFS volume that can be m...
SQL Azure<br />Relational database as a service<br />Highly available, automatically maintained<br />Extension of the SQL ...
SQL Azure<br />Relational database, provided as a service<br />Highly symmetrical development and tooling experience (use ...
Windows Azure AppFabric<br />Secure connections between services<br />Across organizational boundaries<br />Claims-based a...
Service Bus Overview<br />
Windows Azure AppFabric - Service Bus<br />Securely connect applications<br />Over the internet<br />Across any network to...
PortBridge - http://bit.ly/bCDrUs<br />Bridge TCP over Service Bus<br />A fun usage scenario…<br />
Microsoft Codename “Dallas”<br />Content brokerage and discovery platform <br />Available as a CTP<br />Microsoft Codename...
Microsoft Codename “Sydney” - Connectivity<br />WINDOWS AZURE PLATFORM<br />ENTERPRISE<br />Data Service<br />Service Bus<...
Developer tools<br />Development<br />Use your favourite editor<br />Local debugging<br />Windows with IIS 7.x<br />Visual...
Your typical cloud application<br />Application architecture<br />
Typical Architecture on Azure<br />Service Unavailable<br />VIP<br />Worker Role<br />Web Role<br />Windows Azure Storage ...
Web + Worker Role Service Model<br />Worker Role<br />Service Still Available<br />Worker Role<br />Web Role<br />VIP<br /...
How about that?<br />PHP & Windows Azure<br />
It’s all about…<br />Running PHP Code in Windows Azure<br />Eclipse Tooling<br />Build, Test, Deploy PHP Projects<br />Cre...
Running PHP in Windows Azure<br />How to Do It<br />Host in Web role (like .NET)<br />Supply PHP runtime<br />Point to run...
PHP + Cloud Storage<br />Windows Azure Storage<br />VIP<br />On-Premise<br />Load Balancer<br />PHP<br />Web Role<br />PHP...
PHP with Windows Azure Storage<br />Windows Azure SDK for PHP at http://phpazure.codeplex.com<br />PHP programming model f...
PHP with SQL Azure<br />SQL Server Driver for PHP at http://sqlsrvphp.codeplex.com/<br />Supports PHP access to SQL Azure<...
PHP with AppFabric<br />AppFabric SDK for PHP developers athttp://dotnetservicesphp.codeplex.com/<br />Supports PHP on ser...
Finally!<br />Wordpress<br />
Blogging engine<br />Widely used<br />Easy installation<br />Gazillion plugins<br />Huge community around it<br />Free and...
Runs on top of MySQL<br />Has no database abstraction layer<br />So: only runs on MySQL<br />Windows Azure has Table Stora...
Easy way out<br />Wordpress on Windows Azure<br />MySQL on-premise / at other hoster<br />Medium way out<br />Wordpress on...
The easy way out<br />Windows Azure Storage<br />VIP<br />Load Balancer<br />PHP<br />Web Role<br />MySQL<br />Windows Azu...
The easy way out<br />Fresh Windows Azure project in Eclipse<br />Fresh Wordpress.org download<br />Point wp-config.php to...
The medium way out<br />Windows Azure Storage<br />VIP<br />Load Balancer<br />PHP<br />Web Role<br />WorkerRole<br />runn...
Fresh Windows Azure project in Eclipse<br />Fresh Wordpress.org download<br />“Windows Azure MySQL PHP Solution Accelerato...
BUT!<br />Instance count!<br />Pricing!<br />(5 x 240 EUR / month adds up...)<br />Easier migration, but at a cost...<br /...
Yes, you can run MySQL on Windows Azure!<br />More “solution accelerators”:<br />MySQL<br />http://code.msdn.microsoft.com...
The hard way out<br />Windows Azure Storage<br />VIP<br />Load Balancer<br />PHP<br />Web Role<br />SQL Azure<br />Windows...
Fresh Windows Azure project in Eclipse<br />Fresh Wordpress.org download<br />Point wp-config.php to SQL Azure<br />Packag...
MySQL queries all over the place!<br />“Data layer” (wp-db.php) = very thin<br />Raw MySQL queries passed from app to db<b...
Required:<br />Re-build wp-db.php using SQL Server Driver for PHP<br />http://www.microsoft.com/sqlserver/2005/en/us/PHP-D...
Hooks in Wordpress<br />Wp-contents/db.php<br />Wp-includes/wp-db.php<br />Strategy<br />Create wp-db.php class on top of ...
Resources<br />Images, other file uploads, ...<br />Normally stored on server disk<br />But this may not survive on Window...
If the Internet works...<br />
Learn more!<br />Resources<br />
Resources<br />Windows Azurehttp://www.azure.com<br />Windows Azure SDK for PHPhttp://phpazure.codeplex.com<br />SQL Serve...
Windows Azure is<br />Operating system (computing & storage)<br />SQL Azure<br />AppFabric<br />Codename projects<br />You...
Is the source code available?<br />No, not at this time.<br />Do I need Visual Studio / Eclipse?<br />Only for local debug...
Maarten Balliauwhttp://blog.maartenballiauw.be<br />
Upcoming SlideShare
Loading in...5
×

Just another Wordpress weblog, but more cloudy

4,419

Published on

While working together with Microsoft on the Windows Azure SDK for PHP, we found that we needed an popular example application hosted on Microsoft’s Windows Azure. Wordpress was an obvious choice, but not an obvious task. Learn more about Windows Azure, the PHP SDK that we developed, SQL Azure and about the problems we faced porting an existing PHP application to Windows Azure.

Published in: Technology
2 Comments
3 Likes
Statistics
Notes
No Downloads
Views
Total Views
4,419
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
46
Comments
2
Likes
3
Embeds 0
No embeds

No notes for slide

Just another Wordpress weblog, but more cloudy

  1. 1. Just another Wordpress weblog,but more cloudy<br />WUX211<br />Maarten Balliauw<br />@maartenballiauw<br />
  2. 2. While working together with Microsoft on the Windows Azure SDK for PHP, we found that we needed an popular example application hosted on Microsoft's Windows Azure. Wordpress was an obvious choice, but not an obvious task. Learn more about Windows Azure, the PHP SDK that we developed, SQL Azure and about the problems we faced porting an existing PHP application to Windows Azure.<br />Just another wordpress weblog, but more cloudy<br />
  3. 3. Maarten Balliauw<br />Maarten Balliauw is a technical consultant in web technologies at RealDolmen, one of Belgium's biggest ICT companies. His interests are ASP.NET (MVC), PHP and Windows Azure. He's a Microsoft Most Valueable Professional (MVP) ASP.NET and has published many articles in both PHP and .NET literature such as MSDN magazine Belgium and PHP architect. Maarten is a frequent speaker at various national and international events. His blog can be found at http://blog.maartenballiauw.be. <br />
  4. 4. Start with the title slide<br />Keep the two hidden slides(#2&#3) for speaker and session description<br />Use the “Demo” Layout for Demos<br />if using Powerpoint 2010, please use sections<br />There’s a “black” and a “white” layouts if necessary<br />End with the Q&A, “thank you”, “fill the forms” and the “Microsoft Potential + Passion” slide<br />Quick guide<br />
  5. 5. Who am I?<br />Maarten Balliauw<br />Antwerp, Belgium<br />www.realdolmen.com<br />Focus on web<br />ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, …<br />MVP ASP.NET<br />Interested in interoperability<br />PHPExcel, PHPLinq, Windows Azure SDK for PHP, ...<br />http://blog.maartenballiauw.be<br />http://twitter.com/maartenballiauw<br />
  6. 6.
  7. 7. Agenda<br />Cloud computing?<br />Windows Azure?<br />Application architecture<br />Using PHP with Windows Azure<br />Wordpress<br />Resources<br />Q&A<br />
  8. 8. What’s in the cloud?<br />Cloud Computing<br />
  9. 9. What is Cloud Computing ?<br />What is cloud computing ?<br />Offering infrastructure, platform and software as a service over the internet to a global market.<br />Move on-premises management of non functional IT assets to a provider.<br />Difference from traditional hostings<br />Sold on demand “pay as you grow”<br />Elastic scalability<br />Service is fully managed by the provider<br />End user centric (IW or developer)<br />Strong focus on integration (cloud-cloud or cloud-on-premises)<br />
  10. 10. Definition of cloud (NIST)<br />On-demand self service<br />Standardized access<br />Location independant resource pooling<br />Rapid elasticity<br />Pay per use<br />
  11. 11. IT as a Service<br />You manage<br />Private<br />(On-Premise)<br />Infrastructure<br />(as a Service)<br />Platform<br />(as a Service)<br />You manage<br />Applications<br />Applications<br />Applications<br />Runtimes<br />Runtimes<br />Runtimes<br />Security & Integration<br />Security & Integration<br />Security & Integration<br />You manage<br />Managed by vendor<br />Databases<br />Databases<br />Databases<br />Servers<br />Servers<br />Servers<br />Managed by vendor<br />Virtualization<br />Virtualization<br />Virtualization<br />Server HW<br />Server HW<br />Server HW<br />Storage<br />Storage<br />Storage<br />Networking<br />Networking<br />Networking<br />
  12. 12. Microsoft’s cloud<br />Windows Azure<br />
  13. 13. The Windows Azure Platform<br />Windows Azure<br />SQL Azure<br />Windows Azure platform AppFabric<br />Microsoft Codename “Dallas”<br />Microsoft Codename “Sydney”<br />
  14. 14. Windows Azure<br />Flexible application hosting<br />Lights-out service management<br />Provide code & service model, hit ENTER<br />Storage at massive scale<br />Blobs, tables, queues<br />Compute<br />Storage<br />Management<br />There’s an SDK for this: http://phpazure.codeplex.com<br />
  15. 15. Windows Azure<br />
  16. 16. Windows Azure Data Storage<br />Queue<br />Blob<br />Account<br />Tables<br />Drives<br />
  17. 17. Storage options<br />Blobs, tables, queues<br />Windows Azure Drive (a.k.a. XDrive)<br />Virtual NTFS volume that can be mounted<br />.vhd format<br />Use existing NTFS API’s<br />Easier migration<br />Stored on blob storage provides quick mount/unmount in other VM<br />
  18. 18. SQL Azure<br />Relational database as a service<br />Highly available, automatically maintained<br />Extension of the SQL Server Data Platform<br />Reporting<br />Data Sync<br />Business Analytics<br />Database<br />There’s a driver for this: http://sqlsrvphp.codeplex.com<br />
  19. 19. SQL Azure<br />Relational database, provided as a service<br />Highly symmetrical development and tooling experience (use TDS protocol and T-SQL)<br />Highly scaled out, on commodity hardware<br />Built on the SQL Server technology foundation<br />High availability, DB provisioning, and DB management are provided by the service<br />
  20. 20. Windows Azure AppFabric<br />Secure connections between services<br />Across organizational boundaries<br />Claims-based access control<br />ServiceBus<br />AccessControl<br />There’s an SDK for this: http://dotnetservicesphp.codeplex.com/<br />
  21. 21. Service Bus Overview<br />
  22. 22. Windows Azure AppFabric - Service Bus<br />Securely connect applications<br />Over the internet<br />Across any network topology (= across firewalls!)<br />Across organizational boundaries<br />Primary application patterns<br />Eventing: <br />Notify applications and/or devices<br />Service Remoting: <br />Securely project on-premises services out to the cloud<br />Tunneling: <br />App-to-app communication with NAT/Firewall traversal<br />
  23. 23. PortBridge - http://bit.ly/bCDrUs<br />Bridge TCP over Service Bus<br />A fun usage scenario…<br />
  24. 24. Microsoft Codename “Dallas”<br />Content brokerage and discovery platform <br />Available as a CTP<br />Microsoft Codename “Dallas”Information Services<br />
  25. 25. Microsoft Codename “Sydney” - Connectivity<br />WINDOWS AZURE PLATFORM<br />ENTERPRISE<br />Data Service<br />Service Bus<br />Access Control Service<br />Code Name “Project Sydney”<br />
  26. 26.
  27. 27.
  28. 28. Developer tools<br />Development<br />Use your favourite editor<br />Local debugging<br />Windows with IIS 7.x<br />Visual Studio<br />Windows Azure tools for Eclipse<br />Packaging<br />Windows Azure SDK<br />Deployment<br />Any browser<br />
  29. 29. Your typical cloud application<br />Application architecture<br />
  30. 30. Typical Architecture on Azure<br />Service Unavailable<br />VIP<br />Worker Role<br />Web Role<br />Windows Azure Storage <br />(Blob, Table, Queue)<br />
  31. 31. Web + Worker Role Service Model<br />Worker Role<br />Service Still Available<br />Worker Role<br />Web Role<br />VIP<br />Worker Role<br />Web Role<br />Worker Role<br />Worker Role<br />Windows Azure Storage <br />(Blob, Table, Queue)<br />
  32. 32. How about that?<br />PHP & Windows Azure<br />
  33. 33. It’s all about…<br />Running PHP Code in Windows Azure<br />Eclipse Tooling<br />Build, Test, Deploy PHP Projects<br />Create New or Use Existing PHP Projects<br />Scaling PHP Apps<br />Using Cloud Storage from PHP<br />Using Windows Azure Storage<br />Using SQL Azure<br />Using PHP with Windows Azure<br />
  34. 34. Running PHP in Windows Azure<br />How to Do It<br />Host in Web role (like .NET)<br />Supply PHP runtime<br />Point to runtime via FastCGIconfiguration in<br />Web.config<br />Web.roleConfig<br />Eclipse Tooling athttp://windowsazure4e.org does the above for you<br />PHP <br />Web Role<br />Instance 1<br />VIP<br />Load Balancer<br />PHP <br />Web Role<br />Instance 2<br />
  35. 35. PHP + Cloud Storage<br />Windows Azure Storage<br />VIP<br />On-Premise<br />Load Balancer<br />PHP<br />Web Role<br />PHP App<br />SQL Azure<br />Windows Azure Platform<br />
  36. 36. PHP with Windows Azure Storage<br />Windows Azure SDK for PHP at http://phpazure.codeplex.com<br />PHP programming model for Windows Azure Storage<br />Features <br />PHP classes for Blobs, Tables & Queues<br />Store PHP sessions in Table Storage<br />File system wrapper for Blob Storage<br />
  37. 37. PHP with SQL Azure<br />SQL Server Driver for PHP at http://sqlsrvphp.codeplex.com/<br />Supports PHP access to SQL Azure<br />Features<br />Choose between SQL Server and SQL Azure by changing connection string<br />Use from on-premise apps or in Windows Azure<br />
  38. 38. PHP with AppFabric<br />AppFabric SDK for PHP developers athttp://dotnetservicesphp.codeplex.com/<br />Supports PHP on service bus and access control<br />Features<br />Expose on-premise apps on an external endpoint without opening firewall<br />Pub/sub scenario’s<br />…<br />
  39. 39. Finally!<br />Wordpress<br />
  40. 40. Blogging engine<br />Widely used<br />Easy installation<br />Gazillion plugins<br />Huge community around it<br />Free and open-source<br />Wordpress<br />
  41. 41. Runs on top of MySQL<br />Has no database abstraction layer<br />So: only runs on MySQL<br />Windows Azure has Table Storage and SQL Azure<br />I feel lots of work coming…<br />But...<br />
  42. 42.
  43. 43. Easy way out<br />Wordpress on Windows Azure<br />MySQL on-premise / at other hoster<br />Medium way out<br />Wordpress on Windows Azure<br />MySQL as well<br />Hard way out<br />Wordpress on Windows Azure<br />MySQL out, SQL Azure in<br />There are ways around!<br />
  44. 44. The easy way out<br />Windows Azure Storage<br />VIP<br />Load Balancer<br />PHP<br />Web Role<br />MySQL<br />Windows Azure Platform<br />On-Premise / hosted<br />
  45. 45. The easy way out<br />Fresh Windows Azure project in Eclipse<br />Fresh Wordpress.org download<br />Point wp-config.php to some MySQL server<br />Package & deploy<br />
  46. 46. The medium way out<br />Windows Azure Storage<br />VIP<br />Load Balancer<br />PHP<br />Web Role<br />WorkerRole<br />runningMySQL<br />Windows Azure Platform<br />On-Premise / hosted<br />
  47. 47. Fresh Windows Azure project in Eclipse<br />Fresh Wordpress.org download<br />“Windows Azure MySQL PHP Solution Accelerator”<br />http://code.msdn.microsoft.com/winazuremysqlphp<br />Some configuration<br />Some anger<br />Some configuration<br />Point wp-config.php to the above MySQL server<br />Package & deploy<br />The medium way out<br />
  48. 48. BUT!<br />Instance count!<br />Pricing!<br />(5 x 240 EUR / month adds up...)<br />Easier migration, but at a cost...<br />The medium way out<br />
  49. 49. Yes, you can run MySQL on Windows Azure!<br />More “solution accelerators”:<br />MySQL<br />http://code.msdn.microsoft.com/winazuremysqlphp<br />Memcached<br />http://code.msdn.microsoft.com/winazurememcached<br />MediaWiki<br />http://code.msdn.microsoft.com/winazuremediawiki<br />Tomcat<br />http://code.msdn.microsoft.com/winazuretomcat<br />So...<br />
  50. 50. The hard way out<br />Windows Azure Storage<br />VIP<br />Load Balancer<br />PHP<br />Web Role<br />SQL Azure<br />Windows Azure Platform<br />On-Premise / hosted<br />
  51. 51. Fresh Windows Azure project in Eclipse<br />Fresh Wordpress.org download<br />Point wp-config.php to SQL Azure<br />Package & deploy<br />Fail!<br />There’s no SQL Server / SQL Azure support in Wordpress, remember?<br />The hard way out<br />
  52. 52. MySQL queries all over the place!<br />“Data layer” (wp-db.php) = very thin<br />Raw MySQL queries passed from app to db<br />Logging<br />Some other stuff<br />That’s nowhere near a database abstraction...<br />Have you ever looked at Wordpress?<br />
  53. 53. Required:<br />Re-build wp-db.php using SQL Server Driver for PHP<br />http://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspx<br />Options...<br />Re-write every single query in Wordpress<br />Future proof?<br />Insane!<br />Build a query translation tool, rewriting queries on-the-fly<br />Future proof!<br />Insane!<br />Strategic options<br />
  54. 54. Hooks in Wordpress<br />Wp-contents/db.php<br />Wp-includes/wp-db.php<br />Strategy<br />Create wp-db.php class on top of SQL Server Driver for PHP<br />http://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspx<br />Create custom DB schema, compatible with SQL Server<br />Build a query translation tool, rewriting queries on-the-fly<br />Someone at Microsoft had this laying around<br />Here’s what we did...<br />
  55. 55. Resources<br />Images, other file uploads, ...<br />Normally stored on server disk<br />But this may not survive on Windows Azure...<br />Solution<br />Plugin using Windows Azure SDK for PHP<br />Storing everything on Blob Storage<br />Serving everything from Blob Storage<br />There’s a CDN available!<br />But there’s also... resources<br />
  56. 56.
  57. 57. If the Internet works...<br />
  58. 58. Learn more!<br />Resources<br />
  59. 59. Resources<br />Windows Azurehttp://www.azure.com<br />Windows Azure SDK for PHPhttp://phpazure.codeplex.com<br />SQL Server Driver for PHPhttp://sqlsrvphp.codeplex.com<br />AppFabric SDK for PHP developershttp://dotnetservicesphp.codeplex.com<br />PDChttp://microsoftpdc.com<br />PHP Architect December 2009 issuehttp://www.phparch.com<br />Steve Marxhttp://blog.smarx.com/<br />Clemens Vastershttp://vasters.com/clemensv/<br />Simon Guesthttp://simonguest.com/blogs/smguest<br />My bloghttp://blog.maartenballiauw.be/category/Azure.aspx<br />RealDolmen blogs is running on Azure!http://www.realdolmenblogs.com<br />
  60. 60. Windows Azure is<br />Operating system (computing & storage)<br />SQL Azure<br />AppFabric<br />Codename projects<br />Your application and skills<br />Hybrid applications<br />It’s not that hard to do<br />Conclusion<br />
  61. 61. Is the source code available?<br />No, not at this time.<br />Do I need Visual Studio / Eclipse?<br />Only for local debugging.<br />Do I need Windows & the Windows Azure SDK?<br />Only for local debugging.<br />Before skipping to Q&A...<br />
  62. 62. Maarten Balliauwhttp://blog.maartenballiauw.be<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×