Showing posts with label Tomcat. Show all posts
Showing posts with label Tomcat. Show all posts

Sunday, December 21, 2008

Eight Queens Puzzle Solution GWT style

I have deployed a very 'rough' GWT application, you can check it out here.  This is an Eight Queens Puzzle solution using GWT.  Hosting is with Mochahost using Tomcat.  Technically there is no reason to host this application with a Tomcat instance, but I thought it would be fun to take the same Java code and let Tomcat run the Eight Queens solution on the server and then let GWT compile the Java code to Javascript and run it on your client browser.

With a fast processor and Google Chrome I don't see why someone out there cannot beat the calculation time for the puzzle on their browser!  The bulk of the time on the browser is spent building the chess boards and populating the queens onto the board.  The Eight Queens Puzzle solution just takes a few seconds, or in the case of Crome miliseconds.

Lots more to come including:
  • Source code
  • Make the web page look better

Some other ideas I had:
  • Capture user agent information and store calculation times based on browser type and OS
  • Add a selection box so the user can select their processor speed and save this data with the solution time.
  • Build a report showing data based on cpu speed, browser type, bowser version, and OS
For more information on how to setup GWT with Tomcat hosting using Mochahost please see my previous post on GWT hosting.

Please leave me any feedback here.  Thanks!

Friday, November 9, 2007

GWT hosting

Tomcat hosting that works great with GWT
After searching for some time I have finally started a hosting account with a Tomcat + Java provider that will allow for GWT Java hosting.

Mochahost offers Tomcat hosting at different levels depending on your needs. I have setup my account using their JSP/Tomcat hosting from $2.95/month. For the types of GWT applications that I would like to host these are some of the key items I need:
  • Ability to restart Tomcat instance. This is necessary when you add shared libraries or if you make any changes to your Tomcat configuration files.
  • Ability to also host a database. Mochahost offers unlimited MySQL databases with this plan. You can modify the Tomcat context.xml file and add any JDBC resources that your application requires.
  • Complete control over my Tomcat instance including, selection of the Tomcat version I want to run, ability to map any domain name to my Tomcat instance, and the ability to define the JVM for my tomcat instance.
How NGASI AppServer Manager can make your life easier
I really love the NGASI AppServer Manager. This is the tool that you use to select your JVM version, Tomcat Version, and map your entire domain to Tomcat or you can use path mapping.

To keep things simple I have chosen to do a complete domain wildcard mapping. Now I can deploy individual GWT apps under gwt.mynumnum.com/* and they will be available without any additional mapping needed. My Tomcat instance is available at http://gwt.mynumnum.com where I can login to Tomcat and use the Tomcat deplorer to deploy my GWT war file. Once the application is deployed it is available on the web.

What can you do with Tomcat Hosting and GWT?
Currently I only have one application deployed. My application is an Eight Queens solution. My GWT application is here: http://gwt.mynumnum.com/EightQueens

The application is still very rough around the edges, and I will continue to makes changes. Basically it uses the same java code on the client and server to demonstrate that Java code can be compiled un-modified and run either in your browser or on a Tomcat server. Just for fun it also tracks how long your browser takes to complete all 92 solutions to the puzzle. You can display last 10 runs or top 10 runs based on Javascript speed. Google Chrome is currently the leader due to its super fast Javascript engine.

Thursday, July 19, 2007

Setup tomcat server under IIS steps

This document will help you setup Tomcat + IIS in a Microsoft Windows environment. If you need to find a company that offers Tomcat hosting then please see my other blog entry about GWT Hosting. Thanks!

Setup tomcat server under IIS steps - Google Docs & Spreadsheets