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
Related posts:- JRuby, Rails, and GlassFish – “Easiest Rails stack in the world”!!!
- Developing GlassFish- and MySQL-Backed Applications with Netbeans and JRuby-on-Rails – Free Webinar on Jan 27
- Developing GlassFish- and MySQL-Backed Applications with Netbeans and JRuby-on-Rails – Free Webinar on Mar 26
- “Rails powered by GlassFish & jMaki” @ South Bay Ruby Meetup – Jan 29, 7pm
- JRuby-on-Rails deployed on GlassFish – Success Story
[Trackback] Last day of Rails Conf Europe 2008 (Day 1 & Day 2), and it’s finally over! David Black’s opening session talked about Ruby and Rails Symposium: Versions, Implementations, and the Future. Here is a brief summary of MRI Ruby…
Comment by Arun Gupta's Blog — September 5, 2008 @ 10:19 pm
[Trackback] Mauricio, Doris, Simon and I visited DFJUG @ Taguatinga yesterday (make sure to pronounce it correctly, otherwise you’ll be corrected again & again, as I was
. 200 attendees, mostly students, stayed all along the 4 hourof present…
Comment by Arun Gupta's Blog — September 25, 2008 @ 5:11 am
[Trackback] Jim and I presented on "Using Comet to create a Two-Player Web Game" at Ajax World 2008 West yesterday. The talk explained the basic concepts of Comet, showed how a Tic Tac Toe game can be easily created using…
Comment by Arun Gupta's Blog — October 21, 2008 @ 11:07 am
[Trackback] This sounds like an interesting demo. Sun has GlassFish playing two-player Tic Tac Toe over the Internet in a browser.
Comment by All the Way to the Beginning — October 23, 2008 @ 10:56 am
[Trackback] 1400 registrations, 112 sessions, free pizza, a barbecue on Saturday night, raffles and lot more – that is Silicon Valley Code Camp. Jitu, Jiandong, Jacob, and I presented on GlassFish at Silicon Valley Code Camp over the weekend. The…
Comment by Arun Gupta's Blog — November 11, 2008 @ 4:32 am
Good Morning Mr Gupta,
I am a spanish electrical engineering student and I am very interested in your post about the tic tac toe game.
I did a tic tac toe using javascript and I would like to make it multiuser using Ruby on Rails but Im not quite sure how to start…I tried to check out your code but when I introduce my java.net id it said "item not found" could you please help me.
Thank you very much.
Ernesto
Comment by Ernie — December 12, 2008 @ 1:00 am
Ernesto,
Can you provide the exact commands you are using to check out the code ?
Comment by Arun Gupta — January 8, 2009 @ 4:12 pm
Good morning Mr Gupta,
I tried again this morning and everything was ok. I hope I can understand the code…
Thank you very much.
Ernesto
Comment by Ernesto — January 8, 2009 @ 11:25 pm
Ernesto, that’s great!
I meant to update the code next week so that it works with Rails 2.x and some other improvements. Will keep the blog updated.
Comment by Arun Gupta — January 9, 2009 @ 6:34 am
Hi Arun,
Did you update Tic Tac Toe demo ?
I’m interested to use it with Rails 2.3.2 and maybe refactor it to use jquery plugin’s Comet
(http://code.google.com/p/jquerycomet/)
Thanks,
Babar
Comment by Babar — May 29, 2009 @ 2:14 am
Babar, have not updated the demo with Rails 2.3.2. Would you like to help ?
Comment by Arun Gupta — May 29, 2009 @ 6:07 pm
I think I’ll have time to do that this summer.
Comment by Babar — June 11, 2009 @ 5:55 am
Babar, Let me know when you are ready and I’ll get you signed up.
Comment by Arun Gupta — June 11, 2009 @ 6:00 am