Sunday, May 27, 2012

Week 2 / Day 2: more Riak

Time to do some more tests.
Now that the Riak plugin is up and running, it mostly works like a charm.

Simple links and datatypes work just the same as with those relational databases from week 1. But what about my DataTypes class? I gave it a first try and immediatly got an error while trying to save:

Error 500: Executing action [save] of controller [sevendatabases.DataTypesController] caused exception: No converter found capable of converting from 'byte[]' to 'java.lang.String'
Servlet: grails
URI: /riak4/grails/dataTypes/save.dispatch
Exception Message: No converter found capable of converting from 'byte[]' to 'java.lang.String'
Caused by: No converter found capable of converting from 'byte[]' to 'java.lang.String'
Class: DataTypesController
At Line: [24] 
hm. Somehow strange since Riak can work with binary datatypes. On a second though, I used a domain class crafted for the hibernate plugin and expect it to work with the riak plugin.

After removing the Byte[] - Property, all other datatypes work perfectly!

Riak-Roundup


Time was too short to check out all Riak features, but I learnt a lot...
  • the riak plugin is based on the Spring-Data project. The goal of this project is to make it easier "to use new data access technologies such as non-relational databases". So I guess I will revisit Spring Data the next weeks.
  • the version of the riak plugin is 1.0.0M - for a first milestone release it is forgiveable that not everything works as smooth as it could be. The documentation is already quite good, support is fast (see my Stack Overflow question) and it works better than other plugins with higher version numbers ;-)
  • I only found some time to test some simple domain features, but the documentation promises that mapreduce and other features are accessible through the plugin!

No comments:

Post a Comment