PHP and the Cloud
                                   http://joind.in/1250




                                            ...
Contents




                           WARNING

                           This is not Yet Another
                      ...
What is the Cloud?




                                3
zaterdag 30 januari 2010
What is the Cloud?




                                4
zaterdag 30 januari 2010
Gartner’s Hype Cycle




                                  5
zaterdag 30 januari 2010
Gartner’s Hype Cycle




                                  6
zaterdag 30 januari 2010
Gartner’s Hype Cycle on Clouds




                                            7
zaterdag 30 januari 2010
Clouds According to NIST


                “Cloud computing is a model for enabling convenient, on-demand
                ...
NIST: Five Characteristics

           Things that are considered cloud:
                On-demand, self-service
         ...
NIST: Three Service Models

           Cloud applications are:
                Software as a Service
                Platf...
NIST: Four Deployment Models

                Private cloud
                Community cloud
                Public cloud
 ...
Infrastructure as a Service




                                                         12
zaterdag 30 januari 2010
Application Layers

           Standard layers in a typical application:


                             Application
      ...
Infrastructure as a Service

           Parts of the infrastructure offered as service to your app:


                    ...
Infrastructure as a Service

                Pitfalls:
                 • Vendor lock-in
                 • Security
     ...
Infrastructure as a Service




                                         16
zaterdag 30 januari 2010
The Hardware/OS Layer

                Typically offered as Virtual Machine images
                Gives ‘throw hardware a...
Example: The Rackspace Cloud

                The RackspaceCloud is what used to be called Mosso


                Powerfu...
The Rackspace Cloud in PHP




                                        19
zaterdag 30 januari 2010
The Rackspace Cloud in PHP




                                        20
zaterdag 30 januari 2010
Clouds for Development

                Private Cloud:
                 • Flexible development environments
              ...
Example: Terremark’s Infinicloud




                                              22
zaterdag 30 januari 2010
Terremark’s InfiniCloud




                                     23
zaterdag 30 januari 2010
IaaS Architecture
                           Prepare your app to run on IaaS




                                         ...
Horizontal Scalability

                If you run your app on multiple servers today, would it work?


                Ty...
Horizontal Scalability

                Danga - http://www.danga.com/
                 • People behind LiveJournal / SixAp...
Elasticity

                Fewer bottlenecks
                 • More elasticity
                 • Easier to scale




  ...
Elasticity




                           28
zaterdag 30 januari 2010
Elasticity




                           29
zaterdag 30 januari 2010
Abstraction

                Abstract services where possible




                                                   30
za...
Abstraction

                Con:
                 • Common denominator functionality
                 • Adds some overhea...
Abstraction

                Zend’s SimpleCloud
                 • http://simplecloud.org
                 • Good attempt ...
Characteristics Of Your App

                Service oriented
                Stateless
                Low coupling
     ...
Infra as a Service = SLA Hell?

                Find out service levels of infrastructure components
                Get p...
Platform as a Service




                                                   35
zaterdag 30 januari 2010
Platform as a Service

           Complete platform offered as a service:


                              Application

   ...
Platform as a Service

                Platform scales up and down as necessary




                Same pitfalls and adva...
Platform as a Service




                                   38
zaterdag 30 januari 2010
Google AppEngine

                http://code.google.com/appengine/
                Python and Java


                Able...
The Rackspace Cloud ‘Sites’




                                         40
zaterdag 30 januari 2010
Rackspace’s TrueHybrid

                Platform selects the best operating system for your site
                Magically...
Other Platforms for PHP

                NING
                 • http://ning.com
                 • Social Network PaaS
  ...
Software as a Service




                                                   43
zaterdag 30 januari 2010
Software as a Service

           Everything in the cloud:


                              Application
                   ...
Software as a Service

                Complete applications or application components
                Popular phrase: “We...
Software as a Service




                                   46
zaterdag 30 januari 2010
Example: Salesforce

                Gives access to all your data in Salesforce using SOAP
                PHP library av...
Example: Salesforce




        Source adapted from tutorial at http://www.mikesimonds.com

                              ...
Example: Google Apps

                Many features available through Zend_Gdata_* in ZF
                 • Information re...
Example: Google Apps




                                  50
zaterdag 30 januari 2010
General SaaS suggestions

                Want to work with X from PHP?
                 • Google ‘X PHP api’ or ‘X php tu...
The ‘Warcraft Effect’

                Clouds are living entities that change when you’re not looking




                ...
Creating SaaS




                                           53
zaterdag 30 januari 2010
Creating SaaS

                In 2 years Cloud Infrastructure will be a commodity
                 • It’ll be all about a...
