SlideShare una empresa de Scribd logo
1 de 100
A True Application Server for Ruby
                                           Lance Ball
                                        Ruby Hoedown
Creative Commons BY-SA 3.0
                                          August 2011
Lance Ball

• TorqueBox Core Developer
• Red Hat Senior Engineer
• Perl -> C++ -> Java -> Ruby
• @lanceball
project:odd
What is TorqueBox?

Ruby Application Server
   Built on JBoss & JRuby

The Power of JBoss with the
 Expressiveness of Ruby
JBoss AS7

TorqueBox is tightly
integrated with JBoss.

Extends JBoss AS7 to
enable a JRuby runtime.
JRuby

•Very fast runtime
•Real threads
•Java libraries
•Java tools
•Healthy community
Ruby App
      Sinatra      Rails
            Rack
      Passenger/Thin


      Apache/Nginx
Ruby App
             Sinatra      Rails
                   Rack
   Tasks     Passenger/Thin
 Resque/
DelayedJob   Apache/Nginx
Ruby App
             Sinatra      Rails
                   Rack
   Tasks     Passenger/Thin       Jobs
 Resque/
DelayedJob   Apache/Nginx         crond
Ruby App
             Sinatra      Rails
                   Rack
   Tasks     Passenger/Thin       Jobs
 Resque/
DelayedJob   Apache/Nginx         crond


                Daemons


              god/monit
