Onwards!
After the successful (so far, it seems) release of 1.0.0.Beta20, we’re now committed to the Beta21 codeline. Lots of development on Beta21 has been on-going for a few months on a branch. We love git.
Beta21 development has now moved to the master branch. You may certainly use the 1.0.0.Beta20 tag if you need access to the just-released code.
From a developer or code-spelunker perspective, Beta21 has changed how things work. If you’re simply a user of TorqueBox, this is all irrelevant and probably uninteresting.
Maven
The first obvious change is that building TorqueBox requires Maven 3.0-Beta-1.
Additionally, we are using (a fork of) mkristian’s jruby-maven-plugins to manage gem dependencies through the Maven dependency mechanisms. Before Beta21 rolls, we’ll get our fork and mkristian’s all merged back happy.
Code Structure
Since JBoss AS has profiles which enable or disable various services, and TorqueBox augments these services, we’ve now broken the deployer into service-oriented chunks.
What this means is that we can now assemble an AS from more finely-grained pieces. If you’re running a profile that doesn’t support messaging, that portion of TorqueBox can also be removed. The hope is that we eventually allow deployment of only the pieces you really want, instead of a monolithic AS for every use-case.
The basis of these chunks is the components/ directory.
It contains directories for components such as
- Base Ruby interpreter integration
- Rack integration
- Rails integration
- Messaging integration
- Scheduler integration
Each of these modules is also sub-divided into a core module with POJOesque implementations, spi module for interfaces on Java-extensible bits, and an int module provide integration into the JBoss VDF which powers the AS deployment model.
All of this subdivision may be ill-conceived, since we currently have 63 Maven POMs. Yes. 63.
There’s also:
Containers
Containers is where we’ve taken @alrubinger’s Embedded/Bootstrap code, wrapped it in Ruby, and now allow booting up various small bits of TorqueBox. From either bin/ scripts included in our gems, or from your own script.rb.
In about 1 second, you can boot up a HornetQ client wired up to your Ruby message processors. You can also launch a HornetQ message-broker (and JNDI naming service) from with your own scripts in about the same amount of time.
Here, we’re using the fine-grained modules mentioned above.
Clients
While we previously had a messaging client, we’ve re-worked it, along with coming up with a saner strategy for other clients (such as JNDI…). These are now easy-to-consume RubyGems you can use from any JRuby script.
Tests
We’ve finally started writing a lot of tests.
Java code has vastly improved coverage using JUnit, while a lot of Ruby code is covered by RSpec tests. We have significantly more confidence in the quality of TorqueBox as we approach the 1.0.0.Beta21 release.
VFS
Mostly invisible to any user, we’ve updated to VFS3 (1.0.0.Beta20 was based on AS 6m2, which used VFS2).
This integration is becoming more solid, and allows Ruby scripts to be ignorant of the fact they are being run from within a JAR package. Packing ruby sources inside a JAR really screws with things like __FILE__ and Dir.glob(...). VFS allows you to forget these woes forever.
The VFS stuff is usable outside of TorqueBox, but does require manipulation of $JRUBY_HOME/lib in addition to the installation of a RubyGem. We continue to work with the JRuby team to hopefully one day get VFS as a blessed part of the JRuby distribution.
Removals
Until we can figure out a sane way to manage it, we’re temporarily removing the Mobicents integration. It will return though. We think telecom integration is an awesome thing to have.
We’ve also removed the SOAP integration, because we had no love for it. We’d be willing to have a community member knock it back into shape though. If anyone cares about SOAP.
Thus…
The 1.0.0.Beta21 code still has some rough edges and things to do, so give 1.0.0.Beta20 a whirl. But know that awesome things are coming down the pipeline this summer for enterprise-worthy Ruby.
And honestly, I’m trying to break my perma-beta mentality, and get this sucker to a 1.0.0.Final release while it’s still warm outside.
