Google App Engine: For PHP Developers

910 views

Published on

Google App Engine for PHP Developers - my session in G-Days Bangladesh organized by local Google Developers Groups and Google Business Groups

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
910
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Google App Engine: For PHP Developers

  1. 1. Abu  Ashraf  Masnun     @masnun   GOOGLE  APP  ENGINE:   FOR  PHP  DEVELOPERS  
  2. 2. WHY  PHP?  
  3. 3. What  do  we  need?   • Vagrant  (http://vagrantup.com)   • VirtualBox   • SSH  Client   • Quick  Q&A   • What  is  Vagrant?   • What  is  VirtualBox?   • SSH  Client  
  4. 4. Setting  Up   •  vagrant  init   •  vagrant  box  add  precise64  http:// files.vagrantup.com/precise64.box             •  vagrant  up   •  vagrant  ssh  
  5. 5. Get  PHP  &  App  Engine   • sudo  apt-­‐get  install  lamp-­‐server^     • sudo  apt-­‐get  install  php5-­‐cgi     • wget  https:// commondatastorage.googleapis.com/ appengine-­‐sdks/featured/ google_appengine_1.9.2.zip     • unzip  google_appengine_1.9.2.zip    
  6. 6. Running  The  Server   google_appengine/dev_appserver.py       -­‐-­‐host=0.0.0.0       -­‐-­‐php_executable_path=`which  php-­‐cgi`         /vagrant/<app>/  
  7. 7. app.yaml  
  8. 8. index.php  
  9. 9. User  Service  
  10. 10. Sending  Email  
  11. 11. Memcache   Stubbed  functions  in  the  Memcache  API     •  memcache_add_server()   •  memcache_close()   •  memcache_connect()   •  memcache_pconnect()   •  memcache_set_compress_threshold()   •  addServer()   •  close()   •  connect()   •  pconnect()   •  setCompressThreshold()  
  12. 12. Memcached   Stubbed  functions  in  the  Memcached  API     •  addServer()   •  addServers()   •  getAllKeys()   •  getServerByKey()   •  getServerList()   •  getStats()   •  getVersion()   •  isPersistent()   •  isPristine()   •  quit()   •  resetServerList()   •  setSaslAuthData()  
  13. 13. Task  Queues     • 10  minutes  execution  time  (normal  req  <  60sec)   • Must  return  HTTP  Response  200-­‐299  
  14. 14. PushQueue  –  Multiple  Tasks  
  15. 15. Cron  Jobs  
  16. 16. Publishing  The  App   appcfg.py  update  <app  name>  
  17. 17. Q&A  

×