Goals
Goals


   No XML, No Java
   (unless you're into that sort of thing)
Goals

•Support Ruby web frameworks
 •Rails
 •Sinatra
 •Rack
Goals
The Obvious & Necessary
 • Rails
 • Sinatra
 • Rack

But do more!
 •  Messaging
 •  Jobs
 •  Services
 •  Plus Even More!
TorqueBox AS

Sinatra      Rails
      Rack            Tasks   Procs            Jobs        Daemons
      Web               Messaging        Scheduling        Services

                                JBoss AS
               Clustering     Load Balancing          HA
Web

Ruby web apps in JBoss

Rack, Rails, Sinatra
Web
config/torquebox.yml

application:
 root: /path/to/myapp
 env: production

web:
 context: /
 host: www.myapp.com

environment:
 MAIL_HOST: mail.myapp.com
Live Editing


 Live updates for Rails apps

 models, views, controllers...
What Else?
Clustering


Ruby apps participate in AS
clustering with mod_cluster
Clustering: mod_cluster

 A reverse proxy implemented as
 an Apache module with JBoss
 awareness.

 Constantly gathers load statistics
 and deployment availability for
 intelligent request distribution.
Caching

Infinispan

A distributed, replicated
object store.
Transparent Infinispan

 Used for all implicit
 caching in Rails.

 Replaces in-memory or
 memcached caches.
Caching
config/application.rb



module YourApp
  class Application < Rails::Application
    config.cache_store = :torque_box_store
  end
end
Caching
my_app.rb

require 'sinatra'
require 'torquebox'

class MyApp < Sinatra::Base

  use TorqueBox::Session::ServletStore

  get '/' do
    session[:message] = 'Hello World!'
    haml :index
  end

end
Opaque Infinispan
some_file.rb




include ActiveSupport::Cache

myCache = TorqueBoxStore.new(:name => 'MyCache',
                             :mode => :replicated)
Jobs
app/jobs/newsletter_sender.rb

class NewsletterSender
 
  def run()
    subscriptions = Subscription.find(:all)
    subscriptions.each do |e|
      send_newsletter(e)
    end
  end
 
end
Jobs
config/torquebox.yml

jobs:
  monthly_newsletter:
   description: first of month
   job: NewsletterSender
   cron: ‘0 0 0 1 * ?’

 process_tps_reports:
  job: TPSReportProcessor
  cron: ‘0 0 0 0 MON ?’
  singleton: true
Regular Class

class User

  def send_welcome_email
    # do something that takes a while
  end

end
Blocking invocations


user = User.new

user.send_welcome_email
Backgroundable

class User

  include TorqueBox::Messaging::Backgroundable

  def send_welcome_email
    # do something that takes a while
  end

end
Explicitly Non-blocking



user = User.new

user.background.send_welcome_email
Choices

class User

  include TorqueBox::Messaging::Backgroundable
  always_background :send_welcome_email

  def send_welcome_email
    # do something that takes a while
  end

end
Implicitly Non-blocking


user = User.new

user.send_welcome_email
See The Future


user = User.new

future = user.send_welcome_email
See The Future

future.started?

future.complete?

future.error?

future.result
See The Future

class User

  def send_welcome_email
    while( !@finished )
      ...
      count += 1
      future.status = count
      ...
    end
  end

end
See The Future


# on the 'client' side

future.status_changed?

future.status # => 42
Messaging


•JMS behind the scenes
•implementation
  HornetQ is the JBoss JMS
Destinations
config/torquebox.yml



queues:
 /queues/questions:
 /queues/answers:
  durable: false
Queues
contrived example


questions = Queue.new('/queues/questions')
answers = Queue.new('/queues/answers')
 
Thread.new do
  questions.publish( "What time is it?" )
  puts answers.receive( :timeout => 1000 )
end
 
puts questions.receive
answers.publish( Time.now )
Queues
contrived example


questions = Queue.new('/queues/questions')
answers = Queue.new('/queues/answers')
 
Thread.new do
  questions.publish( "What time is it?" )
  puts answers.receive( :timeout => 1000 )
end
 
puts questions.receive
answers.publish( Time.now )
Queues
contrived example


questions = Queue.new('/queues/questions')
answers = Queue.new('/queues/answers')
 
Thread.new do
  questions.publish( "What time is it?" )
  puts answers.receive( :timeout => 1000 )
end
 
puts questions.receive
answers.publish( Time.now )
Queues
contrived example


questions = Queue.new('/queues/questions')
answers = Queue.new('/queues/answers')
 
Thread.new do
  questions.publish( "What time is it?" )
  puts answers.receive( :timeout => 1000 )
end
 
puts questions.receive
answers.publish( Time.now )
Queues
“on the fly”



include TorqueBox::Messaging

queue = Queue.new('/queues/foo')
queue.create
# ... 
queue.destroy
Processors
config/torquebox.yml



messaging:
 /queues/receipts:
  PrintHandler:
   concurrency: 5
   config:
     printer: the_little_one
Processors
app/models/print_handler.rb


include TorqueBox::Messaging

class PrintHandler < MessageProcessor
  def initialize(opts)
    @printer = opts['printer'] || default
  end

  def on_message(body)
    puts "Processing #{body} of #{message}"
  end
end
Topics

•interface is different, but
 behavior
           is the same.
•each message, of a only one
 all subscribers
                  but
                      topic see
  subscriber will see any message
  from a queue
• use TorqueBox::Messaging::Topic
Services

Long-running, non-web
“daemons” that share
the runtime environment
and deployment lifecycle
of your app.
Services

•methods, which shouldstop()
 A class with start() and
                          each
 return quickly. Optionally
 provide initialize(Hash).

•running loop startthread and
 Typically will
                in a
                     a long-
 respond to external events.
Services
config/torquebox.yml

services:
 TimeMachine:
  queue: /queue/morris_day

 IrcBot:
   server: freenode.net
   channel: #torquebox
   publish: /topics/irc
   singleton: true
Services
app/services/time_machine.rb
class TimeMachine
  def initialize(opts)
    @queue = Queue.new(opts['queue'])
  end

  def start
    Thread.new { run }
  end

  def stop
    @done = true
  end
 
  def run
    # ...
  end
end
Services
app/services/time_machine.rb
class TimeMachine
  def initialize(opts)
    @queue = Queue.new(opts['queue'])
  end

  def start
    Thread.new { run }
  end

  def stop
    @done = true
  end
 
  def run
    # ...
  end
end
Services
app/services/time_machine.rb
class TimeMachine
  def initialize(opts)
    @queue = Queue.new(opts['queue'])
  end

  def start
    Thread.new { run }
  end

  def stop
    @done = true
  end
 
  def run
    # ...
  end
end
Services
app/services/time_machine.rb
class TimeMachine
  def initialize(opts)
    @queue = Queue.new(opts['queue'])
  end

  def start
    Thread.new { run }
  end

  def stop
    @done = true
  end
 
  def run
    # ...
  end
end
Services
 app/services/time_machine.rb
class TimeMachine
  def initialize(opts)
    @queue = Queue.new(opts['queue'])
  end

  def start
    Thread.new { run }
  end

  def stop
    @done = true
  end
 
  def run
    until @done
      @queue.publish(Time.now)
      sleep(1)
    end
  end
end
Resource Injection

Letting the container
figure out how to help
you wire up complex
component models.
aka


Inversion of Control
CDI Resources


class MyService
  include TorqueBox::Injectors

  def initialize opts={}
    @thing = inject(com.mycorp.Something)
  end
end
But you can inject lots
of things - not just CDI
objects.
Destination Injection


class MyService
  include TorqueBox::Injectors

  def initialize( opts={} )
    @inbound = inject("/queues/questions")
    @outbound = inject("/queues/answers")
  end
end
JNDI Injection


class MyService
  include TorqueBox::Injectors

  def initialize opts={}
    @factory = inject("java:comp/env/jdbc/myDS")
  end
end
JBossMC Injection


class MyService
  include TorqueBox::Injectors

  def initialize opts={}
    @pinto = inject("SomeMCBean")
  end
end
Why MC Beans?
All internal plumbing of
JBoss AS is stitched
together using MC beans.

Grab the WebServer, the
CacheManager, whatevs.
Web Sockets

•Uses STOMP   (protocol)

•And Stilts(framework)

•Provides Stomplet “Controllers”
•Simple JMS Bridging
Stomplet API

 configure( config )

 on_subscribe( subscriber )

 on_unsubscribe( subscriber )

 on_message( message, session )
Web Sockets
app/stomplets/broadcast_stomplet.rb

  require 'torquebox-stomp'

  class BroadcastStomplet

    def on_subscribe(subscriber)
      @subscribers << subscriber
    end
   
    def on_unsubscribe(subscriber)
      @subscribers.delete( subscriber )
    end

    def on_message(stomp_message, session)
      @subscribers.each do |subscriber|
        subscriber.send( stomp_message )
      end
    end

  end
Web Sockets
app/stomplets/broadcast_stomplet.rb

  require 'torquebox-stomp'

  class BroadcastStomplet

    def on_subscribe(subscriber)
      @subscribers << subscriber
    end
   
    def on_unsubscribe(subscriber)
      @subscribers.delete( subscriber )
    end

    def on_message(stomp_message, session)
      @subscribers.each do |subscriber|
        subscriber.send( stomp_message )
      end
    end

  end
Web Sockets
app/stomplets/broadcast_stomplet.rb

  require 'torquebox-stomp'

  class BroadcastStomplet

    def on_subscribe(subscriber)
      @subscribers << subscriber
    end
   
    def on_unsubscribe(subscriber)
      @subscribers.delete( subscriber )
    end

    def on_message(stomp_message, session)
      @subscribers.each do |subscriber|
        subscriber.send( stomp_message )
      end
    end

  end
Web Sockets
app/stomplets/broadcast_stomplet.rb

  require 'torquebox-stomp'

  class BroadcastStomplet

    def on_subscribe(subscriber)
      @subscribers << subscriber
    end
   
    def on_unsubscribe(subscriber)
      @subscribers.delete( subscriber )
    end

    def on_message(stomp_message, session)
      @subscribers.each do |subscriber|
        subscriber.send( stomp_message )
      end
    end

  end
JmsStomplet API


subscribe_to( subscriber, destination )

send_to( destination, message, headers )
JMS Stomplet
app/stomplets/irc_stomplet.rb

  class IrcStomplet < TorqueBox::Stomp::JmsStomplet
    include TorqueBox::Messaging

    def configure(config)
      @destination = Queue.new( config['destination'] )
    end

    def on_subscribe(subscriber)
      # subscribe the client to a JMS message queue
      subscribe_to( subscriber, @destination )

      # send a message to the queue
      send_to( @destination, "TorqueBoxBot in da house",
               :sender => :system, :timestamp => Time.now.ctime )
    end

  end
IRC Bot Service
app/services/irc_bot_service.rb

  class IrcBotService
    include TorqueBox::Messaging
    
    def start
      @bot = configure_bot
      @bot_thread = Thread.new { @bot.connect }
    end

    def configure_bot
      # ...

      # Log all channel messages to the queue
      bot.on :channel do |event_data|
        @destination.publish( event_data[:message],
                              :properties =>
                                {:sender=>event_data[:nick], :timestamp=>Time.now.ctime} )
      end
      bot
    end
  end
Web Sockets
config/torquebox.yml


  stomp:
   stomplets:

    broadcast.stomplet:
     route: '/sockets/broadcast'
     class: BroadcastStomplet

    jms.stomplet:
     route: '/sockets/irc'
     class: IrcStomplet
     config:
      destination: /queues/irc
Web Sockets
javascripts/application.js


  $( function() {
    client = Stomp.client( "ws://localhost:8675/" )

    client.connect( null, null, function() {
      $(window).unload(function() { client.disconnect() });
      
      client.subscribe( '/sockets/bridge', function( message ) {
     $("#messages").append("<li>" + message.body + "</li>")
       })
    })
  })
BENchmarks
Real-world Rail application:
Redmine
Comparisons:
TorqueBox, Trinidad, Glassfish,
Passenger, Unicorn, Thin
Runtimes:
JRuby, MRI, RubyEE
BackStage

Dashboard to inspect
and control Ruby
components.

And a RESTful API.
StompBox


Easy Heroku-esque
git-based deployments.
dm-infinispan-adapter


•DataMapper on Infinispan
•Replicated NoSQL store
Installation & Deployment

$ gem install torquebox-server --pre 
 --source http://torquebox.org/2x/builds/LATEST/gem-repo/

$ torquebox
 Tasks:
   torquebox   deploy ROOT # Deploy an application to TorqueBox
   torquebox   undeploy ROOT # Undeploy an application from TorqueBox
   torquebox   run        # Run TorqueBox
   torquebox   cli      # Run the JBoss AS7 CLI
   torquebox   help [TASK] # Describe available tasks or one specific task
Oh yeah...


It works on Windows.
Roadmap


1.1.1 Stable
2.0 In Development
??? - you tell us
Resources

• http://torquebox.org/
• http://github.com/
 torquebox
• #torquebox on FreeNode
• @torquebox
Thanks!
                                            Questions?
Image attributions:
Soccer Youth Goal Keeper by Torsten Bolten http://en.wikipedia.org/wiki/File:Soccer_Youth_Goal_Keeper.jpg
Series of tubes by ritingon http://www.flickr.com/photos/ritingonthewall/2579076693/
Yawning is danger! by dj badly http://www.flickr.com/photos/djbadly/2052098189/
EuroFoo Schedule by silent-penguin http://www.flickr.com/photos/silent-penguin/232394/
Sink. by _Fidelio_ http://www.flickr.com/photos/photogaby/4129740673/ CC BY 2.0
Telegraph Practice Set from Popular Science, Feb 1947 http://books.google.com/books?id=uyUDAAAAMBAJ&lpg=PA65&pg=PT83#v=onepage&q&f=false
Service as a Strategy Celebration at NCVS 2011 by Be The Change, Inc http://www.flickr.com/photos/bethechangeinc/5816393052/ CC BY-NC 2.0
Cash by ROSS HONG KONG http://www.flickr.com/photos/rossap/2716531616/ CC BY-NC-SA 2.0
Injection by Dr Case http://www.flickr.com/photos/justin_case/3252846177/ CC BY-NC 2.0
IMG_1478 by akshaydavis http://www.flickr.com/photos/akshaydavis/166391476/ CC BY-NC-SA 2.0
Rainforest by Chris.Gray http://www.flickr.com/photos/chriscgray/3946304802/ CC BY-NC-SA 2.0
Community by niallkennedy http://www.flickr.com/photos/niallkennedy/40727794/ CC BY-NC 2.0

Más contenido relacionado

La actualidad más candente

When Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of TorqueboxWhen Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of Torqueboxrockyjaiswal
 
Torquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundosTorquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundosBruno Oliveira
 
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)ngotogenome
 
