+ All Categories
Home > Documents > Crank Up Your Apps With TorqueBox

Crank Up Your Apps With TorqueBox

Date post: 19-Jan-2015
Category:
Upload: jim-crossley
View: 4,536 times
Download: 2 times
Share this document with a friend
Description:
Presentation by Jim Crossley at Magic Ruby 2011
Popular Tags:
110
MagicRuby Feb 2011 Crank Up Your Apps With Creative Commons BY SA 3.0 Jim Crossley 1
Transcript
Page 1: Crank Up Your Apps With TorqueBox

MagicRubyFeb 2011

Crank Up Your Apps With

Creative Commons BY-SA 3.0

Jim Crossley

1

Page 2: Crank Up Your Apps With TorqueBox

Jim who?

• “recovering java architect”

• java since ’96, ruby since ’06

• emacs and guitars since forever

• Red Hat Senior Engineer

• proud member of

2

Page 3: Crank Up Your Apps With TorqueBox

3

Page 4: Crank Up Your Apps With TorqueBox

Bob McWhirter

4

Page 5: Crank Up Your Apps With TorqueBox

Agenda• High-level BS and Development

Process

• Web, Messaging, Scheduling, Services, Clustering

5

Page 6: Crank Up Your Apps With TorqueBox

TorqueBoxthe power of JBoss with the expressiveness of Ruby

6

Page 7: Crank Up Your Apps With TorqueBox

TorqueBox: what?

• A “real” app server for Ruby

• Founded in 2008

• Bob’s “labor of love”

• 100% open-source, LGPL license

• Reflects a strong commitment to Ruby from Red Hat

7

Page 8: Crank Up Your Apps With TorqueBox

TorqueBox: why?

• “Native” support for Rack apps

• Built-in background processing

• Built-in scheduling

• Built-in clustering

• Easily scalable

• Optionally enterprisey

8

Page 9: Crank Up Your Apps With TorqueBox

JRubya good idea done well

9

Page 10: Crank Up Your Apps With TorqueBox

JRuby: why?

• Very fast runtime

• Real threads

• Java libraries

• Java tools

• Healthy community

10

Page 11: Crank Up Your Apps With TorqueBox

JRuby: why not?

• Slower start up

• Native gems

• FFI

• C extension support

• Some Ruby libs not thread-safe

11

Page 12: Crank Up Your Apps With TorqueBox

JBoss ASbut before we get to that...

12

Page 13: Crank Up Your Apps With TorqueBox

Enterprise Javamisconceptions

13

Page 14: Crank Up Your Apps With TorqueBox

Scary?Is it

14

Page 15: Crank Up Your Apps With TorqueBox

Acronymious?

AWT

EAR

EJBJAR

JAX-RPC

JAX-RS

JAX-WS

JAXB

JAXPJCK

JCP

JDBC JDK

JDO

JDOMJEE

JLSJME

JMM

JMS

JMXJNDI

JNIJNLP JPA

JPQL

JREJSE

JSF

JSP JSR

JSTLJTA

JVM

JTS JWS

NPE

NIO

SAF POJO

WAR SLSB

15

Page 16: Crank Up Your Apps With TorqueBox

Bloated?

16

Page 17: Crank Up Your Apps With TorqueBox

Bewildering?

17

Page 18: Crank Up Your Apps With TorqueBox

Enterprise Java is all thatand more! but...

18

Page 19: Crank Up Your Apps With TorqueBox

I promise...

• No XML

• No Java *

• No war files *

• Only Ruby, YAML and...

* Unless you really want to

19

Page 20: Crank Up Your Apps With TorqueBox

JBoss ASthe enterprisey good parts

20

Page 21: Crank Up Your Apps With TorqueBox

JBoss AS6

• Tomcat for web

• Infinispan for caching

• HornetQ for messaging

• Quartz for scheduling

• mod_cluster for clustering

21

Page 22: Crank Up Your Apps With TorqueBox

AS = Application Server

• Not just “web server + interpreter”

• More like initd than httpd

• Can host multiple, disparate apps simultaneously

• Provides basic services to all the apps it hosts

22

Page 23: Crank Up Your Apps With TorqueBox

Hot Deployment

• anything added to deploy/ will get deployed

• anything removed from deploy/ will get undeployed

• anything updated in deploy/ will get redeployed

• TorqueBox deployers make JBoss grok YAML and ruby archives

$JBOSS_HOME/server/default/deploy/

23

