Extreme Makeover: Rubygems Edition (RubyKaigi 2014)

4c3ed917e59156a36212d48155831482?s=47 André Arko
September 19, 2014

Extreme Makeover: Rubygems Edition (RubyKaigi 2014)

Rubygems.org provides every Rubyist with an amazing service: all the libraries in the Ruby world. As amazing as that is, installing gems can be a time-consuming and even error-prone process. (Just ask the Travis guys.) In this talk, you'll learn about the recent dramatic changes in Rubygems and Bundler to improve speed and reliability by rewriting the Rubygems client/server architecture. I'll show how the new system caches more information, makes fewer requests, and takes less time to install gems. Finally, I'll cover how the changes allow worldwide mirrors of rubygems.org, improving things for Rubyists around the globe.

4c3ed917e59156a36212d48155831482?s=128

André Arko

September 19, 2014
Tweet

Transcript

  1. Extreme Makeover Rubygems Edition

  2. André Arko @indirect

  3. None
  4. Bundler

  5. State of the Rubygems Year in Review

  6. Bundler DDoS ! ! ! ! !

  7. Bundler DDoS

  8. Security breach

  9. Rebuilt rubygems.org

  10. Travis network issues ☁️

  11. Travis DNS issues ☁️

  12. SSL failures ⚠️

  13. SSL fixes

  14. Rebuilt rubygems.org

  15. Bundler Source CVE

  16. Bundler 1.7 released

  17. Bundler 1.7 released

  18. Bundler 1.7.2 released

  19. How it works today

  20. How it works today with a fast connection, at least

  21. /specs/rails-4.0.1.gemspec /specs/sinatra-1.4.2.gemspec ! Gemspecs

  22. /specs/rails-4.0.1.gemspec /specs/sinatra-1.4.2.gemspec /Marshal.4.8.gz Marshalled Gemspecs

  23. /specs/rails-4.0.1.gemspec /specs/sinatra-1.4.2.gemspec /Marshal.4.8.gz /specs.4.8.gz List of Gemspecs

  24. /api/v1/dependencies?gems=rack /specs/gemname-version.gemspec ! The Bundler API

  25. Could be better

  26. We Have A Plan

  27. We Have A Plan simple plaintext indexes

  28. We Have A Plan clients cache the indexes

  29. We Have A Plan put a CDN on it

  30. We Have A Plan easy local mirrors

  31. The New Index /versions /deps/gemname

  32. /versions rack 1.0.0,1.0.1,1.0.2 sinatra 0.9.6,1.0,1.1.4 rack 2.0.0

  33. /deps/sinatra 0.9.6 rack:>= 0.9.1 1.0 rack:>= 1.0 1.1.4 rack:~> 1.1,tilt:<

    2.0&>= 1.2.2
  34. ! +

  35. Where we’re at designed the new index new index from

    bundler-api new index in bundler
  36. What’s left to do new index from rubygems.org ! new

    index in rubygems !
  37. What’s left to do new index from rubygems.org new index

    in rubygems fastly-hosted index files
  38. The Present gem install bundler

  39. bundle install -j4 Parallel gem installs export BUNDLE_JOBS=4

  40. Gem mirrors bundle config mirror.https://rubygems.org https://tokyo-m.rubygems.org

  41. New resolver! better errors faster installs many bugfixes

  42. The Future

  43. New index super fast installs! !

  44. you can help! github.com/bundler/bundler CONTRIBUTING.md

  45. you can help! gittip.com/bundler