Torquebox OSCON Java 2011
Torquebox OSCON Java 2011Torquebox OSCON Java 2011
Torquebox OSCON Java 2011tobiascrawley
 
Torquebox @ Raleigh.rb - April 2011
Torquebox @ Raleigh.rb - April 2011Torquebox @ Raleigh.rb - April 2011
Torquebox @ Raleigh.rb - April 2011tobiascrawley
 
ZK_Arch_notes_20081121
ZK_Arch_notes_20081121ZK_Arch_notes_20081121
ZK_Arch_notes_20081121WANGCHOU LU
 
The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015craig lehmann
 
How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the worldHiroshi SHIBATA
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)goccy
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Hiroshi SHIBATA
 
O que há de novo no Rails 3
O que há de novo no Rails 3O que há de novo no Rails 3
O que há de novo no Rails 3Hugo Baraúna
 
How to Begin Developing Ruby Core
How to Begin Developing Ruby CoreHow to Begin Developing Ruby Core
How to Begin Developing Ruby CoreHiroshi SHIBATA
 
Security Goodness with Ruby on Rails
Security Goodness with Ruby on RailsSecurity Goodness with Ruby on Rails
Security Goodness with Ruby on RailsSource Conference
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesHiroshi SHIBATA
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Coursepeter_marklund
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Mark Menard
 
