Escalanteのこと

棚卸し12日目*1Escalanteは、JBoss Application Server 7*2上に構築されたScalaアプリケーションサーバー。project:oddプロデュースとなっていてなんだこりゃと思ったら、ClojureアプリケーションサーバーのImmutantRuby(JRuby)アプリケーションサーバーのTorqueBoxがリストされていて、もうJVM言語全部でリリースする気なんかな。Escalanteはプロデュースということでproject:oddのメンバーではないみたい。
さて、ver.0.1でできることはLiftウェブフレームワークのサポート。具体的には以下のような内容。

  • LiftとScalaのJARファイルをアプリケーションに含める必要がなく、Escalate側で提供する
  • Liftは2.4、Scalaは複数のバージョンに対応
    • 2.8.0
    • 2.8.1
    • 2.8.2
    • 2.9.0
    • 2.9.1
    • 2.9.2
  • データソースのような、コンテナ側の機能を利用可能

escalante-quickstartを見ると、standard-helloworld-liftとhelloworld-liftというプロジェクトがあり、前者がEscalanteに依存しないもので、後者がEscalante専用のプロジェクト。比べてみてもアプリケーションコードはコメントやアプリケーション名に依存する部分除きまったく同じ。pom.xmlはまあ違いがあるが省略。また、standard-hellowrld-liftにはweb.xmlがあるがこれは不要だと思う。

standard-helloworld-lift
├── pom.xml
├── README.md
└── src
    └── main
        ├── scala
        │   ├── bootstrap
        │   │   └── liftweb
        │   │       └── Boot.scala
        │   └── io
        │       └── escalante
        │           └── quickstarts
        │               └── lift
        │                   └── standard
        │                       └── snippet
        │                           └── HelloWorld.scala
        └── webapp
            ├── index.html
            ├── templates-hidden
            │   └── default.html
            └── WEB-INF
                └── web.xml

helloworld-lift
├── pom.xml
├── README.md
└── src
    └── main
        ├── scala
        │   ├── bootstrap
        │   │   └── liftweb
        │   │       └── Boot.scala
        │   └── io
        │       └── escalante
        │           └── quickstarts
        │               └── lift
        │                   └── helloworld
        │                       └── snippet
        │                           └── HelloWorld.scala
        └── webapp
            ├── index.html
            ├── templates-hidden
            │   └── default.html
            └── WEB-INF
                └── lift.xml

Escalanteに特有なのはhelloworld-liftのlift.xmlだが、実質的な内容はバージョン指定だけ。


もう一つ大きな差は、ビルドするとstandard-helloworld-lift.warがいろんなライブラリを抱え込んでるので31MBあるのに対して、helloworld-liftプロジェクトのescalante-helloworld-lift.warは11KB。Scalaアプリケーションサーバーなので、ライブラリは当然コンテナ側でサポートしているところ。
今日はEscalanteの概要の紹介でした。Escalanteのソースはこちらにあるので見てみてね。

*1:Advent Calendarとしては折り返し地点ですね

*2:10日目で書いたけど名前が変わります