Multi-Tenancy evolution




           Source: http://msdn.microsoft.com/en-us/library/aa479069.aspx


                   ...
Multi-tenant Databases




                                    56
zaterdag 30 januari 2010
Multi-tenant Databases




                                    57
zaterdag 30 januari 2010
Things to think about

                Privacy
                Shared data
                Collaboration
                I...
Putting it all together
                           How we use Cloud Technology @ Ibuildings




                          ...
The IT Cloud @ Ibuildings




                                       60
zaterdag 30 januari 2010
The IT Cloud @ Ibuildings




                                       61
zaterdag 30 januari 2010
Summary
                           If you were sleeping, wake up now!




                                                ...
Summary

                What is the Cloud?


                 • The cloud = IaaS + PaaS + SaaS


                If you h...
Summary

                With your next PHP application:
                 • See if you can run it on a Cloud Platform
    ...
Food for Thought
                           Let’s leave you with something to think about




                            ...
Food for Thought

           Are you worried about this?



                                                    Cloud
    ...
Food for Thought

           Then what about this?



                                                 Financial System
  ...
Ibuildings is hiring!




                                  Win an iPad:

                       http://www.ibuildings.com...
Questions ?




                                         69
zaterdag 30 januari 2010
Links & credits
                           Please comment on this talk here: http://joind.in/1250

                       ...
Thank you!
                                           Contact details:
                           Ivo Jansch - ivo@ibuildi...
Upcoming SlideShare
Loading in...5
×

PHP and the Cloud (phpbenelux conference)

2,241

Published on

The slides for the cloud talk I delivered at the inaugural PHPBenelux conference in Antwerp.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,241
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

