Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

10.
What you love from Ruby
• Latest Ruby language features
• Mostly-same Ruby standard library
• Pure-Ruby gems work great
• Native gems with JRuby support
• It walks like Ruby, talks like Ruby
• It is Ruby!

19.
What do you optimize for?
• Easy to develop with: short time until ﬁrst deploy
• Fast startup: good response cycle at command line
• Straight-line performance, many operations per second
• Parallelism: utilize many cores to get more done

21.
Production Quality?
• Support for 99%+ of Ruby language features
• Important parts of standard library
• Runs typical Ruby applications and libraries
• Healthy extension ecosystem
• CRuby, JRuby are the only real options right now

22.
CRuby (MRI)
• Up until 1.9, AST interpreter
• YARV bytecode VM introduced for 1.9.0
• GC and performance improvements through 2.x series
• Ruby 2.3 is latest, released in December
• Future work on JIT, GC, happening now

49.
Concurrency? Parallelism?
• Parallelism happens on the harder, e.g. multi-core
• Concurrency happens in the software, e.g. Thread API
• You can have concurrency without parallelism
• You can have both with JRuby

51.
A Mailing Queue
• A simple example of concurrency
• For each job, construct an email to send
• Some computation added to make processing heavier
• "Ruby Concurrency and Parallelism: A Practical Tutorial"
https://www.toptal.com/ruby/ruby-concurrency-and-parallelism-a-
practical-primer

70.
Great Features, Hidden Costs
• Blocks are expensive to create, slower than method calls
• case/when is an O(n) cascade of calls
• Singleton classes/methods are costly and hurt method cache
• Literal arrays, hashes, strings have to be constructed, GCed
• Flow-control exceptions can be very expensive and hard to ﬁnd