Gaelyk 1.1 released
Gaelyk 1.1 has just been released!
Gaelyk is a lightweight toolkit for writing and deploying Groovy apps on Google App Engine.
In this version, all the components have been updated to their latest versions:
This blog is now running Gaelyk 1.1 pretty happily!
You should be able to see the announcement on the Gaelyk Google group for the details, but here’s the list of changes:
Upgraded to Groovy 1.8.4 and App Engine SDK 1.6.0
The new
get()
methods on the datastore service now also work with the asynchronous datastore.Added an
unindexed
property on entities to set unindexed properties:person.unindexed.bio = "..."
Three annotations to customize the bean / entity coercion (
@Key
,@Unindexed
and@Ignore
)Part of the work with the async datastore
get()
, whenever you have aFuture
to deal with, for example when the async datastore returns aFuture
, you can call any property on theFuture
object, and it will proxy those property access to the underlying object returned by theget()
call on the future.In addition to
datastore.query{}
anddatastore.execute{}
, there is now adatastore.iterate{}
method that returns anIterator
instead of a list, which is friendlier when your queries return a large number of results.Added the prospective search service to the binding
You can access the asynchronous Memcache service with
memcache.async
Additional convenience methods for the file service
Added an each and collect method on blobstore to iterate over all the blobs from the blobstore, or to collect some values from all blob infos stored.
I’ll just highlight one of the nice little additions mentioned above, which is the refinement of the POGO / Entity coercion mechanism. You can now use three annotations to further customize that conversion: @Key, @Unindexed and @Ignore, to respectively specify the key property, properties that should not be indexed by the datastore, and properties that should be ignored and not saved in the datastore.
Here’s what a class annotated with those annotations could look like:
@Canonical
class Person {
@Key String login
String firstName
String lastName
@Unindexed String bio
@Ignore String getFullName() { "$firstName $lastName" }
}
And then you can use the as operator to convert between beans and entities.
If you’ve read thus far, it’s time to go download Gaelyk and have fun!