simple questions

0 views
Skip to first unread message

Wilson MacGyver

unread,
Oct 29, 2010, 6:26:02 PM10/29/10
to inconse...@googlegroups.com
Hi,

I have some questions about how GORM, inconsequential and spring-data
all are suppose to be fit
together. I figure I ask here before asking on the grails list.

I noticed there is inconsequential branch of the grails at
http://github.com/grails/inconsequential
but redis one was released as a separate plugin that works with 1.3.5.

Then of course, spring data was announced with intention to support in
particular riak and couchdb.
I see spring-datastore in the github, is that what it is?

I guess long and short of it is, suppose someone wants to go build a new plugin
to add GORM support for "my awesome NOSQL", what are the steps/code to
look at/model after, etc?

also, it was mentioned that in grails 2.0, REST client support within
grails will be enhanced based on
work done in inconsequential/GORM NOSQL.

What http client library is being used? Is async style operation being
considered at all?

Thanks,

--
Omnem crede diem tibi diluxisse supremum.

graeme...@gmail.com

unread,
Nov 1, 2010, 6:38:28 AM11/1/10
to Inconsequential
Hi Mac,

Answers to your questions below.

On Oct 29, 11:26 pm, Wilson MacGyver <wmacgy...@gmail.com> wrote:
> Hi,
>
> I have some questions about how GORM, inconsequential and spring-data
> all are suppose to be fit
> together. I figure I ask here before asking on the grails list.
>
> I noticed there is inconsequential branch of the grails athttp://github.com/grails/inconsequential
> but redis one was released as a separate plugin that works with 1.3.5.

The redis plugin uses the code from the above project. So we publish
jars to our repos which the redis plugin then uses. There is very
little code in the actual plugin.

>
> Then of course, spring data was announced with intention to support in
> particular riak and couchdb.
> I see spring-datastore in the github, is that what it is?

There are two parts to spring-data one is the lower level APIs the
other is the higher level mapping apis that builds on these lower
level apis. The inconsequential project (name subject to change)
currently handles the higher level mapping.
>
> I guess long and short of it is, suppose someone wants to go build a new plugin
> to add GORM support for "my awesome NOSQL", what are the steps/code to
> look at/model after, etc?

Best bet is to take a look the code for spring-datastore-redis and
spring-datastore-gemfire which demonstrate how to build a GORM
implementation. You don't have to do any Groovy meta-programming, you
just have to implement a few interfaces (DataStore, Session,
EntityPersister etc.) and pass the TCK.

To setup your project to run the TCK you basically have to create a
grails-datastore-gorm-xyz project and add the following to your
build.gradle:

dependencies {
compile project(":grails-datastore-gorm"),
project(":spring-datastore-xyz"),
project(":spring-datastore-core")
testCompile project(":grails-datastore-gorm-test"),project(":grails-
datastore-gorm-tck")
}
jar.appendix = 'gorm-xyz'

Where XYZ is the name of your implementation. by including the TCK
project in your testCompile you're saying you want the TCK tests to
run against your project. You then need to create
"org.grails.datastore.gorm.Setup" class that sets up the datastore for
your implementation.

See for example the "grails-datastore-gorm-redis" and "grails-
datastore-gorm-gemfire" projects and how they do it.
>
> also, it was mentioned that in grails 2.0, REST client support within
> grails will be enhanced based on
> work done in inconsequential/GORM NOSQL.
>
> What http client library is being used? Is async style operation being
> considered at all?

Since we haven't started work on this yet I can't confirm the
dependencies, but async operations should definitely be something on
the todo list.

Cheers
Graeme

Wilson MacGyver

unread,
Nov 2, 2010, 8:20:14 PM11/2/10
to inconse...@googlegroups.com
Thank you for such detail answers. This give me quite a bit to start with!
Reply all
Reply to author
Forward
0 new messages