An introduction and future of Ruby coverage library
An introduction and future of Ruby coverage libraryAn introduction and future of Ruby coverage library
An introduction and future of Ruby coverage librarymametter
 
mruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなしmruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなしHiroshi SHIBATA
 

La actualidad más candente (20)

When Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of TorqueboxWhen Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of Torquebox
 
Torquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundosTorquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundos
 
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
 
How DSL works on Ruby
How DSL works on RubyHow DSL works on Ruby
How DSL works on Ruby
 
Torquebox OSCON Java 2011
Torquebox OSCON Java 2011Torquebox OSCON Java 2011
Torquebox OSCON Java 2011
 
Torquebox @ Raleigh.rb - April 2011
Torquebox @ Raleigh.rb - April 2011Torquebox @ Raleigh.rb - April 2011
Torquebox @ Raleigh.rb - April 2011
 
ZK_Arch_notes_20081121
ZK_Arch_notes_20081121ZK_Arch_notes_20081121
ZK_Arch_notes_20081121
 
The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015
 
How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
 
O que há de novo no Rails 3
O que há de novo no Rails 3O que há de novo no Rails 3
O que há de novo no Rails 3
 
How to Begin Developing Ruby Core
How to Begin Developing Ruby CoreHow to Begin Developing Ruby Core
How to Begin Developing Ruby Core
 
