WORKING WITH GAE and the google apis
I’m using Eclipse with the GAE plug-in. This was a breeze to install, and makes deploying my application easy as can be.
For C-Sync, I dealt mostly with the Contacts Data API (Dev guide and Ref guide).
Developing an application within the GAE framework offers a lot of flexibility and allows the average developer to put out an app fairly quickly. The tools at your disposition for post-implementation management are helpful and easy to work with.
However, since close to 100% of my code has to do with handling Google contacts and groups, it meant working extensively with the dedicated API provided by Google to access their services. Although I was able to accomplish what I set out to do, it was not without much grumpiness and complaining about how some features felt, well, half-baked.
A few examples from my personal experience:
-
➡It is impossible (as of this writing) to retrieve a contact record with its unique key. This means the only solution I found was to browse the entire feed until it is found.
-
➡I tried to use an attribute (<updated>) that was supposed to be a DateTime representation of the last time the feed was updated but it seemed to return the current date every time the feed was requested.
-
➡The JVM has to be started EVERY time one brings up the web site for the first time. This means an extra 15-25 seconds added to the load time of your first page.
-
➡Some days, my batch process will crash every other time on “timeout while fetching the feed” or the mysterious “com.google.gdata.client.GoogleService$CaptchaRequiredException”. For no apparent reason, it will start working normally again.
-
➡Okay, I’ll admit. My candor on the previous statement may be a bit disingenuous... The process is resource-intensive and it can take a while to sync 300+ contacts and groups... Which brings me to my next complaint. Google seems to limits the processing time of an HTTP request to 30 seconds. This is fine most times except when I run the initial syncing of a new Google account. You get a “com.google.apphosting.api.DeadlineExceededException”. Hence the convoluted code in my application to “recycle” the call (essentially splitting it in smaller chunks).
But, eh, it’s free!