Spartan Java

Trying out Google Appengine – OTP generation app

by ricardoz on Jul.15, 2009, under Security, Web related

I decided to try out the new Java based version of Google Appengine. So i wrote a very simple web app that allows the user to generate one time passwords (OTP) using the HMAC-SHA1 algortihm (see OATH).

You can check it out at http://obovweb.appspot.com. As the name suggests its based on my obov library.

Anyway, back to Google Appengine, I have to say it worked out quite smoothly. I had a few issues with the SMS based account activation scheme while trying to upload my application, but after posting on the Appengine forums the Google folks sorted it out in a couple of days.

The Appengine Eclipse plugin works great, it allows you to test your applications locally (emulating the JVM restrictions existing on Google’s environment) and to deploy it to the live servers when ready.

The most annoying JVM restriction for me was the imposibility to spawn new threads on the server, because even if you don’t do it directly its quite possible that some of the libraries you use will; for example I had to use an older version of DWR because the latest one wanted to create a new thread at some point (this is avoidable via overriding some of DWR default implementation classes but I didn’t need any of the new features so I decided to just use the old version).

In conclusion, Appengine works and it’s a valid choice for hosting Java based web apps.

Bookmark it / share it:

  • Digg
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • StumbleUpon
  • email
  • Facebook
  • LinkedIn
  • Print
  • NewsVine
  • Twitter
:, , , , , , ,

4 Comments for this entry

  • ag

    does DWR work for GAE?Can you write an article about that,and teach the beginner such as me.Thanks a lot.

  • ricardoz

    @ag: Yes of course it does, this very sample uses DWR within Google App Engine. Check out http://www.spartanjava.com/2009/obovweb-source-code-a-google-appengine-sample/ for the source code. I’ll try to post an article detailing the process of using DWR with GAE, no promises on when though ;)

  • noelo

    thank you very much.Now I met another problem.
    I used Spring + DWR 2.05 frameworks.
    the console show:
    2009-12-9 13:06:34 org.directwebremoting.util.CommonsLoggingOutput warn
    WARNING: Marshalling exception: Missing method or missing parameter converters
    2009-12-9 13:06:34 org.directwebremoting.util.CommonsLoggingOutput warn
    WARNING: –Erroring: batchId[0] message[java.lang.IllegalArgumentException: Missing method or missing parameter converters]

    can you asist me?

  • ricardoz

    @noelo: As the message say DWR isn’t finding an appropriate method to invoke, make sure the spelling and parameter number is correct between the Javascript invocation and Java method signature. Also note that DWR has a few issues with polymorphism, so if you have several methods with the same name I advice you rename them so each one has a distinct name.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...