A noob's attempt on Google App Engine using Java and Maven part 2
March 26, 2011 · 3 min · 629 words
In my last entry, I modified my Maven project so it can be deployed to Google App Engine. This time, I’m going to work on my actual application so I can finally have something to show to other people.
Right now, my Spring web application works fine on Google App Engine. Let me go over the code that I have so far. I first made a bean called Manufacturer:
Since I have it autowired, I don’t need to explicitly inject it into the controller. Pretty cool, right?
Anyway, if I build and run the web app in GAE’s development server, it will run smoothly with no problems, so I’m sure that my web app runs 100% fine at this point.
Of course, I need to add persistence in the application since web apps are mostly about persistence. This is where it gets complicated. Even though I have plenty of experience working with database-driven applications, Google App Engine makes it seem otherwise.
Google App Engine works in a manner very different from traditional platforms. The most noticeable is the way it handles persistence; it doesn’t support relational databases. Google App Engine uses a non-relational database called the datastore. At the moment, I don’t have a full grasp of the pros and cons of not being able to use a relational database, but I’m pretty sure it has a great impact with the way you will build your application. Working with a non-relational database means that you have to manually maintain indexes with hand-written code. Aside from that, you have to manually write code for merging the results of multiple queries. Bummer.