Sunday Jun 01, 2008

Tic Tac Toe using Rails and Grails on GlassFish v3


GlassFish v3 is a modular (OSGi compliant), embeddable (runs in-VM) and extensible (hosts non-Java applications) Application Server. The "extensible" part was demonstrated during JavaOne 2008 by deploying Rails, Grails and Django sample application on GlassFish v3 Technology Preview 2. This blog announces the availability of Rails, Grails and (of course!) Java EE version of the demo code.

The sample application is a simple multi-player game that can be played on Internet and deployed on GlassFish. One of the simplest multi-player game is Tic-Tac-Toe. The complete instructions to checkout, build, deploy and run the sample are available here. The demo can certainly be improved by using the best practices from Rails and Grails and I'll work on them in next few days.

The demo is played in 2 different browser windows (tested on Firefox, Safari & IE). The clicks in the grid on one browser are displayed on the other browser (propagated using GlassFish Comet) and row and column winners are shown.



Some points highlighted by the demo are:
  • GlassFish v3 supports deployment of Rails and Grails applications, in addition to traditional Java EE apps.
  • GlassFish v3 has a completely modular architecture as evident by the pluggability of JRuby/Rails.
  • Features of the underlying GlassFish runtime can be accessed.
    • Any click in the grid is pushed to the endpoint and then propagated to all the clients using GlassFish Comet. So effectively, now you can build Comet-enabled applications using Rails and Grails.
    • Rails application is deployed as a composite application where Serlvet is bundled with the application and accessed from the View.
Check out the demo now!

You can learn about the support of different Dynamic Languages on GlassFish on glassfish-scripting.dev.java.net. Send us feedback on webtier@glassfish.dev.java.net or GlassFish WebTier Forum.

Technorati: conf javaone javaone08 jruby ruby rubyonrails grails javee glassfish v3 netbeans
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

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