Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MonoRails - GoGaRuCo 2012

1,733 views

Published on

Published in: Technology
  • Be the first to comment

MonoRails - GoGaRuCo 2012

  1. 1. MonoRail: Monolithic Rails Application @jackdanger • Square, Inc.
  2. 2. 2015: The Aftermath A Preview of Things to Come
  3. 3. 2015: The Aftermath A Preview of Things to Come ‣ Rails app in multiple datacenters
  4. 4. 2015: The Aftermath A Preview of Things to Come ‣ Rails app in multiple datacenters ‣ Huge MySQL boxes
  5. 5. 2015: The Aftermath A Preview of Things to Come ‣ Rails app in multiple datacenters ‣ Huge MySQL boxes ‣ Over 1,000 controllers
  6. 6. 2015: The Aftermath A Preview of Things to Come ‣ Rails app in multiple datacenters ‣ Huge MySQL boxes ‣ Over 1,000 controllers ‣ Spotty test coverage
  7. 7. 2015: The Aftermath A Preview of Things to Come ‣ Rails app in multiple datacenters ‣ Huge MySQL boxes ‣ Over 1,000 controllers ‣ Spotty test coverage ‣ Sad developers
  8. 8. 2015: The Aftermath A Preview of Things to Come ‣ Rails app in multiple datacenters ‣ Huge MySQL boxes ‣ Over 1,000 controllers ‣ Spotty test coverage ‣ Sad developers ‣ Ultra-slow test suite
  9. 9. 2015: The Aftermath A Preview of Things to Come
  10. 10. 2015: The Aftermath A Preview of Things to Come “Ye gods!”
  11. 11. Make Believe?
  12. 12. Make Believe?
  13. 13. >> can_scale?(Rails)ArgumentError: semantically invalid from scalability.rb:1:in ‘can_scale?’
  14. 14. $ heroku ps:scale web=30
  15. 15. $ heroku ps:scale web=30 Done. Scaled.
  16. 16. Actual Scaling Problems ‣ Scaling your data ‣ Scaling your codebase ‣ Scaling your customers ‣ Scaling your feature count
  17. 17. Actual Scaling Problems ‣ Scaling your data ‣ Scaling your codebase ‣ Scaling your customers ‣ Scaling your feature count ‣ Scaling your developer headcount
  18. 18. THIS SLIDE INTENTIONALLY LEFT BLANK
  19. 19. Blog in 15 Minutes! 1 app == 1 product == 1 developer
  20. 20. Blog in 15 Minutes! 1 app == 1 product == 1 developer “Welcome aboard, put your code here.”
  21. 21. Blog in 15 Minutes! ‣ Admin interface: /admin ‣ Analytics section: /trends
  22. 22. Blog in 15 Minutes! ‣ Admin interface: /admin ‣ Analytics section: /trends “Rails can do anything!” “Let’s make it do everything!”
  23. 23. Blog in 15 Minutes! class ApplicationMailer < ActionMailer::Base # 4 million redundant lines end
  24. 24. Blog in 15 Minutes! class User < ActiveRecord::Base validates_presence_of :email validates_presence_of :phone validates_presence_of :bajillion_other_things end
  25. 25. Blog in 15 Minutes! “Nice mini-framework. Throw that in ./lib !”
  26. 26. Blog in 15 Minutes! “Nice mini-framework. Throw that in ./lib !” “Don’t forget tests in ./spec/lib !”
  27. 27. Optimized for first steps
  28. 28. Young Mature
  29. 29. Young Mature1 Database Many Databases
  30. 30. Young Mature MySQL Postgres or (seriously)Postgres
  31. 31. Young MatureActionMailer
  32. 32. Young MatureActionMailer anything else
  33. 33. Young Mature Only authenticationLost of data in ‘users’ in ‘users’ table
  34. 34. Young Maturefeatures sitting in ./lib internal gems
  35. 35. Young Maturevalidates_*_of Database validations
  36. 36. Young Mature Log everydefault logging significant action
  37. 37. Young Matureanalyze your data analyze your data (in the main db) (elsewhere)
  38. 38. THIS SLIDE INTENTIONALLY LEFT BLANK
  39. 39. Conway’s Law
  40. 40. Conway’s Law"organizations which design systems ... are constrained toproduce designs which are copies of the communicationstructures of these organizations"
  41. 41. Rails can do this.
  42. 42. Rails can do this. But it’ll take foresight.
  43. 43. MonoRail
  44. 44. Service Interfaces1 Email.to “lady@place.com”, :welcome, :group => “b”
  45. 45. Service Interfaces1 Email.to “lady@place.com”, :welcome, :group => “b” Who cares how that happens?
  46. 46. Service Interfaces1 Marketing.render request, :with_condition => “public”
  47. 47. Extract the code2
  48. 48. Extract the code2
  49. 49. Extract the code2
  50. 50. Extract the code2
  51. 51. Move the data3
  52. 52. Move the data3
  53. 53. @jackdanger • Square, Inc.
  54. 54. Credits http://www.flickr.com/photos/ssoosay/7070367799/http://www.flickr.com/photos/23232902@N05/2234965515/ http://openclipart.org/detail/94723

×