Modern Application Stacks

942 views

Published on

Slides for a presentation I gave on May 4, 2011 at the GTA PHP user's group (http://meetup.gtaphp.org) about components for modern PHP application stacks

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

  • Be the first to like this

No Downloads
Views
Total views
942
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Modern Application Stacks

  1. 1. Modern Application Stacks Chris Hartjes GTA PHP User's Group May 3, 2011
  2. 3. What Are We Going To Talk About <ul><li>NO silver bullets
  3. 4. NO group-think
  4. 5. NO fixation on the sexy-shiny </li></ul>
  5. 6. LAMP is dead LONG LIVE LAMP Why do people hate LAMP so much?
  6. 7. PHP Application Stacks <ul><li>Linux
  7. 8. Apache
  8. 9. MySQL
  9. 10. PHP </li></ul>
  10. 11. PHP Application Stacks <ul><li>Linux | OS-X | Windows
  11. 12. Apache | Nginx | Lighttpd | IIS
  12. 13. MySQL | Postgres | SQL Server | Mongo | Couchdb
  13. 14. PHP + Javascript </li></ul>
  14. 15. The cool kids might say otherwise... LAMP is good enough for YOU Worry about PSS (Precious Snowflake Syndrome)
  15. 17. TOY vs. BUSINESS VALUE
  16. 18. What is a basic PHP application? <ul><li>Something that accepts a request
  17. 19. Something that persists data
  18. 20. Some that routes your request
  19. 21. Something that displays the response </li></ul>
  20. 22. Explosion of PHP Frameworks causes a lack of focus <ul><li>Built for the web
  21. 23. Share-nothing
  22. 24. 3 rd party integration </li></ul>
  23. 25. SOMETHING THAT ACCEPTS YOUR WEB REQUESTS <ul><li>Apache?
  24. 26. Lighttpd?
  25. 27. Nginx?
  26. 28. IIS? </li></ul>IT DOES NOT MATTER
  27. 30. Every choice can handle modern needs <ul><li>URL re-writing
  28. 31. Ability to pass through dynamic requests
  29. 32. Compressing data before serving </li></ul>
  30. 33. STFU And Tell Us! <ul><li>Apache – well-understood, easy to get help
  31. 34. Nginx + Lighttpd require PHP configuration
  32. 35. New tools required for monitoring FCGI </li></ul>
  33. 36. <ul><li>Web-server modules are the key
  34. 37. Apache + Nginx works too! </li></ul>
  35. 38. SOME PERSISTENCE OF DATA <ul><li>NoSQL or RDBMS?
  36. 39. Clustered or not-clustered? </li></ul>DEPENDS ON THE DATA
  37. 40. <ul><li>Domain model?
  38. 41. Heavy reads?
  39. 42. Heavy writes? </li></ul>
  40. 43. STEP 1: FIGURE OUT RELATIONSHIPS STEP 2: FIGURE OUT USAGE PATTERNS STEP 3: PROFIT?
  41. 44. DATA MODEL <ul><li>Key-value?
  42. 45. Document?
  43. 46. Relational? </li></ul>
  44. 47. <ul><li>RDBMS are high-performing and reliable
  45. 48. Make great key-value stores (ala Reddit)
  46. 49. MySQL will never page you at 3 AM due to obscure replication bug
  47. 50. UNSEXY GETS THE JOB DONE </li></ul>
  48. 51. http://teddziuba.com/2010/03/i-cant-wait-for-nosql-to-die.html You Are Not Google “ The sooner your company admits this, the sooner you can get down to some real work. Developing the app for Google-sized scale is a waste of your time, plus, there is no way you will get it right. Absolutely none. It's not that you're not smart enough, it's that you do not have the experience to know what problems you will see at scale.”
  49. 52. STFU and Tell Us!
  50. 53. SOMETHING THAT ROUTES YOUR REQUEST ROUTING IS NOT SEXY
  51. 54. SOMETHING THAT ROUTES YOUR REQUEST <ul><li>Frameworks the quickest way
  52. 55. Web server rewrite rules for the hardcore
  53. 56. Front controller or page controller </li></ul>
  54. 57. STFU and Tell Us! <ul><li>System should react to HTTP verbs
  55. 58. System should allow reuse of URLs </li></ul>
  56. 59. SOMETHING THAT DISPLAYS THE RESPONSE TEMPLATING SYSTEMS ARE NOT SEXY
  57. 60. SOMETHING THAT DISPLAYS THE RESPONSE <ul><li>Frameworks the quickest way
  58. 61. Designers can learn PHP too!
  59. 62. Careful about use of custom tags
  60. 63. PHP is a TEMPLATING LANGUAGE </li></ul>
  61. 64. STFU And Tell Us! Picking a templating “language” is simply yak shaving
  62. 65. STFU And Tell Us! What stack you use actually matters very little
  63. 66. Essential Add-ons Alternate PHP Cache (APC) <ul><li>Opcode caching for performance
  64. 67. User-space caching </li></ul>
  65. 68. Essential Add-ons Memcache <ul><li>In-memory key-value storage
  66. 69. Membase (Memcache + persistence)
  67. 70. Redis (Memcache compatible) </li></ul>
  68. 71. TO THE CLOUD!
  69. 74. What Orchestra Offers <ul>“The idea is that we aren't the dated LAMP stack but rather a more modern nginx, load-balanced, caching, php-fpm, mongo, etc.” </ul>“A platform built for today and tomorrows needs instead of a traditional platform made to handle the problems we had 10-15 years ago.”
  70. 75. Now Architecture Matters <ul><li>Performance different
  71. 76. Count on components disappearing
  72. 77. Application architecture matters! </li></ul>
  73. 79. THANK YOU <ul><li>Questions?
  74. 80. Comments?
  75. 81. Complaints </li></ul>http://www.littlehart.net/atthekeyboard

×