Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RailsClub 2016

RailsClub 2016

C40db80709604a6868c769aca6367fb7?s=128

Kir Shatrov

October 22, 2016
Tweet

Transcript

  1. Monolithic Rails: 
 deal with it Railsclub 2016 Kir Shatrov

  2. Kir Shatrov Developer acceleration @ Shopify " Rails, Capistrano, RubyBench

  3. None
  4. Developer acceleration team

  5. Rails Ruby Developer Tools

  6. None
  7. git clone … brew install postgres brew install redis bundle

    install rake db:create
  8. git clone … brew install postgres brew install redis bundle

    install rake db:create где-то тут ломается nokogiri
  9. git clone … brew install postgres brew install redis rake

    db:create vagrant up
  10. VM creation is slow VM has to be updated every

    week from Chef Development in VM is slower VM file system has limitations for frontend stuff
  11. None
  12. The xhyve hypervisor is a port of bhyve to OS

    X. It is built on top of Hypervisor.framework in OS X 10.10 Yosemite and higher, runs entirely in userspace, and has no other dependencies.
  13. None
  14. install Homebrew packages provision language and dependencies ruby, node, go

    create and prepare database setup Git hooks
  15. git clone … brew install postgres brew install redis rake

    db:create dev up
  16. None
  17. Detect dangerous patterns ☠

  18. Detect dangerous patterns changing existing migrations adding new gems changing

    application configuration
  19. None
  20. ⚓ CI ⚓

  21. 50 000

  22. None
  23. None
  24. None
  25. None
  26. None
  27. None
  28. ⚰ Rails upgrade

  29. 1. Make your application boot (fix gem conflicts) 2. Setup

    two Gemfiles and two CI statuses 3. Fix failings tests 4. Deploy to 10% of nodes
  30. None
  31. None
  32. None
  33. 1. Make your application boot (fix gem conflicts) 2. Setup

    two Gemfiles and two CI statuses 3. Fix failings tests 4. Deploy to 10% of nodes
  34. None
  35. 1. Make your application boot (fix gem conflicts) 2. Setup

    two Gemfiles and two CI statuses 3. Fix failings tests 4. Gradually deploy
  36. ⏱ Application boot ⏱

  37. $ rails new railsclub --skip-spring $ time bundle exec rails

    runner "puts 1+1" 2 0.64s user 0.09s system 24% cpu 2.969 total
  38. require 'activerecord' require '/Users/kir/Projects/shopify/vendor/bundle/gems/ activerecord-4.2.7.1/lib/activerecord.rb'

  39. github.com/byroot/bootscale

  40. Rails hacks

  41. block any external calls from inside database transaction instrument Net::HTTP

    by host lint database migrations circuit breaker
  42. continuous improvements share as many tools as possible make people

    happy
  43. shopify.com/careers

  44. @kirs @kirshatrov Спасибо!