Page 24: Crank Up Your Apps With TorqueBox

Hot Deployment

• anything added to deploy/ will get deployed

• anything removed from deploy/ will get undeployed

• anything updated in deploy/ will get redeployed

• TorqueBox deployers make JBoss grok YAML and ruby archives

$JBOSS_HOME/server/default/deploy/

deployment descriptors

24

Page 25: Crank Up Your Apps With TorqueBox

Hot Deployment

• anything added to deploy/ will get deployed

• anything removed from deploy/ will get undeployed

• anything updated in deploy/ will get redeployed

• TorqueBox deployers make JBoss grok YAML and ruby archives

$JBOSS_HOME/server/default/deploy/

zip files (archives)

25

Page 26: Crank Up Your Apps With TorqueBox

Development Processhow do they work?

26

Page 27: Crank Up Your Apps With TorqueBox

easy install

$ wget http://torquebox.org/torquebox-dev.zip$ unzip torquebox-dev.zip

$ export TORQUEBOX_HOME=$PWD/torquebox-1*$ export JBOSS_HOME=$TORQUEBOX_HOME/jboss$ export JRUBY_HOME=$TORQUEBOX_HOME/jruby

$ export PATH=$JRUBY_HOME/bin:$PATH

27

Page 28: Crank Up Your Apps With TorqueBox

easy install

$ wget http://torquebox.org/torquebox-dev.zip$ unzip torquebox-dev.zip

$ export TORQUEBOX_HOME=$PWD/torquebox-1*$ export JBOSS_HOME=$TORQUEBOX_HOME/jboss$ export JRUBY_HOME=$TORQUEBOX_HOME/jruby

$ export PATH=$JRUBY_HOME/bin:$PATH

28

Page 29: Crank Up Your Apps With TorqueBox

easy install

$ wget http://torquebox.org/torquebox-dev.zip$ unzip torquebox-dev.zip

$ export TORQUEBOX_HOME=$PWD/torquebox-1*$ export JBOSS_HOME=$TORQUEBOX_HOME/jboss$ export JRUBY_HOME=$TORQUEBOX_HOME/jruby

$ export PATH=$JRUBY_HOME/bin:$PATH

29

Page 30: Crank Up Your Apps With TorqueBox

easy install

$ wget http://torquebox.org/torquebox-dev.zip$ unzip torquebox-dev.zip

$ export TORQUEBOX_HOME=$PWD/torquebox-1*$ export JBOSS_HOME=$TORQUEBOX_HOME/jboss$ export JRUBY_HOME=$TORQUEBOX_HOME/jruby

$ export PATH=$JRUBY_HOME/bin:$PATH

Make sure the jruby found in your path is in $JRUBY_HOME/bin.

30

Page 31: Crank Up Your Apps With TorqueBox

easy install

$ jruby -S gem install bundler$ jruby -S gem install rails$ jruby -S gem install sinatra

31

Page 32: Crank Up Your Apps With TorqueBox

Rakefile

rake tasks

require "org.torquebox.rake-support"

32

Page 33: Crank Up Your Apps With TorqueBox

rake tasks

rake torquebox:run Run TorqueBox server

rake torquebox:deploy[context_path] Deploy the app in the current directory

rake torquebox:undeploy Undeploy the app in the current directory

33

Page 34: Crank Up Your Apps With TorqueBox

rake tasks

Start torquebox:run in its own shell and leave it running. Instead of script/server or shotgun or thin or whatever else, use torquebox:deploy.

34

Page 35: Crank Up Your Apps With TorqueBox

deployment descriptors

torquebox:deploy creates a deployment descriptor in the JBoss deploy/ directory

35

Page 36: Crank Up Your Apps With TorqueBox

deploy/myapp-rails,rack.yml

deployment descriptors

application: root: /path/to/myapp env: developmentweb: context: myapp host: www.yourhost.com static: public rackup: config.ruenvironment: MAIL_HOST: mail.yourhost.com REPLY_TO: [email protected]

36

Page 37: Crank Up Your Apps With TorqueBox

deploy/myapp-rails,rack.yml

deployment descriptors

application: root: /path/to/myapp env: developmentweb: context: myapp host: www.yourhost.com static: public rackup: config.ruenvironment: MAIL_HOST: mail.yourhost.com REPLY_TO: [email protected]

The fully-qualified path to the app.

This will be the value of either

RAILS_ROOT or RACK_ROOT

37

Page 38: Crank Up Your Apps With TorqueBox

deploy/myapp-rails,rack.yml

deployment descriptors

application: root: /path/to/myapp env: developmentweb: context: myapp host: www.yourhost.com static: public rackup: config.ruenvironment: MAIL_HOST: mail.yourhost.com REPLY_TO: [email protected]

The runtime mode of the app. This will be either RAILS_ENV

or RACK_ENV

38

Page 39: Crank Up Your Apps With TorqueBox

deploy/myapp-rails,rack.yml

deployment descriptors

application: root: /path/to/myapp env: developmentweb: context: myapp host: www.yourhost.com static: public rackup: config.ruenvironment: MAIL_HOST: mail.yourhost.com REPLY_TO: [email protected]

The app’s context path (or “sub URI”):

http://localhost:8080/myappCan be set via rake:

rake torquebox:deploy[myapp]The default is root:

http://localhost:8080/

39

Page 40: Crank Up Your Apps With TorqueBox

deploy/myapp-rails,rack.yml

deployment descriptors

application: root: /path/to/myapp env: developmentweb: context: myapp host: www.yourhost.com static: public rackup: config.ruenvironment: MAIL_HOST: mail.yourhost.com REPLY_TO: [email protected]

A list of virtual hostnames to which

to bind the app.

40

Page 41: Crank Up Your Apps With TorqueBox

deploy/myapp-rails,rack.yml

deployment descriptors

application: root: /path/to/myapp env: developmentweb: context: myapp host: www.yourhost.com static: public rackup: config.ruenvironment: MAIL_HOST: mail.yourhost.com REPLY_TO: [email protected]

The location of the app’s static

content, either absolute or relative to the app’s root.

41

Page 42: Crank Up Your Apps With TorqueBox

deploy/myapp-rails,rack.yml

deployment descriptors

application: root: /path/to/myapp env: developmentweb: context: myapp host: www.yourhost.com static: public rackup: config.ruenvironment: MAIL_HOST: mail.yourhost.com REPLY_TO: [email protected]

The name of the rackup script used to

boot your app

42

Page 43: Crank Up Your Apps With TorqueBox

deploy/myapp-rails,rack.yml

deployment descriptors

application: root: /path/to/myapp env: developmentweb: context: myapp host: www.yourhost.com static: public rackup: config.ruenvironment: MAIL_HOST: mail.yourhost.com REPLY_TO: [email protected]

Any environment variables required

by the app.

43

Page 44: Crank Up Your Apps With TorqueBox

deployment descriptors

• config/torquebox.yml

• internal descriptors have the same structure as the external ones in deploy/

•may be used to provide your own reasonable defaults

44

Page 45: Crank Up Your Apps With TorqueBox

Webmake rack, not war

45

Page 46: Crank Up Your Apps With TorqueBox

jruby-rack

• All rack-based frameworks supported: rails, sinatra, etc

• No packaging required: apps deploy from where they sit on disk

• No redeploy necessary to see changes when using rack reloading or rails development mode

46

Page 47: Crank Up Your Apps With TorqueBox

Gemfile

database connectivity

gem "activerecord-jdbc-adapter"

gem "jdbc-postgres"# gem "jdbc-sqlite3"# gem "jdbc-mysql"

47

Page 48: Crank Up Your Apps With TorqueBox

rails template

• Adds TorqueBox rake tasks

• Adds the JDBC sqlite3 gems

• Adds TorqueBox session_store

• Adds Backgroundable module

48

Page 49: Crank Up Your Apps With TorqueBox

my first rails app

$ jruby -S rails new myapp -m \ $TORQUEBOX_HOME/share/rails/template.rb

$ cd myapp$ jruby -S bundle install

$ jruby -S rake torquebox:deploy

49

Page 50: Crank Up Your Apps With TorqueBox

Messagingasynchronicity

50

Page 51: Crank Up Your Apps With TorqueBox

Resque

ActiveMessaging

cron

Taskr

rufus-scheduler

ConveyorWorkerQueue

Ap4r

CronEdit

lots of options

RailsCronOpen4

Spawn

Sparrow

Kestral

RabbitMQ

ActiveMQ

Amazon SQS

beanstalkd

starling

workling

async_observer

daemons

BackgroundDRb

BackgroundJob

Background-Fu

JobFu

DelayedJob

rake

51

Page 52: Crank Up Your Apps With TorqueBox

TorqueBox::Messaging

• JMS (Java Message Service) is an API for messaging

•HornetQ is the JBoss JMS implementation

52

Page 53: Crank Up Your Apps With TorqueBox

TorqueBox::Messaging

•Task•Backgroundable•MessageProcessor

•Queue•Topic

53

Page 54: Crank Up Your Apps With TorqueBox

TorqueBox::Messaging

• No extra tables in your database

• No external system to manage

• Little to no config required at all

• No redeploy necessary in dev mode

• Efficient loading of rails environment

• Automatic load balancing and retries

• Works on Windows, if you care

54

Page 55: Crank Up Your Apps With TorqueBox

app/tasks/email_task.rb

Tasks

class EmailTask < TorqueBox::Messaging::Task def welcome(payload) person = payload[:person] person ||= Person.find_by_id(payload[:id]) if person # send the email person.welcomed = true person.save! end endend

55

Page 56: Crank Up Your Apps With TorqueBox

app/tasks/email_task.rb

Tasks

class EmailTask < TorqueBox::Messaging::Task def welcome(payload) person = payload[:person] person ||= Person.find_by_id(payload[:id]) if person # send the email person.welcomed = true person.save! end endend

56

Page 57: Crank Up Your Apps With TorqueBox

app/tasks/email_task.rb

Tasks

class EmailTask < TorqueBox::Messaging::Task def welcome(payload) person = payload[:person] person ||= Person.find_by_id(payload[:id]) if person # send the email person.welcomed = true person.save! end endend

57

Page 58: Crank Up Your Apps With TorqueBox

app/tasks/email_task.rb

Tasks

class EmailTask < TorqueBox::Messaging::Task def welcome(payload) person = payload[:person] person ||= Person.find_by_id(payload[:id]) if person # send the email person.welcomed = true person.save! end endend

58

Page 59: Crank Up Your Apps With TorqueBox

app/tasks/email_task.rb

Tasks

class EmailTask < TorqueBox::Messaging::Task def welcome(payload) person = payload[:person] person ||= Person.find_by_id(payload[:id]) if person # send the email person.welcomed = true person.save! end endend

59

Page 60: Crank Up Your Apps With TorqueBox

app/controllers/people_controller.rb

Tasks

class PeopleController < ApplicationController def create @person = Person.new(params[:person]) respond_to do |format| if @person.save EmailTask.async(:welcome, :id => person.id) # respond appropriately end end endend

60

Page 61: Crank Up Your Apps With TorqueBox

app/controllers/people_controller.rb

Tasks

class PeopleController < ApplicationController def create @person = Person.new(params[:person]) respond_to do |format| if @person.save EmailTask.async(:welcome, :id => person.id) # respond appropriately end end endend

61

Page 62: Crank Up Your Apps With TorqueBox

Tasks

Call them from your controllers, models, and observers, or even other tasks. Even in non-Rails apps!

62

Page 63: Crank Up Your Apps With TorqueBox

Backgroundable

Inspired by DelayedJob’s handle_asynchronously, it’s trivial to create implicit background Tasks.

63

Page 64: Crank Up Your Apps With TorqueBox

lib/something.rb

Backgroundable

include TorqueBox::Messaging

class Something include Backgroundable always_background :foo def foo;; end def bar;; [email protected]@something.background.bar

64

Page 65: Crank Up Your Apps With TorqueBox

lib/something.rb

Backgroundable

include TorqueBox::Messaging

class Something include Backgroundable always_background :foo def foo;; end def bar;; [email protected]@something.background.bar

65

Page 66: Crank Up Your Apps With TorqueBox

lib/something.rb

Backgroundable

include TorqueBox::Messaging

class Something include Backgroundable always_background :foo def foo;; end def bar;; [email protected]@something.background.bar

66

Page 67: Crank Up Your Apps With TorqueBox

lib/something.rb

Backgroundable

include TorqueBox::Messaging

class Something include Backgroundable always_background :foo def foo;; end def bar;; [email protected]@something.background.bar

67

Page 68: Crank Up Your Apps With TorqueBox

app/models/slow_poke.rb

Backgroundable

class SlowPoke < ActiveRecord::Base def takes_forever;; end def might_take_awhile;; endend

SlowPoke.always_background :takes_forever

@[email protected]_take_awhile

68

Page 69: Crank Up Your Apps With TorqueBox

Queues

Tasks are built on top of Queues. Of course, you may build your own “MOM” apps by defining your own Queues, Topics, and their message Processors yourself.

69

Page 70: Crank Up Your Apps With TorqueBox

config/queues.yml

Queues

/queues/questions:

/queues/answers: durable: false

70

Page 71: Crank Up Your Apps With TorqueBox

Processors

You can create a processor class to receive messages from a Topic or Queue

71

Page 72: Crank Up Your Apps With TorqueBox

config/messaging.yml

Processors

/topics/print: PrintHandler/queues/popular: - PopularHandler - AdultObserver: filter: "age >= 18" concurrency: 5/queues/students: PrintHandler: config: color: true

72

Page 73: Crank Up Your Apps With TorqueBox

config/messaging.yml

Processors

/topics/print: PrintHandler/queues/popular: - PopularHandler - AdultObserver: filter: "age >= 18" concurrency: 5/queues/students: PrintHandler: config: color: true

73

Page 74: Crank Up Your Apps With TorqueBox

config/messaging.yml

Processors

/topics/print: PrintHandler/queues/popular: - PopularHandler - AdultObserver: filter: "age >= 18" concurrency: 5/queues/students: PrintHandler: config: color: true

74

Page 75: Crank Up Your Apps With TorqueBox

config/messaging.yml

Processors

/topics/print: PrintHandler/queues/popular: - PopularHandler - AdultObserver: filter: "age >= 18" concurrency: 5/queues/students: PrintHandler: config: color: true

75

Page 76: Crank Up Your Apps With TorqueBox

app/models/print_handler.rb

Processors

include TorqueBox::Messaging

class PrintHandler < MessageProcessor def on_message(body) puts "Processing #body of #message" end def configure(opts) @color = opts['color'] endend

76

Page 77: Crank Up Your Apps With TorqueBox

Queues (again)

But how do you send a message?

77

Page 78: Crank Up Your Apps With TorqueBox

example

Queues

include TorqueBoxreq = Messaging::Queue.new '/queues/questions'res = Messaging::Queue.new '/queues/answers' Thread.new do req.publish "What time is it?" puts res.receive( :timeout => 1000 )end puts req.receiveres.publish Time.now

78

Page 79: Crank Up Your Apps With TorqueBox

example

Queues

include TorqueBoxreq = Messaging::Queue.new '/queues/questions'res = Messaging::Queue.new '/queues/answers' Thread.new do req.publish "What time is it?" puts res.receive( :timeout => 1000 )end puts req.receiveres.publish Time.now

79

Page 80: Crank Up Your Apps With TorqueBox

example

Queues

include TorqueBoxreq = Messaging::Queue.new '/queues/questions'res = Messaging::Queue.new '/queues/answers' Thread.new do req.publish "What time is it?" puts res.receive( :timeout => 1000 )end puts req.receiveres.publish Time.now

80

Page 81: Crank Up Your Apps With TorqueBox

example

Queues

include TorqueBoxreq = Messaging::Queue.new '/queues/questions'res = Messaging::Queue.new '/queues/answers' Thread.new do req.publish "What time is it?" puts res.receive( :timeout => 1000 )end puts req.receiveres.publish Time.now

81

Page 82: Crank Up Your Apps With TorqueBox

“on the fly”

Queues

include TorqueBox

queue = Messaging::Queue.new '/queues/foo'queue.create ... queue.destroy

82

Page 83: Crank Up Your Apps With TorqueBox

Topics

• behavior is different, but interface is the same.

• all subscribers of a topic see each message, but only one subscriber will see any message from a queue

• use topics.yml to define topics

• use TorqueBox::Messaging::Topic

83

Page 84: Crank Up Your Apps With TorqueBox

Schedulingget regular later

84

Page 85: Crank Up Your Apps With TorqueBox

app/jobs/newsletter_sender.rb

Jobs

class NewsletterSender def run() subscriptions = Subscription.find(:all) subscriptions.each do |e| send_newsletter( e ) end end end

85

Page 86: Crank Up Your Apps With TorqueBox

config/jobs.yml

Jobs

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

sandbox: job: Sandbox cron: ‘*/5 * * * * ?’

86

Page 87: Crank Up Your Apps With TorqueBox

Seconds Minutes Hours DOM Month DOW Year

0-59 0-59 0-23 1-31? L W

1-12JAN-DEC

1-7SUN-SAT? L #

1970-2099empty

0 */30 10-13 ? * FRI#3

“Fire every half hour from 10am until 1pm on the third Friday of each month”

Jobs

87

Page 88: Crank Up Your Apps With TorqueBox

Jobs

• More portable. What is the first day of the week on BSD again? What’s cron on Windows?

• Self contained within the app. No external systems to manage and keep in sync.

• Full rails environment loaded and available.

88

Page 89: Crank Up Your Apps With TorqueBox

Servicesrun along, lil’ daemon

89

Page 90: Crank Up Your Apps With TorqueBox

Services

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

90

Page 91: Crank Up Your Apps With TorqueBox

Services

• Represented as a class with optional initialize(Hash), start() and stop() methods, which should each return quickly.

• Typically will start a long-running loop in a thread and respond to external events.

• Configured via services.yml

91

Page 92: Crank Up Your Apps With TorqueBox

config/services.yml

Services

IrcBot: server: freenode.net channel: #torquebox publish: /topics/irc

MyMudServer:

SomeOtherService:

92

Page 93: Crank Up Your Apps With TorqueBox

app/models,etc/my_service.rb

Services

class MyService def initialize opts= name = opts[:publish] @queue = Messaging::Queue.new(name) end def start Thread.new run end def stop @done = true endend

93

Page 94: Crank Up Your Apps With TorqueBox

app/models,etc/my_service.rb

Services

class MyService def initialize opts= name = opts[:publish] @queue = Messaging::Queue.new(name) end def start Thread.new run end def stop @done = true endend

94

Page 95: Crank Up Your Apps With TorqueBox

app/models,etc/my_service.rb

Services

class MyService def initialize opts= name = opts[:publish] @queue = Messaging::Queue.new(name) end def start Thread.new run end def stop @done = true endend

95

Page 96: Crank Up Your Apps With TorqueBox

app/models,etc/my_service.rb

Services

class MyService def initialize opts= name = opts[:publish] @queue = Messaging::Queue.new(name) end def start Thread.new run end def stop @done = true endend

96

Page 97: Crank Up Your Apps With TorqueBox

app/models,etc/my_service.rb

Services

class MyService def run until @done @queue.publish(Time.now) sleep(1) end endend

97

Page 98: Crank Up Your Apps With TorqueBox

app/models,etc/my_service.rb

Services

class MyService def run until @done @queue.publish(Time.now) sleep(1) end endend

98

Page 99: Crank Up Your Apps With TorqueBox

app/services/evented_service.rb

Services

class EventedService def initialize opts= @opts = opts end def start Thread.new EventMachine.run ... end def stop EventMachine.stop endend

99

Page 100: Crank Up Your Apps With TorqueBox

Clusteringless failure faster

100

Page 101: Crank Up Your Apps With TorqueBox

out-of-the-box• JBoss provides

• session replication

• load-balanced messaging

• mod_cluster provides

• session affinity

• intelligent load-balanced web

• failover

101

Page 102: Crank Up Your Apps With TorqueBox

JBOSS_CONFTorqueBox ships with two JBoss server configurations: default (not clustered) and all (clustered). To enable clustering...

$ export JBOSS_CONF=all

102

Page 103: Crank Up Your Apps With TorqueBox

deploy and run

$ export JBOSS_CONF=all$ jruby -S rake torquebox:deploy$ jruby -S rake torquebox:run

103

Page 104: Crank Up Your Apps With TorqueBox

mod_cluster

A reverse proxy implemented as an Apache module with JBoss awareness. Constantly gathers load statistics and deployment availability for intelligent request distribution.

104

Page 105: Crank Up Your Apps With TorqueBox

mod_cluster

105

Page 106: Crank Up Your Apps With TorqueBox

mod_cluster

• Dynamic configuration

• Server-side load factor calculation

• Fine-grained web app lifecycle

• AJP (Apache JServ Protocol) is optional. HTTP[S] is also supported.

106

Page 107: Crank Up Your Apps With TorqueBox

Futurecoming soon

107

Page 108: Crank Up Your Apps With TorqueBox

Future• Performance benchmarking and

optimization

• Infinispan for ActiveSupport::Cache and NoSQL persistence

• JBoss SSO, HASingleton, logging

• CDI injection of Java components into Ruby

• More JavaEE bridged to Ruby where it makes sense, e.g. BPM, Drools, Transactions, etc.

108

Page 109: Crank Up Your Apps With TorqueBox

Resources

• http://torquebox.org

• #torquebox on freenode

• https://github.com/torquebox

• http://twitter.com/torquebox

• http://projectodd.org

109

Page 110: Crank Up Your Apps With TorqueBox

Thanks!questions?

110


Recommended