Download
You can use the Gaelyk JAR in combination with Groovy 2.1 and beyond and with the latest Google App Engine SDK.
The latest version was tested with Groovy 2.1.3, and with the 1.8.0 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.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 ofQueryBuilderfor later use - Support for geo-points in search documents
- Better parameters conversion(handling multiple parameters gracefully)
-
@Parentannotation for@Entityclasses -
Better performance for
@Entityclasses coercion (#96) -
DatastoreEntityinterface 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
nullfor 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
afterclosure 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
categorysection 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.xmlproperty. -
Adding task to the queue using the left shift operator
<<now makes asynchronous call instead of synchronous returningFuture<TaskHandle> -
@Entityclasses no longer has version property automatically. You can add it manually using@Versionannotation onLongproperty, 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.gradlefile 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
hoursfor the classIntegeror you won't be able to accessrequestattributes using simplifiedrequest.attrnotation.
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.gaelykgroup with thegaelykartifact - 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.gaelyktoorg.gaelyk - Introduction of binary plugins
- You can use
redirect301for 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 keyswith the Query DSL, instances ofKeyare returned instead ofEntitys with only a key field. Hence, you don't need anymore to call.keyon 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
unindexedproperty on entities to set unindexed properties:person.unindexed.bio = "..." -
Three annotations to customize the bean / entity coercion
(
@Key,@Unindexedand@Ignore) -
Part of the work with the async datastore
get(), whenever you have aFutureto deal with, for example when the async datastore returns aFuture<Entity>, you can call any property on theFutureobject, 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 anIteratorinstead 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
Keys - 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
StringvsText: 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 withTextanymore. More concretely, you don't need to doentity.content = new Text("...")for storing a string longer than 500 characters, norentity.content.valueto access a string property longer than 500 characters. Now, in all situations, for string properties, independently of their size, just doentity.contentfor 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
filesfor 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
lifecyclemanager for the backend instance lifecycle handling -
Use the concurrent request flag in
appengine-web.xmlto 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.versionin 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
ignoreURL 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
GaelykIncomingEmailServletandGaelykXmppServletare 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.xmlfile 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: trueparameter 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
ImagesServiceandImagesServiceFactory - 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.emailandgaelyk.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:
namespaceadded 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 ad
