Amazon Flexible Payments System on Google App Engine

Dom Derrien did a great job earlier this year publishing his patch for Amazon FPS on Google’s App Engine. However, his project did not go live with FPS so few bugs remained unnoticed. Today I pushed my fixes to the cloned project on the  GitHub project at (If anyone is interested in what’s been changed, please check the project history.)

Beside fixing the library, I was free to make few more changes…

Fixing Thesis Theme to Workaround Google Fonts Crashing iPad Safari

The latest version of Thesis theme (v1.8) for Wordpress comes with built in support for Google Fonts. It’s nice and very easy to start using, but… not sure if you’ve noticed it already but use of Google Fonts (and other web “unsafe” fonts) may crash iPad’s Safari. This definitely is not something your visitors should experience visiting your web site.

So, I didn’t want to give up using extra fonts so I decided to modify Thesis a bit.

Declarative Caching for AppEngine (Part 2)

In my previous post I’ve shown a simple solution for caching to App Engine’s Memcahe using annotated Java methods. Of course, Memcache should not be the only cache your application relies on, especially considering the latency of RPC call that comes with it. There are many cases when local (server instance) or even request scoped cache can be of use.

So, I iterated over my previous solution and released GJUtil 1.1 today with much more flexible caching structures. I will not go into details here… Please, check out the Caching Annotations for an overview and usage details.

Declarative Caching for AppEngine

I really hate when my source files are bloated with lines and lines of code that do not implement any business logic at all. One of the sources of this was certainly code related to caching. Using Google’s Memcache service with the low-level API or via JCache facade is not complicated but it really was not elegant enough for my taste. I was hoping to find some annotations-based solution that will work for me, but no luck.

My First GAE Application… For All Web Developers and Testers

I’m proud today as my first GAE application is finally publicly available - BugDigger is entering open beta!

Combined with a browser extension, BugDigger allows users to easily report an issue in a web application. The process is trivial as BugDigger automatically makes a web page screenshot, collects environment details and recent site usage history.

BugDigger talks to your issue tracker (currently supported JIRA, Bugzilla, Mantis and Redmine) and opens an issue sending all collected data to it.

To learn more and try it out visit BugDigger.

Use GAE Appstats to Discover Unnecessary RPC Calls

If you play seriously with Google’s App Engine, I guess you regularly scan an average CPU time per URL and other stats in your GAE Dashboard. I tend to do this especially after adding a new feature. Yesterday I added the first cron job to my new app and today was surprised with an average latency - it was around 130ms. Hmmm… I really didn’t expect that. I’ve already had Appstats installed so I decided to take a quick look.

Track Estimated Cost for Your AppEngine Site With Firefox Add-on

If you were careful reading Google App Engine documentation, you could have read this: “If you access your site while signed in using an administrator account, App Engine includes per-request statistics in the response headers. The header X-AppEngine-Estimated-CPM-US-Dollars represents an estimate of what 1,000 requests similar to this request would cost in US dollars.”

Well, although I’ve been using GAE periodically for the last several months, I became aware of the above just last week. I guess during the first several weeks a developer need to adapt and put his way of thinking in line with App Engine. However, when the things settle and one is more comfortable with the environment, a different kind of questions start to pop up… How can you put a price tag on your SaaS offering without knowing how much would it cost you in the first place? How do you know where to draw a line with your “free use plan” and which conversion rate do you need for a sustainable growth?

Obviously, the estimated cost information is simply too useful to be ignored. Unfortunately, I could not find a ready to use solution so I used my modest knowledge of programming a Firefox extension and made an add-on that for an App Engine site shows the total estimated cost in the Firefox status bar:

Feel free to download GAE Cost add-on for Firefox and use it with your GAE applications. Please notice that:

  • you have to be signed in using an administrator account (via Google), and

  • stated cost are for 1000 similar requests.

You can reset the cost counters using options in the context menu of the label.

To find out a cost of a particular request, open Firefox Error Console. There you can find not only cost information but also resource usage details (server-side time, app server CPU time, and API CPU time) for each request.

If you find some requests more “expensive” than expected, you can use an excellent Appstats profiling tool available with the latest GAE SDK to find out what’s going on.

Hope you’ll find this useful.

Update 2011-04-07: Add-on was updated for Firefox 4.0.

Trouble With jQuery form.submit()

Argh… I run into an issue with jQuery submitting a form using submit() that took me few hours to resolve. I had a problem submitting a form using a call like $("#myForm").submit(). What was driving me nuts was that event listener for “submit” was triggered (no, I didn’t use preventDefault()) but at the end nothing happened - my form was not submitted.

So, after pulling my hear I’ve found that the problem was my submit button that was named, well… also “submit”:


Simple rename of the button fixed the issue:


In short, submit button name matters!

On a second thought, maybe this is not related with jQuery but rather with JavaScript or browser behaviour. However, I spent enought time on this already so I’ll leave verification of this for an exercise.

Project Lombok Annotations for Java

Tired of creating getters and setters for your Java POJO’s? Well, I was unti I’ve discovered Project Lombok. It’s definitely a tool worth checking out!

The Project Lombok comes with a set of Java annotations that can generate not only getter and setter methods for your beans, but also toString(), equals() and hashCode() methods. It can add synchronization to your methods, catch exceptions and automatically call close() on streams as well.