Security Goodness with Ruby on Rails
Security Goodness with Ruby on RailsSecurity Goodness with Ruby on Rails
Security Goodness with Ruby on Rails
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 Minutes
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
 
RubyGems 3 & 4
RubyGems 3 & 4RubyGems 3 & 4
RubyGems 3 & 4
 
An introduction and future of Ruby coverage library
An introduction and future of Ruby coverage libraryAn introduction and future of Ruby coverage library
An introduction and future of Ruby coverage library
 
mruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなしmruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなし
 

Similar a TorqueBox - Ruby Hoedown 2011

JUDCon 2010 Boston : TorqueBox
JUDCon 2010 Boston : TorqueBoxJUDCon 2010 Boston : TorqueBox
JUDCon 2010 Boston : TorqueBoxmarekgoldmann
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developergicappa
 
Building web framework with Rack
Building web framework with RackBuilding web framework with Rack
Building web framework with Racksickill
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails DevsDiacode
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发shaokun
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyNick Sieger
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteDr Nic Williams
 
Ninad cucumber rails
Ninad cucumber railsNinad cucumber rails
Ninad cucumber railsninad23p
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileAmazon Web Services Japan
 
Ruby on Rails - Introduction
Ruby on Rails - IntroductionRuby on Rails - Introduction
Ruby on Rails - IntroductionVagmi Mudumbai
 

Similar a TorqueBox - Ruby Hoedown 2011 (20)

JUDCon 2010 Boston : TorqueBox
JUDCon 2010 Boston : TorqueBoxJUDCon 2010 Boston : TorqueBox
JUDCon 2010 Boston : TorqueBox
 
