<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="what-is">
  <title>What is TorqueBox?</title>

  <para>TorqueBox provides an enterprise-grade environment that not only
  provides complete Ruby-on-Rails and Rack compatibility, but also goes
  beyond the functionality offered in traditional Rails/Rack environments.</para>

  <section id="built-upon-jboss-as">
    <title>Built upon JBoss AS</title>

    <para>Instead of building a Ruby Application Platform from the ground-up,
    TorqueBox leverages the existing ninja-grade functionality JBoss has been
    shipping for years in the JBoss Application Server. JBoss AS includes
    high-performance clustering, caching and messaging functionality. By
    building Ruby capabilities on top of this foundation, your Ruby
    applications gain more capabilities right out-of-the-box.</para>
  </section>

  <section id="built-upon-jruby">
    <title>Built upon JRuby</title>

    <para>JRuby is a fast, compliant implementation of the Ruby language upon
    the Java Virtual Machine. Pure Ruby applications run un-modified within
    the JRuby interpreter. By binding JRuby to the components within JBoss,
    their functionality is exposed in a manner suitable to Rubyists.</para>
  </section>

  <section id="torquebox-is-opensource">
    <title>Open-Source</title>

    <para>TorqueBox is a product of the JBoss Community, and is completely
    open-source software. TorqueBox is licensed under the LGPL. You may
    download the binaries or the source-code, modify it if you desire, and use
    it, even for profit, without any licensing costs.</para>
  </section>

  <section id="as-concept">
    <title>The "application platform" concept</title>

    <para>Traditionally, Ruby applications were responsible for their services
    from the ground-up. You literally ran the application. It would import
    support libraries to handle HTTP listening, for example.</para>

    <para><mediaobject>
        <imageobject role="html">
          <imagedata align="center"
                     fileref="./images/differences-traditional.png" format="PNG" />
        </imageobject>

        <imageobject role="fo">
          <imagedata align="center"
                     fileref="./images/differences-traditional.svg" format="SVG"
                     scale="80" />
        </imageobject>
      </mediaobject></para>

    <para>An application platform provides the foundations for any and all
    application functionality. The deliverable application itself does not
    need to handle the networking layers, the messaging facilities or the
    clustering logic. This is provided to the application "for free".</para>

    <para><mediaobject>
        <imageobject role="html">
          <imagedata align="center" fileref="images/differences-torquebox.png"
                     format="PNG" />
        </imageobject>

        <imageobject role="fo">
          <imagedata align="center" fileref="images/differences-torquebox.svg"
                     format="SVG" scale="80" />
        </imageobject>
      </mediaobject></para>
  </section>

</chapter>
