Scalable PHP

4,364 views

Published on

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

No Downloads
Views
Total views
4,364
On SlideShare
0
From Embeds
0
Number of Embeds
183
Actions
Shares
0
Downloads
59
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Scalable PHP

  1. 1. Scalable PHP Cal Henderson
  2. 2. Oh hai
  3. 3. Does PHP scale?
  4. 4. Yes!
  5. 5. No!
  6. 6. Stupid question!
  7. 7. Languages don’t scale
  8. 8. Architectures scale
  9. 11. Universe of marshy force. Field sense shallows the hatchery saying Hello,. World!.  Hydro. Power spring  sometimes; snowmelt       powers   snowmelt always.
  10. 12. It’s all about the salmon And trees
  11. 13. But PHP sucks
  12. 14. No namespaces
  13. 15. Random function names
  14. 16. No quantum superpositions
  15. 17. People whining
  16. 18. Best of a bad bunch
  17. 19. Ok, scaling What makes something scalable?
  18. 20. Bigger dataset More traffic Maintainable
  19. 21. NOT about performance
  20. 22. But PHP is slow!
  21. 24. Who cares?
  22. 25. PHP is not your bottleneck
  23. 26. More traffic Push issues down the stack
  24. 27. Horizontal vs Vertical
  25. 28. Scale out vs Scale up
  26. 29. Scale out (horizontal) ftw
  27. 30. PHP sessions == bad /var/notshared
  28. 31. Sessions in a DB
  29. 33. No sessions at all
  30. 34. Sessions in cookies
  31. 35. Bigger dataset Not really a PHP issue
  32. 36. Pass big data by function foo(&$big){} reference
  33. 37. Don’t serialize() big things
  34. 38. All arrays are sparse So that’s ok
  35. 39. Don’t keep much in memory
  36. 40. Maintainable Small logical blocks include()
  37. 41. Sucks about namespaces
  38. 42. Classes are like namespaces kinda
  39. 43. Many includes == bad
  40. 44. APC + full paths + nostat == awesome
  41. 45. Set root path via .htaccess ENV Or whatever
  42. 46. deploy-time rollups also good
  43. 47. Consistency is king
  44. 48. # Comments # Also useful # (who knew?)
  45. 49. The bottom line: PHP is used for big things
  46. 50. Beauty is less important Than just working
  47. 51. Photos! <ul><li>http://flickr.com/photos/isolano/423026153/ </li></ul><ul><li>http://flickr.com/photos/liberato/171610084/ </li></ul><ul><li>http://flickr.com/photos/thomashawk/422057690/ </li></ul><ul><li>http://flickr.com/photos/puja/138469909/ </li></ul><ul><li>http://flickr.com/photos/stuckincustoms/177496023/ </li></ul><ul><li>http://flickr.com/photos/maurymccown/289932747/ </li></ul><ul><li>http://flickr.com/photos/lij/122525716/ </li></ul><ul><li>http://flickr.com/photos/thomashawk/44667887/ </li></ul><ul><li>http://flickr.com/photos/mr_fabulous/2033276270/ </li></ul><ul><li>http://flickr.com/photos/re_verse/58362878/ </li></ul><ul><li>http://flickr.com/photos/auntiep/3990731/ </li></ul><ul><li>http://flickr.com/photos/arild_storaas/966725616/ </li></ul><ul><li>http://flickr.com/photos/magnesaxegaard/1351464888/ </li></ul><ul><li>http://flickr.com/photos/hughes_leglise/530542920/ </li></ul><ul><li>http://en.wikipedia.org/wiki/Image:John_McCarthy_Stanford.jpg </li></ul>
  48. 52. Moar Photos! <ul><li>http://flickr.com/photos/bonnieshulman/566022330/ </li></ul><ul><li>http://flickr.com/photos/hamed/155343130/ </li></ul><ul><li>http://flickr.com/photos/pandiyan/186171830/ </li></ul><ul><li>http://flickr.com/photos/fish_at_taipei/198024832/ </li></ul><ul><li>http://flickr.com/photos/cdell/472665280/ </li></ul><ul><li>http://flickr.com/photos/robh/142742990/ </li></ul><ul><li>http://flickr.com/photos/neilw/204239787/ </li></ul><ul><li>http://flickr.com/photos/big-e-mr-g/152643684/ </li></ul><ul><li>http://flickr.com/photos/ozyman/155517365/ </li></ul><ul><li>http://flickr.com/photos/ucumari/580865728/ </li></ul><ul><li>http://flickr.com/photos/twob/8741933/ </li></ul><ul><li>http://flickr.com/photos/ashclements/248887492/ </li></ul><ul><li>http://flickr.com/photos/mr-outdoorguy/2100813932/ </li></ul><ul><li>http://flickr.com/photos/good_day/450356635/ </li></ul><ul><li>http://flickr.com/photos/thomashawk/72597356/ </li></ul>
  49. 53. Even Moar Photos! <ul><li>http://flickr.com/photos/dcjohn/74907741/ </li></ul><ul><li>http://flickr.com/photos/carplips/439902567/ </li></ul><ul><li>http://flickr.com/photos/bretarnett/180654760/ </li></ul><ul><li>http://flickr.com/photos/bunchofpants/27151349/ </li></ul><ul><li>http://flickr.com/photos/stuckincustoms/870325399/ </li></ul><ul><li>http://flickr.com/photos/cruzan/84636294/ </li></ul><ul><li>http://flickr.com/photos/cayusa/384187184/ </li></ul><ul><li>http://flickr.com/photos/mrclean/371372515/ </li></ul><ul><li>http://flickr.com/photos/radiofree/113944690/ </li></ul><ul><li>http://flickr.com/photos/fortphoto/320676608/ </li></ul><ul><li>http://flickr.com/photos/hurleygurley/4338767/ </li></ul>
  50. 54. find these slides online iamcal.com/talks

×