Ashish's running commentary ...
Archives
« November 2009
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
Click me to subscribe
Search

Links
 

Today's Page Hits: 48

Monday Apr 30, 2007
Ruby on Rails meets GlassFish High Availability
One of the key features of GlassFish v2 release is its cluster support. Various GlassFish server instances can be grouped together to form a single virtual entity - a cluster. One of the salient services offered via clustering is high availability, which is implemented as in-memory replication of state across participating server instances.

Since, I've been looking at getting Ruby on Rails applications running as web applications in a Java EE container, I was asked a couple of weeks ago if RoR applications could run in a GlassFish cluster. Well, with Rails-Integration 1.1.1, you can ! Its relatively straightforward to enable failover support for a web application in GlassFish and is no different for RoR (as a web application). The hard part, or so it seems at first, is setting up the GlassFish cluster.

For the easy part first, the only changes needed to enable failover session support for a web application are :

One important fact that I learned during this process, was that a load balancer facade is not necessarily needed for development/testing scenario. In other words if server instances, that share application state, are listening on the same host (different port), then failover can be simulated by simply sending requests to the other node (port).
Now, the part about setting up a GlassFish cluster. The references below give detailed information about the clustering architecture and setup steps but the takeaway is a lot simpler.

That's all there is to it !

References
http://wiki.glassfish.java.net/gfwiki/Wiki.jsp?page=GlassFishV2Architecture
http://developers.sun.com/appserver/reference/techart/load-balancing.html
https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html
http://wiki.glassfish.java.net/gfwiki/attach/OnePagersOrFunctionalSpecs/memory-replication-one-pager.html

Posted at 05:05PM Apr 30, 2007 by Ashish Sahni in General  | 

Friday Mar 16, 2007
JRuby and Rails - status
JRuby 0.9.8 is out and so is rails-integration 1.0. Rails 1.2.x has been out for a couple of months and there's a new release of ActiveRecord-JDBC 0.2.3. The good news is that JRuby 0.9.8 is lot more Rails compatible than ever before.

For GlassFish users this means:

Stay tuned ...
Posted at 05:19PM Mar 16, 2007 by Ashish Sahni in General  | 

Tuesday Jan 02, 2007
Break report:

Before you know it the year end holiday break is over and it's back to the regular routine. Looking back at it I can't seem to remember doing much :) But time sure did fly. So what did I do ?

Well, there was the trip to the INS, the lying on the couch to watch the entire season 6 (part 1) of 'The Sopranos', attending the yoga classes and swimming at the gym, getting together with friends on Christmas and New Year's Eve weekends, reading a (little) bit and of course playing squash. Given that the I was out pretty much the most of the last quarter CY '07 due to plantar fasciitis, I'm extremely glad to be back on the court. And, I did give myself the Christmas gift of a new squash racquet - Head Liquid Metal 140. This racquet is much better than the other Prince racquets I'd been playing with so far. Hopefully it won't break too soon. Let me take this opportunity to invite my Sun brethren who play squash for a game when they are in the San Francisco Bay area.

Also, there were a few todo items on my list for the break, but they did not get done :( Maybe in the next few days, weeks ... Happy 2007 !

Posted at 06:20PM Jan 02, 2007 by Ashish Sahni in General  | 

Monday Aug 14, 2006
Howto add unit tests in Glassfish
A primer on howto add unit tests in Glassfish[Read More]
Posted at 05:09PM Aug 14, 2006 by Ashish Sahni in General  |