JBoss, Rails and the cloud

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    JBoss, Rails and the cloud - Presentation Transcript

    1. JBoss, cloud and the Rails Bob McWhirter Red Hat Middleware, aka JBoss
    2. wtf, mate? • I love Ruby and Rails • I work for a Java company (JBoss) • Deployment of rails apps is sucky
    3. “Rails can’t scale” • The Twitter “incident” • Packs of mongrels (~100mb core apiece) • Not easy to deploy, scalability of admin procedures (DRb, memcached, cron)
    4. Do Rails on Java! • JRuby is Rails-happy (jruby.codehaus.org) • Apparently Glassfish does it • Any Java appserver can do it with Warbler, if you feel like producing a .war before deploying
    5. But why? Because the Java appserver environment provides what you need. • Don’t have to worry about deploying memcached • Never worry about deploying crontabs • Enterprisey features like clustering, failover, and such • Works just as well on Windows as Unix
    6. JBoss scales! • It’s enterprisey • Plenty of prior art with clustering • Top-shelf caching (JBossCache)
    7. Do Rails on JBoss • Deploy mostly “native” Rails app easily • Doesn’t require bundling of .war files • Deploys from RAILS_ROOT, changes to views & controllers are reflected immediately
    8. JBossAS is modular environment JBossAS provides all sorts of useful services • Web • Remoting • Scheduling • Caching
    9. J2EE is just one way of doing it • All apps boil down to controllers, views, and other components • Ruby/Rails is just yet-another- programming model for describing components • Map them to enterprisey Java infrastructure
    10. but... don’t make me think too much about java!
    11. Start with JRuby-Rack http://github.com/nicksieger/jruby-rack/tree/master • Speaks Java Servlet API on one side • And Ruby Rack on the other • Works with Rails, Merb, and anything Rack-happy
    12. jboss-rails.deployer • Wires it up to a Tomcat context • Looks at the RAILS_ROOT • Provides jruby.jar • Integrates app with JRuby-Rack, magically
    13. jboss-rails-plugin • Just some Rake tasks, that’s all • start up JBossAS • deploy/undeploy your app • You don’t even really need it
    14. rake jboss:as:* Once you’ve set $JBOSS_HOME... rake jboss:as:run rake jboss:as:run:cluster
    15. rake jboss:rails:jdbc:* • rake jboss:rails:jdbc:install :derby :h2 :hsql Installs the appropriate JDBC drivers :mysql into your vendor/plugins/ :postgresql sqlite3
    16. rake jboss:rails:* rake jboss:rails:deploy rake jboss:rails:undeploy
    17. What’s it mean to deploy? Drop a deployment-descriptor into the server’s deploy/ directory.
    18. myapp-rails.yml application: RAILS_ENV: development RAILS_ROOT: /home/bob/myapp web: context: /
    19. Deployment Descriptor • It’s like a symlink pointing to the application’s codebase (RAILS_ROOT) • It embodies the RAILS_ENV for the deployment • It describes the context to bind the app, since appservers can deploy many sometimes-overlapping apps
    20. What about capistrano? • Same capistrano deployment process • “create-symlink” actually should create deployment descriptor • Instead of bouncing mongrel, should do nothing at all (JBoss auto-hot- deploys)
    21. And then the cloud...
    22. “Cloud” is just virtualization • Xen instances • VMWare instances • Amazon EC2
    23. Basic Premise • Enough Linux to run JBoss • JBoss baked in • Clustering configured & ready
    24. Red Hat Thincrust http://thincrust.net/ • Mixture of Kickstart, RPMs, and Yum • Produces machine images with “just enough” OS • Bakes in any other packages needed • Wires up auto-updating and reconfiguration using Puppet and magic
    25. JBoxx • A “Fedora Remix” (trademark pending) based on a minimal Fedora 9 • Includes JBossAS 5 (the latest & greatest) • Includes jboss-rails.deployer
    26. JBoxx on EC2 • One-click(tm) spinning of new nodes in a cluster • Nodes auto-merge into existing cluster through JGroups
    27. Issues • EC2 uses runlevel 4, wtf? • EC2 disabled multicast, need to wire up JGroup Gossip rendezvous • Need appliances for DBs, load- balancers • Need scripts for cluster management
    28. Resources • My Blog http://fnokd.com/ • Code on GitHub http://github.com/bobmcwhirter/jboss-rails http://github.com/bobmcwhirter/jboss-rails-plugin and several others...
    SlideShare Zeitgeist 2009

    + adorepumpadorepump Nominate

    custom

    123 views, 1 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 123
      • 123 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 4
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories