PHP in the Cloud

  • 1,955 views
Uploaded on

Andrew Kenney's presentation at Boston Startup School.

Andrew Kenney's presentation at Boston Startup School.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,955
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
12
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. PHP in the CloudThe Future of the Glue of the Internet
  • 2. About Me•  Andrew Kenney•  VP, Cloud Engineering @ Acquia•  Previously President/CTO @ ONEsite @syrneus - purefire@gmail.com - andrew.kenney@acquia.com purefire.com - linkedin.com/akenney - github.com/syrneus
  • 3. Glue of the Internet•  “PHP is glue. It is the glue used to build cool web applications by sticking dozens of 3rd-party libraries together and making it all appear as one coherent entity…” ~PHP.net
  • 4. PHP in a Nutshell•  “I dont know how to stop it, there was never any intent to write a programming language” ~ Rasmus Lerdorf, creator of PHP
  • 5. How did PHP get so big?•  PHP replaced Perl as the lingua franca of the web•  PHP.net had great examples and comments•  Google did not exist•  StackOverflow did not exist
  • 6. PHP’s History•  1995 – First Release•  1998 – PHP 3•  2000 – PHP 4 / Zend Engine I•  2004 – PHP 5 / Zend Engine II•  2009 – PHP 5.3•  PHP 6 - ???
  • 7. PHP has a lot of competition…Top Languages on GitHub
  • 8. Why use PHP now?•  Powers the majority of the known web•  Installed everywhere•  Proven scalability•  Large developer community•  Great frameworks
  • 9. Who Uses PHP?•  Facebook•  Wikipedia•  Yahoo / Flickr•  White House•  WordPress.com•  Tumblr•  Most large Internet forums•  etc.
  • 10. Who uses PHP? Acquia! •  Thousands of PHP servers on Amazon Cloud •  Billions of monthly pageviews •  Tens of thousands of Drupal sites •  Hosting some of the largest Drupal sites in the world
  • 11. PHP CMS Projects•  Popular CMSes –  Drupal –  Joomla –  WordPress•  Easier than ever to build a site•  Drupal 8 is going to be amazing…
  • 12. PHP Frameworks•  Zend Framework (ZF2)•  Symfony•  FuelPHP / Yii / CodeIgniter / CakePHP•  You’re not a real PHP programmer until you’ve created your own framework
  • 13. PHP Stack•  PHP - PHP 5.3+ –  Memcache – use it (or use Redis) –  APC•  Web Server –  Apache / Nginx / etc.•  Database –  MySQL / Postgres / etc.•  Operating System –  Ubuntu / Red Hat / etc.
  • 14. PHP in the Cloud•  It is easy to run a PHP site in the cloud•  It is HARD to run a PHP site in the cloud with… –  High availability –  High scalability –  High security
  • 15. PHP Cloud Hosting•  IaaS –  Amazon Web Services –  Rackspace Cloud•  PaaS –  PaaS: PHPfog / AppFog / PagodaBox / Heroku –  Drupal Cloud: Acquia Cloud / Pantheon•  Traditional Hosting –  Linode / Rackspace / etc.
  • 16. Setting up simple LAMP stack
  • 17. Complicated Cloud LAMP Stack Availability Zone A Availability Zone B Availability Zone A Availability Zone B BAL BAL BAL BAL Varnish Varnish Varnish Varnish nginx nginx nginx nginx WEB WEB WEB WEB Memcache Memcache Memcache Memcache APACHE APACHE APACHE APACHE Drupal Drupal Drupal Drupal User User User User via via via via Files Git/SVN Files Git/SVN Files Git/SVN Files Git/SVN FSDB FSDB FSDB FSDB User Files User Files User Files User Files GlusterFS GlusterFS GlusterFS GlusterFS Multiregion Replication MySQL MySQL MySQL MySQL Site A Site A Site A Site A Site B Site B Sites C/D Sites C & D Acquia Confidential
  • 18. Use a PaaS for your Startup PagodaBoxAppFog Acquia Cloud
  • 19. PagodaBox Symfony Demo Create a free account on www.pagodabox.comDownload simple site at github.com/syrneus/phpinthecloud
  • 20. PagodaBox Symfony Demo Name your new application and launch it
  • 21. PagodaBox Symfony Demo Setup your SSH keys so you can easily git push changes
  • 22. PagodaBox Symfony Demo Navigate to your code on the filesystem and push your website live!
  • 23. PagodaBox Symfony Demo
  • 24. PagodaBox Symfony Demo
  • 25. Drawception – Symfony at Scale•  Everything available as an API •  Doctrine ORM•  Twig template engine powered •  Hosted on PagodaBox HTML / mobile / Facebook views
  • 26. PHP – Lessons Learned•  Use a framework•  Don’t over engineer scalability•  Use an ORM•  Use UTC server time•  Use a template language (even if it is PHP)•  Plan for internationalization from the beginning•  Use UTF-8 for your Databases•  Version control APIs
  • 27. Why use PHP for a Startup?•  Trusted by some of the largest web companies in the world•  Amazing pool of developer talent•  PHP will not be your bottleneck in scalability•  Don’t reinvent the wheel. Also use PHP/ Drupal for elements of your startup like the website/blog/community/etc.
  • 28. Acquia - PHP @ Scale
  • 29. Questions?•  Tweet Me: @syrneus•  E-mail Me: purefire@gmail.com @syrneus - purefire@gmail.com - andrew.kenney@acquia.com purefire.com - linkedin.com/akenney - github.com/syrneus Ask me about Acquia!