Over the past couple of months I've become addicted to Google App Engine. Developing my first App Engine application got me through a whole lot of issues that I had to confront if I wanted to use GAE. The really exciting thing about GAE is that you do everything through coding, there's no server setup or database maintenance, you design your database through simple Java classes and annotations (JDO), and the maintenance, well, is automated.
In GAE how the data is implemented is completely hidden from the developer, Google gives you a set of API's that you can use to work with your data and for the case of Java they let you use a standard data-abstraction interface called JDO. This is great because even if Google decides to change their BigTable db to something radically better, they can, as long as they keep the JDO layer intact. This is what great Java developers sacrifice all their time for, abstracting their implementations from their interfaces so that their libraries/programs can evolve in implementation and keep backwards compatibility.
There are however a couple of issue that I experienced and I'd like to share them with you.
App Engine doesn't support JDO entirely
Unfortunately there a couple of things that you need to be careful with, for example if you have an entity that relates to two owned entities of the same type:
In GAE how the data is implemented is completely hidden from the developer, Google gives you a set of API's that you can use to work with your data and for the case of Java they let you use a standard data-abstraction interface called JDO. This is great because even if Google decides to change their BigTable db to something radically better, they can, as long as they keep the JDO layer intact. This is what great Java developers sacrifice all their time for, abstracting their implementations from their interfaces so that their libraries/programs can evolve in implementation and keep backwards compatibility.
There are however a couple of issue that I experienced and I'd like to share them with you.
App Engine doesn't support JDO entirely
Unfortunately there a couple of things that you need to be careful with, for example if you have an entity that relates to two owned entities of the same type:
@PersistenceCapable public class Recipe { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private MyImage myImage; // full-size image @Persistent private MyImage thumb; // 224x230 thumbnail version of the above
This is a standard JDO feature that is not implemented in App Engine yet and it will complain with an exception saying that the feature is not yet supported.
Another JDO thing I've learned, coming from a MySQL background, is that you will probably rather be doing unowned relationships instead of owned relationships. It's just much easier to relate to things with the given key and owned entities will cause many issues, like the one above.
Other than these things I must say that JDO is very solid. Once you get used to it, to the fact that there's not a relational database behind the scenes anymore, you will be very happy with it. The idea that your data will just scale in the long run brings an amazing feeling to application development.
Text Search isn't there by default, but GAE gives you the tools to implement search yourself
Text searching is an interesting topic that I'm not very experienced in. I know Lucene is the de-facto standard when it comes to text searching. However considering that GAE doesn't allow I/O operations and it doesn't allow you to spawn threads, Lucene isn't really an option. However there's room for searching through a simple tokenization routine which is roughly explained here:
http://dunelmtechnology.co.uk/text-search-with-google-app-engine/
The idea behind this concept is to take the text that you want to search on, and tokenize each word into a list which is stored directly in Google's datastore. Then you can query using JDOQL - standard query language for JDO - to match tokens available in that particular entity. This is actually quite good, but not perfet. I hope to see better support for Text search in the future.
Is Google App Engine for everybody?
I think it is. Web-development became a matter of knowing how a relational database works, how a web-server works and lastly how a language works. This shouldn't be the case anymore, web-development should not be about being a system administrator. Let sys-admins do their job and let developers write app-code.
Other than these things I must say that JDO is very solid. Once you get used to it, to the fact that there's not a relational database behind the scenes anymore, you will be very happy with it. The idea that your data will just scale in the long run brings an amazing feeling to application development.
Text Search isn't there by default, but GAE gives you the tools to implement search yourself
Text searching is an interesting topic that I'm not very experienced in. I know Lucene is the de-facto standard when it comes to text searching. However considering that GAE doesn't allow I/O operations and it doesn't allow you to spawn threads, Lucene isn't really an option. However there's room for searching through a simple tokenization routine which is roughly explained here:
http://dunelmtechnology.co.uk/text-search-with-google-app-engine/
The idea behind this concept is to take the text that you want to search on, and tokenize each word into a list which is stored directly in Google's datastore. Then you can query using JDOQL - standard query language for JDO - to match tokens available in that particular entity. This is actually quite good, but not perfet. I hope to see better support for Text search in the future.
Is Google App Engine for everybody?
I think it is. Web-development became a matter of knowing how a relational database works, how a web-server works and lastly how a language works. This shouldn't be the case anymore, web-development should not be about being a system administrator. Let sys-admins do their job and let developers write app-code.