The Rack!

So, as promised last week, this week I've got a blog with more details on Rack support in Glassfish.

 The good news is that it is happening. We've got a rack adapter put together, and it has successfully deployed and served pages. Unfortunately, it won't be public for a bit because it will need to wait for a bug in glassfish proper to be fixed before it will start working, but it's there, lying in wait to leap out and enable your web frameworks. Re-writing the internal logic also gave us a chance to clean out and audit stuff, so there should be some performance improvements in there too.

The bad news is that writing the code to make Glassfish automagically deploy your web app is going a bit more slowly than I expected. It's probably because I'm a JRuby newbie and the code needs to bridge between Java and Ruby in addition to the stuff that an adapter normally has to do. As before, Rails still deploys correctly (it's bad to break old functionality!), and as before we're trying to enable automatic deployment for merb, which is making progress. The goal is still that you should be able to type "asadmin /path/to/my/rack/app" and have GlassFish figure out the the rest. As I get the hang of writing adapters, you'll almost certainly see more Rack frameworks supported in the near future.

BUT, if you've got a web framework that we don't support yet (because it was released after we wrote this, or because we were too lazy to write it in, or you need to deploy it Right NOW, or whatever), there will be an option (either in domain.xml or on the command line) to specify a ruby script that will return an initialized rack application, and GlassFish will go out and use that script to deploy your application, and it will come up with support for everything that GlassFish offers. So, in 6 months when SuperUltraAwesomeFramework is released, you'll be able to write a script and have GlassFish deploy SuperUltraAwesomeFramework apps, without needing to wait for an update that adds support for it.

So: a faster GlassFish scripting system that will deploy whatever Rack framework app you tell it to, and several kinds automatically, from its directory, without all that annoying WAR file tweaking. Seems like a step forward to me.

Comments:

This is fab, but what about clustering? That's the man reason I have for wanting solid WAR support.

Posted by Dick Davies on October 17, 2008 at 12:11 AM PDT #

We haven't tested clustering yet, but it should be identical to clustering off a WAR file. If you try it and it doesn't work, please tell us about it!

Posted by Jacob Kessler on October 17, 2008 at 03:09 AM PDT #

[Trackback] GlassFish gem as well as GlassFish v3 supports Rack. Rack provides an interface to plugin a Ruby web framework with a web sever. Similar to Python WSGI. This means that any ruby based framework that can talk Rack can be simply deployed on GlassFish.

Posted by Vivek Pandey's Blog on April 03, 2009 at 03:33 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jacob Kessler

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today