Download
You can use the Gaelyk JAR in combination with Groovy 2.3.x and beyond and with the latest Google App Engine SDK.
The latest version was tested with Groovy 2.3.0, and with the 1.9.20 version of the App Engine SDK.
But to get you started quickly, you may use a ready-made template project which bundles and configures everything.
Version 2.1.2
Changes
- Switched to Groovy 2.3
- Fixed null pointer exception for self restarting iterator in conjunction with
or
in the query
Version 2.1.1
Changes
- Showing 404 status page properly when groovlet or template not found
Version 2.1
Changes
- Gradle plugin switched to official Gradle AppEngine Plugin
- Migrated to GAE SDK 1.9.1
- Static and read-only properties are ignored during datastore coercion
- Enum constants are converted to Strings when coercing to
Entity
- Added
deleteServingUrl
toBlobKey
to delete previously created serving URL - Result list now contains original query for debug purposes
- Errors are better reported during coercion
@Entity
annotation supports inheritance- Ability to customize coercion by implementing
DatastoreEntity
interface - Added
paginate
keyword to query DSL for simplified pagination out of box - Filtering stacktraces for clearer logs
Version 2.0
Changes
- Migration to GAE SDK 1.8.0 and Groovy 2.1.3
- Several key classes of the Gaelyk code base are now statically compiled thanks to Groovy 2, which should bring some performance improvements. But a major change is the usage of Groovy 2.0's extension module mechanism for all the added nice shortcuts decorating the GAE SDK. This also means Groovy categories have been abandoned in favor of that mechanism, as they were disabling certain optimizations of Groovy (such as efficient primitive arithmetic).
- New search DSL (#183)
- Optional route variables (#185)
- Routes indexes (#191)
- Making asynchronous search recoverable (#196)
-
Returning QueryResultList and QueryResultIterator
from
datastore.execute {}
anddatastore.iterate {}
methods (see more) - Using @DelegatesTo where possible for better IDE support (ie. auto-completion)
- Removed duplicate logging
- Ability to restart long running queries automatically
-
datastore.build {...}
method to create instance ofQueryBuilder
for later use - Support for geo-points in search documents
- Better parameters conversion(handling multiple parameters gracefully)
-
@Parent
annotation for@Entity
classes -
Better performance for
@Entity
classes coercion (#96) -
DatastoreEntity
interface for speeding up the coercion manually (#96) - Gracefull unindexed property (#90)
- Entity to Map coercion
- Ignoring static properties in coercion (#158)
-
put()
andputAsync()
methods for search index -
Non-existing property returns
null
for search documents - Route patterns optimizations (#182)
- Multi-value properties for search documents (#178)
- GAE services exposed in routes validation closure
- Servlet context is available for plugin descriptors
-
Groovlet result can be handled by
after
closure of the plugin - Parameter to allow cross-group transactions #154
Breaking changes
-
The usage and support of Groovy categories for enriching the SDK or any third-party library has been removed.
In particular, your plugins descriptor using the
category
section might be affected. Instead of using categories which disable some performance optimizations of Groovy, you should be using Groovy 2's extension modules approach. -
For the lifecycle manager, the shutdown hook is now a method call with:
lifecycle.shutdownHook { ... }
instead of setting a property:lifecycle.shutdownHook = { ... }
. -
On XMPP messages, you must now call the
message.xml()
method to get the parsed XML payload instead of calling themessage.xml
property. -
Adding task to the queue using the left shift operator
<<
now makes asynchronous call instead of synchronous returningFuture<TaskHandle>
-
@Entity
classes no longer has version property automatically. You can add it manually using@Version
annotation onLong
property, but don't do it unless you have a real reason for it because obtaining the version property tooks very long time. - Single star in routes will match only to the closest slash.
As a result of using Groovy 2.0 you will also need to update
buildscript{ dependencies {...} }
configuration closure in yourbuild.gradle
file with following snippet:dependencies { classpath 'org.gradle.api.plugins:gradle-gaelyk-plugin:0.4.1' classpath 'org.gradle.api.plugins:gradle-gae-plugin:0.8', { exclude module: "gradle-fatjar-plugin" } classpath 'eu.appsatori:gradle-fatjar-plugin:0.2-rc1' classpath 'org.gradle.api.plugins:gradle-gae-geb-plugin:0.3' }If you don't do this, the extension modules won't work and you get strange errors in production such as there's no method
hours
for the classInteger
or you won't be able to accessrequest
attributes using simplifiedrequest.attr
notation.
Version 1.2
Changes
- Upgraded to Groovy 1.8.6 and App Engine SDK 1.6.6
-
Gaelyk will be available on Maven Central from now on,
in the
org.gaelyk
group with thegaelyk
artifact - The Gradle Gaelyk plugin used by the template project transparently precompiles your Groovlets and Templates for faster startup times
- Changed Maven/Gradle group id from
groovyx.gaelyk
toorg.gaelyk
- Introduction of binary plugins
- You can use
redirect301
for permanent redirects in routes - New
withTransaction{}
andwithTransactionAsyncCommit{}
methods for the async datastore - Memcache get()/put() failures are silently ignored to avoid painful exceptions when Memcache service is misbehaving
- Improve POGO coercion's performance
-
Generated CRUD operations for POGO annotated with
@Entity
- Allow using enum values as POGO properties for coercion
- Added the search service to the binding and bring additional DSLs for index handling and querying
- New geo variables in the binding
- The template project now uses Twitter Bootstrap for its look'n feel
Breaking changes
-
When using
select keys
with the Query DSL, instances ofKey
are returned instead ofEntity
s with only a key field. Hence, you don't need anymore to call.key
on the results of the query. - For those using dependency tools like Maven for building their projects, please remember to change the groupId for the Gaelyk dependency (group: org.gaelyk / module: gaelyk)
Artifacts
- Gaelyk JAR: gaelyk-1.2.jar
- Gaelyk template project: gaelyk-template-project-1.2.zip
Version 1.1
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<Entity>
, 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.
Artifacts
- Gaelyk JAR: gaelyk-1.1.jar
- Gaelyk template project: gaelyk-template-project-1.1.zip
Version 1.0
Changes
- GAE SDK updated to 1.5.2
- Introduction of a Query DSL for creating SQL-like queries against the datastore
- Updated template project with a Gradle build, the usage of Gradle GAE / Gaelyk plugins, and the support of Spock for testing Groovlets
- Introduction of the plugins page in the Gaelyk website, for referencing known plugins
-
By annotating classes with
GaelykBindings
, the same services and variables are injected in your classes as properties, as the ones which are injected in Groovlets and templates - The validation closures of the routes in your URL mapping have access to the request, so you can validate a URL depending on what's in your request (attribute, session, etc.)
- Added a DSLD file (DSL descriptor) for Eclipse for easing code-completion and navigation
-
Added a
get()
method onKey
, as well as on lists of keys - Ability to convert lists to
Key
s - Added two encoded string and key conversion utilities
- Additional
datastore.get()
methods to retrieve entities by their keys more concisely - Problems with the recent XMPP support fixed
- Fixed inability to access the various services and variables from within binding/before/after blocks in plugin descriptors
Artifacts
- Gaelyk JAR: gaelyk-1.0.jar
- Gaelyk template project: gaelyk-template-project-1.0.zip
Breaking changes
-
When storing or retrieving a String value into/from an entity attribute,
Gaelyk now takes care transparently of dealing with
String
vsText
: whether the string you want to access or update is longer than 500 characters or not, Gaelyk will treat that as a mere Java string, so you won't have to deal withText
anymore. More concretely, you don't need to doentity.content = new Text("...")
for storing a string longer than 500 characters, norentity.content.value
to access a string property longer than 500 characters. Now, in all situations, for string properties, independently of their size, just doentity.content
for accessing and setting the value of that property. -
Inside a plugin's
binding {}
block, if you need to access variables like the datastore, memcache, or any usual such variable that is available in your groovlets and templates, you must prefix those variables with this. Example:binding { cachedContent = this.memcache['myKey'] }
Version 0.7
Changes
- Groovy upgraded to 1.8.0 and GAE SDK to 1.5.0
- Added support for XMPP's presence and subscription
- Added variable
files
for easy access to the File service in your Groovlet and templates - Added support for the File service
- Thanks to the new file service, the Gaelyk test suites now properly cover the blobstore related enhancements
- Added datastore metadata querying support
-
Added minimal backend service support
and injected the
lifecycle
manager for the backend instance lifecycle handling -
Use the concurrent request flag in
appengine-web.xml
to allow concurrent requests to hit your application without needing to have additional instances launched automatically by Google App Engine
Artifacts
- Gaelyk JAR: gaelyk-0.7.jar
- Gaelyk template project: gaelyk-template-project-0.7.zip
Version 0.6.1
Changes
- Fixed plugins reloading issue in development mode where plugins were reloaded and ran upon each request. No reloading happen at all, and plugins are parsed and executed only on startup of the application.
- Statement code coverage increased to 91%
Version 0.6
Changes
- Updated to GAE SDK 1.4.0 and Groovy 1.7.6
- Channel service added in the binding and added a convenient method for sending messages
- Ability to specify the "warmup request" handler through a route definition
- Added
app.gaelyk.version
in the binding - Use a servlet context listener for initializing the plugin system
- Initial support for the asynchronous datastore
- Updated the task queue enhancements to use the new package (as task queues migrated from labs)
- Introduced a Gradle build script for building Gaelyk itself
- Increased the code coverage of the project to over 82%
-
Added
before{}
request andafter{}
request lifecycle hooks to plugins - Added initial Eclipse project files in the template project
- Fixed a bug with
ignore
URL routes which triggered NPEs after the capabilities routing was added - Corrected typos in the tutorials
Breaking changes
-
Compared to the previous version of the toolkit, the handling of incoming emails and incoming jabber messages has changed.
The
GaelykIncomingEmailServlet
andGaelykXmppServlet
are gone. It is no longer required to have dedicated servlets for those two purposes, instead you must use the URL routing system to indicate the handlers that will take care of the incoming messages. If you were relying on those two servlets, please make sure to upgrade, and read the updated tutorial on URL routing and incoming email and jabber messages. -
The initialization of the plugin system is not done anymore by the Groovlet and template servlet,
but is done by a servlet context listener.
So you'll have to update your
web.xml
file to specify that listener. Please have a look at the template project or the documentation on how to setup the new context listener.
Version 0.5.6
Changes
- Upgraded to GAE SDK 1.3.8
- Fixed a bug when using
memcache.clearCacheForUri()
which didn't clear all the cache entries - Added a method
Map#toQueryString()
to simplify the creation of a query string when you have a map on hands -
Additonal checks when using Memcache's
get()
andput()
methods when using GString keys (now automatically coerced to normal Strings) - Fixed a small bug with the type coercion of Strings into built-in Datastore types
Version 0.5.5
Changes
- Added a capability-aware URL routing mechanism
- Added a namespace-aware URL routing mechanism
- Completely reorganized the documentation, particularly splitting the content over several pages and providing a table of content.
Version 0.5
Changes
- Fixed the problem of badly placed includes when cache was enabled
- Added an
ignore: true
parameter in route definitions if you want to quickly skip certain patterns - The GDSL file for IntelliJ IDEA has been updated so that you have code-completion in your groovlets and templates
- Many enhancements around the images service
- Provide a convenient wrapper class for the
ImagesService
andImagesServiceFactory
- New methods dedicated to the handling of images
- A DSL for manipulating and transforming images
- Provide a convenient wrapper class for the
- Possibility to clear the cache for a given URI
- Closure memoization through memcache
- Capabilities service additions to query the status of the App Engine services
- URLFetch service enhancements
- Upgrade of the website and template project to Groovy 1.7.5
Version 0.4.4
Changes
- Updated to GAE SDK 1.3.7
-
Jabber and incoming email groovlets now have their implicit logger
(
gaelyk.email
andgaelyk.jabber
) - Plugins are now impacting Jabber and incoming email groovlets as well
- Fixed a bug the conversion of String to Datastore's Category type
- Internal refactorings of the caching logic
-
Added namespace support:
namespace
added in the binding, pointing atNamespaceManager
- new method namespace.of("customerA") { ... } to execute a closure in the context of a specific namespace
Version 0.4.3
Changes
- Improvements in the logging infrastructure for Groovlets and Templates so they follow a standard hierarchy approach (make sure to read the updated tutorial section on this topic)
- A new
delete()
method was added on Datastore'sKey
- Simple Entity and POJO/POGO mapping through type coercion
- Added the OAuth service in the binding
- Updated Groovy to the latest 1.7.4 version
Version 0.4.2
Changes
- Bug fixes regarding the encoding issue with the caching system
- New blobstore service related improvements
Version 0.4.1
Changes
- Updated Gaelyk and the template project to using GAE SDK 1.3.5 and Groovy 1.7.3
-
Give access to new variables in the binding, such as
app.id
,app.version
,app.env.name
, andapp.env.version
-
Added a
log
variable in the binding, so that you can easily log from groovlets and templates - Changed the
localMode
binding variable implementation to use the new underlying environment information - New methods on BlobKey to allow easy reading of the resource with an input stream or a reader
- Memcache caching support for groovlet and template output, when specifying a cache duration in the URL routes
- A few minor bug fixes
Version 0.4
Changes
- Created a simple plugin system to futher modularize your applications and share commonalities between projects
Version 0.3.3
Changes
- Upgraded to the latest versions of Groovy 1.7.2 and the GAE SDK 1.3.3.1
- Fixed a long standing bug where we could not use
from
as named argument formail.send()
- Small internal refactoring on how the binding variables are injected
- Started adding a few more tests for improving the coverage of the project
- Enhance the binding of the routes script, so you can have programmatic routes depending on GAE services (ie. one could store routes in the datastore)
Version 0.3.2
Changes
- Memcache
getAt
syntax was not working for String keys. - Remove the "generated by" messages in the templates and groovlets.
-
Added a
localMode
binding variable indicating whether the application is running locally or deployed on Google App Engine's cloud. - Added a servlet filter URL routing system for friendlier and RESTful URLs
- Upgraded the template project to the newly released Groovy 1.7-RC-1
Version 0.3.1
Changes
- Fixed issue with using the same xmpp script name as the service variable in the binding
Version 0.3
Changes
- Removing most of the
service
suffices in the binding variables for brevity and readibility. - New methods for working with the memcache service (subscript notation, and
in
keyword support). - Support for incoming email support
- Fixed issue with sending of emails
Version 0.2
Changes
-
The Gaelyk classes have been moved to the
groovyx.gaelyk
package, instead ofgroovyx.gaelyk.servlet
. - Additional groovyfication and support for task queues and Jabber/XMPP.
- Upgrade to the latest 1.2.5 version of the Google App Engine SDK, as well as using the the labs JAR with the task queue support.
- JavaDoc for the Gaelyk sources added and linked from the tutorial documentation.