PHP and the Cloud (phpbenelux conference)

  1. 1. PHP and the Cloud http://joind.in/1250 Ivo Jansch PHPBenelux 2010, January 30 zaterdag 30 januari 2010
  2. 2. Contents WARNING This is not Yet Another “Store files on Amazon S3” talk. 2 zaterdag 30 januari 2010
  3. 3. What is the Cloud? 3 zaterdag 30 januari 2010
  4. 4. What is the Cloud? 4 zaterdag 30 januari 2010
  5. 5. Gartner’s Hype Cycle 5 zaterdag 30 januari 2010
  6. 6. Gartner’s Hype Cycle 6 zaterdag 30 januari 2010
  7. 7. Gartner’s Hype Cycle on Clouds 7 zaterdag 30 januari 2010
  8. 8. Clouds According to NIST “Cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources that can be rapidly provisioned and released with minimal management effort or service provider interaction. This cloud model promotes availability and is composed of five essential characteristics, three service models, and four deployment models.” National Institute of Standards and Technology http://csrc.nist.gov/groups/SNS/cloud-computing/ 8 zaterdag 30 januari 2010
  9. 9. NIST: Five Characteristics Things that are considered cloud: On-demand, self-service Broad network access Resource pooling Rapid elasticity Measured service 9 zaterdag 30 januari 2010
  10. 10. NIST: Three Service Models Cloud applications are: Software as a Service Platform as a Service Infrastructure as a Service 10 zaterdag 30 januari 2010
  11. 11. NIST: Four Deployment Models Private cloud Community cloud Public cloud Hybrid cloud 11 zaterdag 30 januari 2010
  12. 12. Infrastructure as a Service 12 zaterdag 30 januari 2010
  13. 13. Application Layers Standard layers in a typical application: Application System Software Storage Operating System Hardware Network 13 zaterdag 30 januari 2010
  14. 14. Infrastructure as a Service Parts of the infrastructure offered as service to your app: Application System Software Storage Operating System Hardware Network 14 zaterdag 30 januari 2010
  15. 15. Infrastructure as a Service Pitfalls: • Vendor lock-in • Security • Integrity of the service provider Advantages: • Easily scalable • Move from capital expense to operational expense • Metered use • Don’t worry about hardware... 15 zaterdag 30 januari 2010
  16. 16. Infrastructure as a Service 16 zaterdag 30 januari 2010
  17. 17. The Hardware/OS Layer Typically offered as Virtual Machine images Gives ‘throw hardware at the problem’ a new dimension Elastic load balancing divides traffic over instances 17 zaterdag 30 januari 2010
  18. 18. Example: The Rackspace Cloud The RackspaceCloud is what used to be called Mosso Powerful API for managing your cloud Easy access in PHP through Aleksey Korzun’s PHP API: • http://github.com/AlekseyKorzun/php-cloudservers Concepts • Images (various operating systems) • Flavors (configuration: mem, cpu, disk) 18 zaterdag 30 januari 2010
  19. 19. The Rackspace Cloud in PHP 19 zaterdag 30 januari 2010
  20. 20. The Rackspace Cloud in PHP 20 zaterdag 30 januari 2010
  21. 21. Clouds for Development Private Cloud: • Flexible development environments • Easy to simulate large scale environments • Easy to set up multiple clusters 21 zaterdag 30 januari 2010
  22. 22. Example: Terremark’s Infinicloud 22 zaterdag 30 januari 2010
  23. 23. Terremark’s InfiniCloud 23 zaterdag 30 januari 2010
  24. 24. IaaS Architecture Prepare your app to run on IaaS 24 zaterdag 30 januari 2010
  25. 25. Horizontal Scalability If you run your app on multiple servers today, would it work? Typical problem areas: • Sessions • Files 25 zaterdag 30 januari 2010
  26. 26. Horizontal Scalability Danga - http://www.danga.com/ • People behind LiveJournal / SixApart • Creators of tools to help make software horizontally scalable • Memcache - distributed caching, session clustering ‣ http://github.com/andreiz/php-memcached • MogileFS - distributed file storage ‣ http://projects.usrportage.de/index.fcgi/php-mogilefs • Gearman - distributed parallel job processing / message queue ‣ http://pecl.php.net/package/gearman/ 26 zaterdag 30 januari 2010
  27. 27. Elasticity Fewer bottlenecks • More elasticity • Easier to scale 27 zaterdag 30 januari 2010
  28. 28. Elasticity 28 zaterdag 30 januari 2010
  29. 29. Elasticity 29 zaterdag 30 januari 2010
  30. 30. Abstraction Abstract services where possible 30 zaterdag 30 januari 2010
  31. 31. Abstraction Con: • Common denominator functionality • Adds some overhead Pro: • Reduce vendor lock-in • Increase flexibility • Save development time • No need to learn different APIs • Promotes competition between providers 31 zaterdag 30 januari 2010
  32. 32. Abstraction Zend’s SimpleCloud • http://simplecloud.org • Good attempt at generic cloud abstraction 32 zaterdag 30 januari 2010
  33. 33. Characteristics Of Your App Service oriented Stateless Low coupling Modularity Interoperability 33 zaterdag 30 januari 2010
  34. 34. Infra as a Service = SLA Hell? Find out service levels of infrastructure components Get proper support Create “What if...” scenarios • What if Amazon is down? • What if SupaDupaCloudStore goes bankrupt? Who owns the data? Pay attention to license agreements 34 zaterdag 30 januari 2010
  35. 35. Platform as a Service 35 zaterdag 30 januari 2010
  36. 36. Platform as a Service Complete platform offered as a service: Application System Software Storage Operating System Hardware Network 36 zaterdag 30 januari 2010
  37. 37. Platform as a Service Platform scales up and down as necessary Same pitfalls and advantages as IaaS, plus: • Don’t worry about scalability 37 zaterdag 30 januari 2010
  38. 38. Platform as a Service 38 zaterdag 30 januari 2010
  39. 39. Google AppEngine http://code.google.com/appengine/ Python and Java Able to run PHP via Quercus (Java PHP interpreter) • http://www.webdigi.co.uk/blog/2009/run-php-on-the-google-app-engine/ • http://www.caucho.com/resin-3.0/quercus/ Technology needs to prove itself • Example sites running on Quercus: ‣ http://www.webmonkey.com/ ‣ http://www.style.com/stylefile/ 39 zaterdag 30 januari 2010
  40. 40. The Rackspace Cloud ‘Sites’ 40 zaterdag 30 januari 2010
  41. 41. Rackspace’s TrueHybrid Platform selects the best operating system for your site Magically blends Windows and Linux, ASP.NET and PHP 41 zaterdag 30 januari 2010
  42. 42. Other Platforms for PHP NING • http://ning.com • Social Network PaaS Force.com • Salesforce cloud platform • Business applications Overall no serious enough candidate yet • Somebody should create an AppEngine for PHP 42 zaterdag 30 januari 2010
  43. 43. Software as a Service 43 zaterdag 30 januari 2010
  44. 44. Software as a Service Everything in the cloud: Application System Software Storage Operating System Hardware Network 44 zaterdag 30 januari 2010
  45. 45. Software as a Service Complete applications or application components Popular phrase: “We are moving our ... to the cloud” Examples: • Gmail • Google Apps (office apps, calendar, email) • Salesforce for CRM Often built on IaaS • Dropbox file sharing (makes use of Amazon S3 for storage) • Jungledisk backups (same) 45 zaterdag 30 januari 2010
  46. 46. Software as a Service 46 zaterdag 30 januari 2010
  47. 47. Example: Salesforce Gives access to all your data in Salesforce using SOAP PHP library available Documentation abundant • http://developer.force.com/ Salesforce was SaaS way before term ‘cloud’ was coined Most developer friendly SaaS • Documentation • Sandbox functionality (paid) 47 zaterdag 30 januari 2010
  48. 48. Example: Salesforce Source adapted from tutorial at http://www.mikesimonds.com 48 zaterdag 30 januari 2010
  49. 49. Example: Google Apps Many features available through Zend_Gdata_* in ZF • Information retrieval • Document storage • Calendering • Account Configuration 49 zaterdag 30 januari 2010
  50. 50. Example: Google Apps 50 zaterdag 30 januari 2010
  51. 51. General SaaS suggestions Want to work with X from PHP? • Google ‘X PHP api’ or ‘X php tutorial’ • You’re almost never the first to want to work with it Cloud apps are easier to work with than most desktop/ noncloud apps. Testing • You don’t want to jeopardize your production data • See if there is a sandbox feature (Salesforce has one) • If not, create test accounts 51 zaterdag 30 januari 2010
  52. 52. The ‘Warcraft Effect’ Clouds are living entities that change when you’re not looking 52 zaterdag 30 januari 2010
  53. 53. Creating SaaS 53 zaterdag 30 januari 2010
  54. 54. Creating SaaS In 2 years Cloud Infrastructure will be a commodity • It’ll be all about application development Building an application for multiple users/customers Things to pay attention to: • Reliability (one customer getting in the way of another) • Security (competitors seeing each other’s data) • Deployment • Maintenance 54 zaterdag 30 januari 2010
  55. 55. Multi-Tenancy evolution Source: http://msdn.microsoft.com/en-us/library/aa479069.aspx 55 zaterdag 30 januari 2010
  56. 56. Multi-tenant Databases 56 zaterdag 30 januari 2010
  57. 57. Multi-tenant Databases 57 zaterdag 30 januari 2010
  58. 58. Things to think about Privacy Shared data Collaboration Interoperability Vendor lock 58 zaterdag 30 januari 2010
  59. 59. Putting it all together How we use Cloud Technology @ Ibuildings 59 zaterdag 30 januari 2010
  60. 60. The IT Cloud @ Ibuildings 60 zaterdag 30 januari 2010
  61. 61. The IT Cloud @ Ibuildings 61 zaterdag 30 januari 2010
  62. 62. Summary If you were sleeping, wake up now! 62 zaterdag 30 januari 2010
  63. 63. Summary What is the Cloud? • The cloud = IaaS + PaaS + SaaS If you have trouble remembering: • Cloud = Platform, Infrastructure & Software as a Service 63 zaterdag 30 januari 2010
  64. 64. Summary With your next PHP application: • See if you can run it on a Cloud Platform • See if you can run parts on Cloud Infrastructure • See if you can use Software as a Service components • See if you can offer it as a service • Keep your architecture ‘cloud ready’ Think about clouds! • In a couple of years, we’ll all be doing it 64 zaterdag 30 januari 2010
  65. 65. Food for Thought Let’s leave you with something to think about 65 zaterdag 30 januari 2010
  66. 66. Food for Thought Are you worried about this? Cloud Cloud Provider Where’s my data?! 66 zaterdag 30 januari 2010
  67. 67. Food for Thought Then what about this? Financial System Bank Where’s my money?! Our money has been in the cloud since the 18th century! 67 zaterdag 30 januari 2010
  68. 68. Ibuildings is hiring! Win an iPad: http://www.ibuildings.com/challenge 68 zaterdag 30 januari 2010
  69. 69. Questions ? 69 zaterdag 30 januari 2010
  70. 70. Links & credits Please comment on this talk here: http://joind.in/1250 Pictures used (under Creative Commons Attribution licenses) Cloud (slide 3): http://flickr.com/photos/kables/6324973/ Cat + harddisk: http://flickr.com/photos/sirmildredpierce/42928070/ (adapted) Rubber Band Man: http://flickr.com/photos/thenovys/3791884189/ Clipart used (royalty free and public domain) http://www.clker.com/ 70 zaterdag 30 januari 2010
  71. 71. Thank you! Contact details: Ivo Jansch - ivo@ibuildings.com http://www.ibuildings.com http://www.jansch.nl twitter: ijansch http://joind.in/1250 zaterdag 30 januari 2010

×