rails in the large
play

Rails in the Large: Building the Biggest (Enterprise) Rails - PowerPoint PPT Presentation

Thought Works Thought Works Rails in the Large: Building the Biggest (Enterprise) Rails Application in the World PAUL GROSS software developer / consultant NEAL FORD software architect / meme wrangle r Thought Works Thought Works


  1. Thought Works Thought Works Rails in the Large: Building the Biggest (Enterprise) Rails Application in the World PAUL GROSS software developer / consultant NEAL FORD software architect / meme wrangle r Thought Works Thought Works nford@thoughtworks.com pgross@thoughtworks.com 3003 Summit Boulevard, Atlanta, GA 30319 200 E. Randolph St, 25th Floor, Chicago, IL 60601-6501 www.nealford.com pgross@thoughtworks.com www.thoughtworks.com www.pgrs.net blog: memeagora.blogspot.com www.thoughtworks.com twitter: neal4d

  2. what OVE.com does

  3. the pursuit Go for the one that’ll beat the one that’ll beat the one you last did

  4. .NET Rails

  5. quick start: october 2006 Project manager Business Analyst Tech Lead Developer

  6. inception: Jan 17, 2007 Started with 2 pairs Added one pair every 2 weeks 8 or 9 pairs by July

  7. now 8 business analysts 11 pairs of developers iteration manager client principle project manager 6 quality assurance

  8. lessons learned technology isn’t as important as responsiveness to business needs don’t try to convince too early spikes are your friends! demonstration over arguments

  9. infrastructure Rock is for Rookies: males have a tendency to lead with Rock on their opening throw

  10. physical infrastructure BA standalone QA integrated QA pairing workstations UAT (sneak peak) XServe (Selenium Grid)

  11. deployment stack 10 web boxes 2 image servers 4 database servers background server memcache

  12. technical stats

  13. environment

  14. lessons learned scale infrastructure opportunistically... ...but don’t wait too long Mac OS X rocks have fun

  15. testing Scissors on First: play scissors as your opening move against a more experienced player

  16. disconnected unit tests UnitRecord and the evolution of unit tests that don’t hit the database http://github.com/dan-manges/unit-record

  17. unit tests

  18. the rule: unit tests don’t hit the database mock everything

  19. functional tests

  20. no mocking allowed in functional tests tests that hit the database are slooooow

  21. DeepTest http://github.com/qxjit/deep-test

  22. DistributedDeepTest

  23. prefer factories over fixtures

  24. Selenium grid

  25. new instances added as needed

  26. cc.rb instances Selenium view builds trunk Selenium view builds release core trunk build (commit build) trunk + search infrastructure core-release, externals, web services, datasets

  27. deployment & testing

  28. lessons learned fight the battle to keep tests fast invent stuff if you have to write smart tests scale development infrastructure just like production infrastructure

  29. knowledge transfer Paper is the least obvious of opening moves.

  30. project Mingle on the wall

  31. cc_board http://github.com/qxjit/cc_board/

  32. play a song when a build breaks play theme song upon successful checkin

  33. jukebox.rb currently in alpha http://subversion.hammersforge.com/ jukebox.rb/trunk/

  34. pairing stations adium no email

  35. internal Jabber server chat rooms devs BAs QAs shared buddy list

  36. automatically set pair name adium Mingle card (upon commit)

  37. lessons learned software is more about communication than technology use information radiators co-location rocks pairing really rocks have fun

  38. automate everything When playing with someone who is not experienced at the RPS, look out for double runs or, in other words, the same throw twice.

  39. 1-click deploy to any environment using cc.rb as easy deployment tool

  40. rake commit run all unit tests run all functional tests verification (language keys) commit http://github.com/pgr0ss/rake_commit_tasks

  41. canonical pairing station maintenance cap pairing_stations

  42. radmind http://rsug.itd.umich.edu/software/radmind/

  43. strict rules for advanced language features Tell your opponent what you are going to throw and then actually throw what you said.

  44. monkey patches all live in extensions folder

  45. modularize extensions extend (or include) into real class

  46. ancestors

  47. where did you come from again?

  48. test the extensions duh!

  49. include a version test to break upon upgrade

  50. use meta-names somewhere ack is your friend

  51. Try playing the throw that would have lost to your opponents last throw background processing

  52. 3 kinds continually run updating cached values counts CRON-like behavior run at a certain time Asynchronous behavior progress bars image downloading

  53. evolution of async messaging

  54. do work inline gets slower over time traffic goes up

  55. use backgroundrb for simple message queue backed by database

  56. switch to a real messaging queue (Starling)

  57. YAGNI emergent design around async messaging

  58. lessons learned avoid anticipatory design gradually add complexity don’t use databases as message queues (for too long anyway) DBA’s can sometimes get grumpy

  59. external dependencies When playing against someone who asks you to remind them about the rules, take the opportunity to subtly "suggest a throw" as you explain to them by physically showing them the throw you want them to play.

  60. make well defined boundaries

  61. mock and stub boundaries

  62. external builds to test service changes we often catch bugs & downtime in other services

  63. tests to validate WSDLs haven’t changed

  64. tests to call services check that responses haven’t changed

  65. tests to check against content & html editors non-printable characters duplicate ids

  66. performance & optimization When all else fails, go with paper: Statistically, in competition play, it has been observed that scissors is thrown the least often.

  67. not that many page views... ... really complex pages!

  68. custom hand-tuned SQL

  69. Memcache sessions & many database lookups

  70. MySQL replication

  71. use separate boxes for ETL schemas write priority

  72. challenges For tournament play, learn the Great Eight Gambits.

  73. scaling is hard no matter the technology

  74. rails can scale!

  75. daily web trends

  76. monthly web trends

  77. upgrading is hard 1 pair => 6 weeks to upgrade from 1.2.3 to 2.2

  78. back port fixes & improvements rails other plugins

  79. we did not replicate a freakin’ type system! # of is_a?, kind_of? instance_of? / Total LoC 32/32379 => code (0.09%) 60/103421 => tests (0.06%)

  80. why all the rochambeau stuff?

  81. view builds are fragile => d = > c . r b b u i l p a r a t e c s e view builds are slow => s v i e w s i g n e d a 1 p a i r a s m a s t e r s

  82. worst ...ever ...job

  83. today’s view master assigned by yesterday’s... ...or play RPS

  84. http://www.worldrps.com/

  85. would we do it again? hell yeah!

  86. Thought Works ?’s This work is licensed under the Creative Commons Attribution-Share Alike 3.0 License. http://creativecommons.org/licenses/by-sa/3.0/us/ PAUL GROSS software developer / consultant NEAL FORD software architect / meme wrangle r Thought Works Thought Works nford@thoughtworks.com pgross@thoughtworks.com 3003 Summit Boulevard, Atlanta, GA 30319 www.nealford.com 200 E. Randolph St, 25th Floor, Chicago, IL 60601-6501 pgross@thoughtworks.com www.thoughtworks.com www.pgrs.net blog: memeagora.blogspot.com twitter: neal4d www.thoughtworks.com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend