TorqueBox
Like a JBoss
What’s TorqueBox
• JRuby API around JBoss to:
• Run Ruby apps in JBoss AS
Who’s TorqueBox?
• Project built and supported by Red Hat
• #torquebox on IRC
• LGPL
• 5 years of active development
What’s JRuby
• Ruby on the JVM
• Not a toy
• Runs unmodified Ruby code
• Fast; Real Threads; Java Integration
What’s JBoss
Why JBoss?
• For an Ordinary Web Application
Why JBoss?
• For an Ordinary Web Application
• Just Run Passenger / Gunicorn
Why JBoss?
• Ordinary Web Application
• Just Run Passenger / Gunicorn
• And Memcached/Redis for caching
Why JBoss?
• Ordinary Web Application
• Just Run Passenger / Gunicorn
• And Memcached/Redis for caching
• And Sidekiq/Cele...
Why JBoss?
• Ordinary Web Application
• Just Run Passenger / Gunicorn
• And Memcached/Redis for caching
• And Sidekiq/Cele...
Why JBoss?
• Ordinary Web Application
• Just Run Passenger / Gunicorn
• And Memcached/Redis for caching
• And Sidekiq/Cele...
Why JBoss?
• Ordinary Web Application
• Just Run Passenger / Gunicorn
• And Memcached/Redis for caching
• And Sidekiq/Cele...
Or
• Just Run JBoss
What’s in the Tin
• JBoss Web + Rack for running Web applications
What’s in the Tin
• JBoss Web + Rack for running Web applications
• Infinispan for caching
What’s in the Tin
• JBoss Web + Rack for running Web applications
• Infinispan for caching
• HornetQ/JMS for messaging
What’s in the Tin
• JBoss Web + Rack for running Web applications
• Infinispan for caching
• HornetQ/JMS for messaging
• Qu...
What’s in the Tin
• JBoss Web + Rack for running Web applications
• Infinispan for caching
• HornetQ/JMS for messaging
• Qu...
What’s in the Tin
• JBoss Web + Rack for running Web applications
• Infinispan for caching
• HornetQ/JMS for messaging
• Qu...
That’s a lot of stuff
• Can pick and choose
• But it’s all supported
• All within a single JVM, with JVMs clustered
across...
Torquebox API
• Caching
• Messaging/Backgroundable
• Scheduled Jobs
• Services
• STOMP
Caching
• Infinispan Data Grid
• Local memory
• Invalidate across cluster <- Rails Store Default
• Distributed <- Non-Rails...
• Configure Rails Cache Store for Torquebox
!
!
• Use the Rails.cache normally
!
Caching
• Or Use TorqueBox’s Infinispan API directly
Messaging
!
• HornetQ
• Load balancing, Failover, Timeouts, Retries
• Persistent across restarts
• TorqueBox API offers
• ...
Topics vs Queues
• Configure a Topic at deployment
!
!
• Set up a class to process the messages
Backgroundable
• Simpler abstraction for fire-and-forget
Scheduled Jobs
Services
• TorqueBox managed background thread
• Like a daemon
• Can run on a single-node with fail-over to
another node i...
WebSockets
• STOMP Protocol
• Ships with client JS library
• Can use Topics and Queues we saw earlier
Even More
• Authentication
• Hot deploys
• Dependency Injection
I wanna try this!
• rvm install jruby
• gem install rails
• rails new your_app
• echo ‘gem torquebox’ >> Gemfile
• bundle i...
Backstage
• Dashboard monitor for your applications
• Deploys into Torquebox
Immutant
• Same thing for Clojure
• Red Hat’s Polyglot strategy
• Escalante for Scala
Rough Spots, IMO
• Clustering is non-trivial without multicast
• Logging
• Source is mostly Java
• JBoss configuration is i...
What’s Next
• Torquebox 4
• Probably Wildfly-based
• aka JBoss 8
• Improved Performance
Da Mystery of Torqueboxin’
Joe Winter
• jwinter@gmail.com
• @jwinter
• From Sungard Consulting Services
• We’re hiring
• We’re looking for Ruby || Fr...
TorqueBox - Like a JBoss - Philly RedSnake Talk
TorqueBox - Like a JBoss - Philly RedSnake Talk
TorqueBox - Like a JBoss - Philly RedSnake Talk
TorqueBox - Like a JBoss - Philly RedSnake Talk
TorqueBox - Like a JBoss - Philly RedSnake Talk
TorqueBox - Like a JBoss - Philly RedSnake Talk
Upcoming SlideShare
Loading in …5
×

TorqueBox - Like a JBoss - Philly RedSnake Talk

1,232 views

Published on

Published in: Software, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,232
On SlideShare
0
From Embeds
0
Number of Embeds
135
Actions
Shares
0
Downloads
6
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

TorqueBox - Like a JBoss - Philly RedSnake Talk

  1. 1. TorqueBox Like a JBoss
  2. 2. What’s TorqueBox • JRuby API around JBoss to: • Run Ruby apps in JBoss AS
  3. 3. Who’s TorqueBox? • Project built and supported by Red Hat • #torquebox on IRC • LGPL • 5 years of active development
  4. 4. What’s JRuby • Ruby on the JVM • Not a toy • Runs unmodified Ruby code • Fast; Real Threads; Java Integration
  5. 5. What’s JBoss
  6. 6. Why JBoss? • For an Ordinary Web Application
  7. 7. Why JBoss? • For an Ordinary Web Application • Just Run Passenger / Gunicorn
  8. 8. Why JBoss? • Ordinary Web Application • Just Run Passenger / Gunicorn • And Memcached/Redis for caching
  9. 9. Why JBoss? • Ordinary Web Application • Just Run Passenger / Gunicorn • And Memcached/Redis for caching • And Sidekiq/Celery for background jobs
  10. 10. Why JBoss? • Ordinary Web Application • Just Run Passenger / Gunicorn • And Memcached/Redis for caching • And Sidekiq/Celery for background jobs • And Cron/Sidetiq for scheduled jobs
  11. 11. Why JBoss? • Ordinary Web Application • Just Run Passenger / Gunicorn • And Memcached/Redis for caching • And Sidekiq/Celery for background jobs • And Cron/Sidetiq for scheduled jobs • And EventMachine and Faye for Websockets
  12. 12. Why JBoss? • Ordinary Web Application • Just Run Passenger / Gunicorn • And Memcached/Redis for caching • And Sidekiq/Celery for background jobs • And Cron/Sidetiq for scheduled jobs • And EventMachine and Faye for Websockets • And a Load Balancer
  13. 13. Or • Just Run JBoss
  14. 14. What’s in the Tin • JBoss Web + Rack for running Web applications
  15. 15. What’s in the Tin • JBoss Web + Rack for running Web applications • Infinispan for caching
  16. 16. What’s in the Tin • JBoss Web + Rack for running Web applications • Infinispan for caching • HornetQ/JMS for messaging
  17. 17. What’s in the Tin • JBoss Web + Rack for running Web applications • Infinispan for caching • HornetQ/JMS for messaging • Quartz for scheduled events
  18. 18. What’s in the Tin • JBoss Web + Rack for running Web applications • Infinispan for caching • HornetQ/JMS for messaging • Quartz for scheduled events • Stilts for STOMP messaging over Websockets
  19. 19. What’s in the Tin • JBoss Web + Rack for running Web applications • Infinispan for caching • HornetQ/JMS for messaging • Quartz for scheduled events • Stilts for STOMP messaging over Websockets • mod_cluster/JGroups for clustering/load balancing
  20. 20. That’s a lot of stuff • Can pick and choose • But it’s all supported • All within a single JVM, with JVMs clustered across nodes
  21. 21. Torquebox API • Caching • Messaging/Backgroundable • Scheduled Jobs • Services • STOMP
  22. 22. Caching • Infinispan Data Grid • Local memory • Invalidate across cluster <- Rails Store Default • Distributed <- Non-Rails Default, most interesting • XA Transactions
  23. 23. • Configure Rails Cache Store for Torquebox ! ! • Use the Rails.cache normally !
  24. 24. Caching • Or Use TorqueBox’s Infinispan API directly
  25. 25. Messaging ! • HornetQ • Load balancing, Failover, Timeouts, Retries • Persistent across restarts • TorqueBox API offers • Topics (all subscribers get message) • Queues (first subscriber to pop message gets it)
  26. 26. Topics vs Queues
  27. 27. • Configure a Topic at deployment ! ! • Set up a class to process the messages
  28. 28. Backgroundable • Simpler abstraction for fire-and-forget
  29. 29. Scheduled Jobs
  30. 30. Services • TorqueBox managed background thread • Like a daemon • Can run on a single-node with fail-over to another node in the cluster
  31. 31. WebSockets • STOMP Protocol • Ships with client JS library • Can use Topics and Queues we saw earlier
  32. 32. Even More • Authentication • Hot deploys • Dependency Injection
  33. 33. I wanna try this! • rvm install jruby • gem install rails • rails new your_app • echo ‘gem torquebox’ >> Gemfile • bundle install • torqeubox run • torquebox deploy • OR • docker run mguymon/torquebox
  34. 34. Backstage • Dashboard monitor for your applications • Deploys into Torquebox
  35. 35. Immutant • Same thing for Clojure • Red Hat’s Polyglot strategy • Escalante for Scala
  36. 36. Rough Spots, IMO • Clustering is non-trivial without multicast • Logging • Source is mostly Java • JBoss configuration is intimidating
  37. 37. What’s Next • Torquebox 4 • Probably Wildfly-based • aka JBoss 8 • Improved Performance
  38. 38. Da Mystery of Torqueboxin’
  39. 39. Joe Winter • jwinter@gmail.com • @jwinter • From Sungard Consulting Services • We’re hiring • We’re looking for Ruby || Front-end JS || Java • Come talk to me about JRuby • We’re hiring

×