<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>full fathom five: Handling Java exceptions in JRuby</title>
    <link>http://www.michaelstudman.com/fullfathomfive/articles/2006/09/26/handling-java-exceptions-in-jruby</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>the blog of Michael Studman</description>
    <item>
      <title>Handling Java exceptions in JRuby</title>
      <description>&lt;p&gt;At my enterprisey day job I&amp;#8217;m finding the JRuby platform to be the perfect glue for bringing together a (sadly necessary) slew of Java libraries and middleware (3rd-party Ant tasks, Jakarta VFS, ServiceMix, Maven, Weblogic) to solve a complex problem crucial to our enterprise. Stellar support for exception handling is obviously important when integrating so many libraries and middleware so how well does JRuby help with this? Is it just a Java fair-weather friend?&lt;/p&gt;</description>
      <pubDate>Tue, 26 Sep 2006 19:54:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:403e6fc2-23bd-4c13-b8b0-505d6d85363d</guid>
      <author>Michael Studman</author>
      <link>http://www.michaelstudman.com/fullfathomfive/articles/2006/09/26/handling-java-exceptions-in-jruby</link>
      <category>Java</category>
      <category>JRuby</category>
      <category>java</category>
      <category>jruby</category>
      <category>development</category>
      <category>ruby</category>
      <category>scripting</category>
    </item>
    <item>
      <title>"Handling Java exceptions in JRuby" by Michael Studman</title>
      <description>&lt;p&gt;Slow. Slightly painful sometimes but not disasterously so if you use it for the right task. You pay for the cost of starting the JVM and then pay for the cost of booting JRuby and then finally it's your apps chance to be a bit slow. I think Charles mentioned at RailsConf EU that JRuby was somewhere around 10 times slower than Ruby which itself typically ranks in the bottom quartile of most language speed rankings.&lt;/p&gt;

&lt;p&gt;Some things are slower than other others (as you'd expect). Parsing code is really slow (JIRB which is code-heavy takes 10 seconds to load on my PB 12" G4 - IRB takes half a second).
String operations are seriously inefficient with ri taking absolutely forever to do anything.
Strangely Rails' performance doesn't completely suck - not sure why that is.&lt;/p&gt;

&lt;p&gt;Charles and Thomas are working really hard to whittle away the performance issues and I'm pretty sure they'll get there rather soonish. They seem to be giving 15% boosts in performance each recent minor release and there's the potential order-of-magnitude gains code compilation might give. Also, working full time on JRuby on Sun's dime certainly can't help but give more focus on this area.&lt;/p&gt;

&lt;p&gt;You're spot-on in predicting where this glue code lived - somewhere performance was not even a periphery concern. It was used to interpret and execute a DSL that described the recipe for deploying all the components of our enterprise's SOA platform (based on ServiceMix/JBI &amp;amp; WLS). It's an operation seldom run in production and where much of the heavy JBI/J2EE lifting is done by standard Ant tasks supplied by the BEA &amp;amp; Logicblaze. It was sort of like a bespoke Capistrano for our particular enterpirsey circumstances.&lt;/p&gt;

&lt;p&gt;Fun times.&lt;/p&gt;</description>
      <pubDate>Wed, 27 Sep 2006 18:23:22 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:a3b7e8ec-7e8a-4d00-946b-b7b3b4e080f3</guid>
      <link>http://www.michaelstudman.com/fullfathomfive/articles/2006/09/26/handling-java-exceptions-in-jruby#comment-90</link>
    </item>
    <item>
      <title>"Handling Java exceptions in JRuby" by Matt Quail</title>
      <description>&lt;p&gt;Interesting to hear you using JRuby for some enterprise glue. I'd be keen to know if you have any comments regarding performance of JRuby (as it stands today), though I guess a lot of glue-code doesn't end up in performance critical sections.&lt;/p&gt;</description>
      <pubDate>Tue, 26 Sep 2006 23:43:02 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:2d71a4f6-95bd-4042-8f43-e58365f5c0f2</guid>
      <link>http://www.michaelstudman.com/fullfathomfive/articles/2006/09/26/handling-java-exceptions-in-jruby#comment-89</link>
    </item>
  </channel>
</rss>
