Redis GORM

  • Tags: persistence, gorm, redis
  • Latest: 1.0.0
  • Last Updated: 12 June 2014
  • Grails version: 2.3.0 > *
  • Authors: Graeme Rocher
  • Organization: Pivotal
1 vote
Dependency:
compile ":redis-gorm:1.0.0"

 Documentation  Source  Issues

Summary

A plugin that integrates the Redis key/value datastore into Grails, providing a GORM-like API onto it

Installation

In BuildConfig:

compile ":redis-gorm:1.0.0"

Description

Currently this plugin only works in Grails >= 2.0 (as of Jan 2012)

Redis is an advanced key-value NoSQL data store. It is similar to memcached except the dataset is not volatile. Like memcached, Redis can store string values, but it can also store lists, sets, and ordered sets. All these data types can be manipulated with atomic operations that push, pop, add and remove elements, perform server side union, intersection, difference between sets, and more. Redis also supports different kinds of sorting.

This plugin provides a GORM like API to Redis. If you are looking for lower level access to Redis then checkout the Redis plugin

This project aims to provide an object-mapping layer on top of Redis to ease common activities such as:

  • Marshalling from Redis hashes to Groovy/Java types and back again
  • Support for GORM dynamic finders, criteria and named queries
  • Session-managed transactions
  • Validating domain instances backed by the Redis datastore
Further documentation on this plugin can be found here

When used with Grails' automatic scaffolding in 2.3.x and above you need to remove the @Transactional(readOnly=true) from the top of the controller for scaffolding to work with Redis GORM because Redis does not support transactions on read operations.

Sources can be found at Github