Scaling Rails With Torquebox Presented at JUDCon:2011 BostonPresentation Transcript
Scaling Rails Applications with TorqueBox Ben Browning
Ben Browning•TorqueBox Contributor•Red Hat Senior Engineer since July 2010•Ruby yay! JVM yay! Java boo! JRuby yay!
TorqueBox•The power of JBoss with the expressiveness of Ruby•Rails, Sinatra, Rack and non-web applications running on top of JBoss AS and JRuby•Messaging, Asynchronous Tasks, Scheduled Jobs, and Services built-in
Rails“Ruby on Rails® is an open-source web frameworkthat’s optimized for programmer happiness andsustainable productivity. It lets you write beautiful codeby favoring convention over conﬁguration.” - http://rubyonrails.org
ScalingAbility to increase throughput by adding hardware
Learn By (Beer) ExampleLet’s create an application to ﬁnd the most popular beeraccording to Twitter.
Beer Tweets•Web front-end•Twitter Streaming API client•Scheduled job to clean old beer tweets•Caching so our database doesn’t fall over
Queues and Topicsquestions = inject(‘/queues/questions’)answers = inject(‘/queues/answers’)Thread.new do questions.publish ‘What time is it?’ puts answers.receive(:timeout => 1000)endputs questions.receiveanswers.publish Time.now
Queues and Topicsconﬁg/torquebox.yml:queues: /queues/questions: /queues/answers:
BackStageDashboard and RESTful API to inspect and control Rubycomponents
StompBoxEasy Heroku-esque git-based deployments
Roadmap1.0.0 Just Released!Upcoming:AS7TransactionsSSODrools / jBPMMobicentsWebSockets
Resources•http://torquebox.org•https://github.com/torquebox•#torquebox on FreeNode•@torquebox