Wider than rails
Wider than railsWider than rails
Wider than rails
 
Intro to Rack
Intro to RackIntro to Rack
Intro to Rack
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developer
 
Speedy TDD with Rails
Speedy TDD with RailsSpeedy TDD with Rails
Speedy TDD with Rails
 
Rack
RackRack
Rack
 
Building web framework with Rack
Building web framework with RackBuilding web framework with Rack
Building web framework with Rack
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end Framework
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in ruby
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRuby
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Rack
RackRack
Rack
 
TorqueBox
TorqueBoxTorqueBox
TorqueBox
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
 
Ninad cucumber rails
Ninad cucumber railsNinad cucumber rails
Ninad cucumber rails
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
Ruby on Rails - Introduction
Ruby on Rails - IntroductionRuby on Rails - Introduction
Ruby on Rails - Introduction
 

Último

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Último (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

TorqueBox - Ruby Hoedown 2011

Notas del editor

  1. \n
  2. \n
  3. \n
  4. What? JBoss? Isn&amp;#x2019;t that Java?\n
  5. to provide all we do, we have to be tightly integrated.\nwhich means no glassfish/websphere/whatever\n
  6. First class ruby\n\n
  7. java developers know what an app server is\n
  8. \n
  9. \n
  10. redeploy\n
  11. Target Audience for TorqueBox\n
  12. \n
  13. We write Java so you don&amp;#x2019;t have to\n
  14. Parity with existing ruby options.\n
  15. Expose what an AS can provide.\n
  16. TorqueBox brings that all together\norange is ruby, red is java\n
  17. components - start with Web - a series of tubes\n
  18. in development mode\n
  19. \n
  20. Where supported. Live editing isn&amp;#x2019;t enabled in Sinatra by default anymore\n
  21. from a rubyists perspective\nminimum requirement for ruby development. It&apos;s expected.\n
  22. \n
  23. \n
  24. As server nodes join and leave the cluster, the balancer (mod_cluster) is aware of these changes.\n
  25. anyone using infinispan?\n\n
  26. we make it easy to use from rails, or anything using the ActiveSupport library\n
  27. \n
  28. \n
  29. we provide TorqueBoxStore, which has the same api as the memcached store\n
  30. Scheduled Jobs\n
  31. Only a run() method is required\n
  32. Jobs run on every node unless singleton: true\n\nSeconds - Minutes - Hours - Day of Month - Month - Day of Week - Year\n\n\n
  33. Asynchronous tasks\n
  34. \n
  35. \n
  36. \n
  37. returns immediately\nguts execute on a separate thread\n
  38. \n
  39. returns immediately\nguts execute on a separate thread\n
  40. allows you to monitor the async execution\n
  41. \n
  42. \n
  43. uses messaging underneath (queues)\n
  44. Messaging\nwe expose those messaging abstractions\n
  45. \n
  46. created at deploy time\n
  47. shows publish and receive\n\n
  48. \n
  49. \n
  50. \n
  51. be sure to destroy\n
  52. \n
  53. Ruby messages are Marshaled and Base64-encoded\n
  54. same semantics\n
  55. Services\n
  56. demons!\n
  57. \n
  58. !!!singleton!\n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. Resource Injection\n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. How does it perform?\nIs it the car or the truck?\ncomparing against other ruby stacks is easy \nbut comparing java to ruby it&apos;s hard to get anything meaningful\n
  86. 10 minute warmup, load increasing every 10 minutes thereafter\n
  87. \n
  88. Good blog post on torquebox.org\n
  89. The TorqueBox Ecosystem\n
  90. deploy to TB\ninspect &amp; manage queues, message processors, ruby runtimes, services, jobs\n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. which is no surprise to java devs, but often is to rubyists\n
  97. we have a few other things, but you tell us\n
  98. OSS (LGPL) - letter, but not modern intent\nactive in mailing lists and irc\nDocumentation with most features on push\ndistributed team - irc tech discussions\nwe offer the process as ONE example, and welcome feedback!\nhowever you do it, focus on your community!\n
  99. \n
  100. \n