PHP in the Cloud - PHP Barcelona
Upcoming SlideShare
Loading in...5
×
 

PHP in the Cloud - PHP Barcelona

on

  • 5,266 views

 

Statistics

Views

Total Views
5,266
Views on SlideShare
4,358
Embed Views
908

Actions

Likes
1
Downloads
31
Comments
0

3 Embeds 908

http://phpconference.es 900
http://a0.twimg.com 6
http://translate.googleusercontent.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

PHP in the Cloud - PHP Barcelona PHP in the Cloud - PHP Barcelona Presentation Transcript

  • PHP IN THE CLOUD Juozas “Joe” Kaziukėnas http://juokaz.com / juozas@juokaz.com / @juokaz
  • WHO IS THIS GUY?  Juozas Kaziukėnas, Lithuanian  You can call me Joe  3 years in Edinburgh, UK  CEO of Web Species Ltd  Occasional open source developer  Conferences speaker  More info in http://juokaz.com Tweet me @juokaz
  • CLOUD
  • SOMEONE’S IMAGINATION?
  • CAME TO PHP IN 2010*
  • WHAT CLOUD MEANS“A model for consumption & delivery on theinternet where flexibility is essential & can beguaranteed through abstraction” – Thijs Feryn
  • ENOUGH OF THIS *CLOUD*
  • IF YOU TAKE ONE THING OUT OF THIS PRESENTATIONWHAT WOULD THAT BE?
  • CLOUD DRINKING GAME Every time someone says “cloud”, take a drink
  • LAYERSIaaS PaaSSaaS
  • IAAS VS PAAS Multiple apps per instance  One app per instance Freedom to configure  Pre-configured system Unmanaged  Managed Learning steps  Out of the box Hybrid cloud  Super cool
  • WHY WOULD I WANT THAT?
  • YOU WANT THIS BECAUSE Abstraction Flexibility Agile Scale: vertical or horizontal It sells nowadays
  • ZYNGA CASE
  • CLOUD READY APP Any app deployed to the cloud – not really what cloud is for Cloud can be just a host, but it’s more If you don’t need elasticity… Use surrounding services • Storage • Database • Queues • Etc.
  • CLOUDS Amazon EC2 Microsoft Windows Azure Rackspace Gazillion more
  • CLOUDS Custom setup Learning curve Unmanaged cloud Can take a lot of hoops
  • SETTING SERVERS UP ISNOT EASY YOUR BUSINESS IS TO CREATE APPS
  • This talkis about PaaS
  • PHP COMMUNITY MOVING We decided to create our own clouds On top of existing platforms Optimized and made easier for PHP developers We know how to make PHP work well Community support
  • PHP CLOUDS
  • PHP CLOUDS Similar approaches Deploy from Git/SVN or push Very simple to deploy Cheap to run Out of the box support for tools and frameworks Horizontal scaling
  • HOW IT WORKS
  • LET’S DEPLOYSo you want to deploy to a cloud…
  • LET’S DEPLOY If internet works Simple PHP app deployed to • Orchestra • Azure+ This is so cool
  • AZURE+ V S. ORCHESTRA Runs on Windows Azure  Runs on Amazon EC2 Microsoft SQL server  Mysql, MongoDB etc. Deploy from GIT or push  Deploy from GIT Choose PHP version  PHP 5.3 (custom) In development  Stable
  • HARDCORE DEPLOY ACTI ON
  • PRETTY MUCH ANY APPWILL WORK, UNLESS…
  • YOUR APP SHOULD BE… Don’t use local disk/storage • Sessions • Files Don’t expect things to exist Latency between servers Shared state Abstract enough, no direct calls
  • SHARE NOTHING Makes horizontal scaling impossible State stored between server Application files in network drive
  • MUCH MORE EASIER If you use a framework • Stops you from doing stupid things Abstract database interactions • Using ORM Don’t try to do things with PHP which are not meant to be done
  • LEVERAGE SERVICES API wrappers and SDK available in PHP Store files in CDN Use cloud databases Manage the service Automate
  • DEPLOY I like to push code Deploy branch in a repository is fine too Use automated scripts • Preconfigure apps • You don’t get access to PaaS servers Forget about FTP
  • UNHAPPY CLOUD
  • CAN BE DOWN“A lightning strike in Dublin, Ireland knockedAmazons European cloud services offline Sundayand some customers were expected to be down forup to two days” – Information Week
  • CAN BE DOWN“Sites across the U.S. went offline for up to 12 hoursyesterday as Amazons northern Virginia data centrewas hit by a series of outages” – Daily Mail
  • CAN BE DOWN“During a routine operating system upgrade onFriday (March 13th), the deployment service withinWindows Azure began to slow down due tonetworking issues. This caused a large number ofservers to time out and fail” – MSDN blog
  • UNHAPPY CLOUD It’s not magically reliable It can be less reliable than on-premises server • Need multiple instances • Load balancer Deploy across data centers Hybrid cloud, again
  • CONCLUSION Make a choice IaaS vs PaaS Try out PaaS just for fun (doesn’t cost anything) Write your apps correctly Scale
  • THANK YOU!Keep in touch http://juokaz.com juozas@juokaz.com twitter: @juokaz Rate at http://joind.in/4317