You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Kevin Burton <bu...@spinn3r.com> on 2014/06/08 04:23:49 UTC

Object mapper for CQL

Looks like the java-driver is working on an object mapper:

"More modules including a simple object mapper will come shortly."
But of course I need one now …
I'm curious what others are doing here.

I don't want to pass around Row objects in my code if I can avoid it..
Ideally I would just run a query and get back a POJO.

Another issue is how are these POJOs generated.  Are they generated from
the schema?  is the schema generated from the POJOs ?  From a side file?

And granted, there are existing ORMs out there but I don't think any
support CQL.

-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
Skype: *burtonator*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>
War is peace. Freedom is slavery. Ignorance is strength. Corporations are
people.

Re: Object mapper for CQL

Posted by Kevin Burton <bu...@spinn3r.com>.
Wow… this was an interesting thread!

There are tons of options here.. interesting that I wasn't able to find
them.

What I ended up doing was just banging out a code generator that uses
Velocity templates that generates POJOs and uses Jackson and standard
naming conventions to mirror objects.

It's super small (like 1k lines of code) so maintenance shouldn't be too
hard.

IT also lets us push some small features into the library that might be
specific to our product (like Avro and JSON encoding).


On Sun, Jun 8, 2014 at 9:00 PM, Colin <co...@gmail.com> wrote:

> Sounds like you've done some great work.  But I still think it's a good
> idea for people new to Cassandra establish a base line so that they have
> something to compare other approaches against.
>
> It sounds like we potentially have different views in this regard, but are
> still interested in the same thing-helping people be successful using
> Casaandra.
>
> --
> Colin
> 320-221-9531
>
>
> > On Jun 8, 2014, at 10:24 PM, Johan Edstrom <se...@gmail.com> wrote:
> >
> > On a second reply I'll provide some docs.
> >
> > We looked at Astynax (Yeah I didn't like the refactor)
> > We looked at spring - "Are you fucking kidding me?"
> > We have done quite a bit of work in the ORM arena.
> >
> > * I passionately hate the idea of CQL.  *
> >
> > So - I told myself, I need to make this work so I never ever
> > have to work with that. See, I liked Big Table, I loved the idea of
> modeling without
> > constrained and  contrived relations. I was even more of a fan
> > combining analytics and adjoining vertices.
> >
> > That said, - Hecate-CQL3 does address all of the above, as well as
> > a Pojo / DAO cache, a Table Cache, a what was changed store.
> >
> > If you actually think you'll be writing enterprise code at speed using
> > a Rowset, sorry, you need a foam helmet.
> >
> > /je
> >
> >
> >
> >> On Jun 8, 2014, at 9:05 PM, Colin <co...@gmail.com> wrote:
> >>
> >> I wasn't responding as a Datastax employee.
> >>
> >> I have used hector, Achilles and a few others as well.  The .net
> drivers used to have an edge, but that is evaporating as well.
> >>
> >> I have also built my own mapping layers.
> >>
> >> But all if that was when the drivers from Datastax weren't there yet.
> >>
> >> Yes, I work for Datastax.  I also speak at meetups, and contribute to
> the community.
> >>
> >> Datastax doesn't  charge for the drivers by the way.
> >>
> >> I have seen folks use third party drivers and end up paying for it down
> the road.
> >>
> >> If you're going to consider using a community driver, then I would
> recommend something that wraps the Datastax drivers, like netflix does.
> >>
> >> All I am saying is that sometimes, people make using Casaandra more
> complex than it needs to be and end up introducing a lot of new tech in
> their initial adoption-this increases the risk of the project.
> >>
> >> Also, I wouldn't use anything built on thrift.  Datastax has a growing
> driver team, a growing focus on testing and certification, and if you end
> up wanting support for your project and are using an unsupported driver, it
> can make your life more difficult.
> >>
> >> In response to how quickly  responded, I often try to provide
> assistance out here-I don't get paid for it, and it's not part of my job.
> Having close to 5 years of production experience with Cassandra means that
> I have made all the mistakes out there and probably invented a few of my
> own.
> >>
> >> I have watched a lot if the questions Kevin has asked-his project is
> ambitious for a first dip into Cassandra, I want to see him succeed, and
> have given him the same advice I give our customers.
> >> --
> >> Colin
> >> 320-221-9531
> >>
> >>
> >>> On Jun 8, 2014, at 9:43 PM, Jeff Genender <jg...@apache.org>
> wrote:
> >>>
> >>> Comments in line...
> >>>
> >>>> On Jun 8, 2014, at 8:05 PM, Colin <co...@gmail.com> wrote:
> >>>>
> >>>> I would check out spring Cassandra-most of the java drivers out there
> for Cassandra offer very little over the new 2. driver from Datastax.  Or
> just use the java driver 2. as is.
> >>>
> >>> Interesting… answer came within 7 minutes… from a vendor (Datastax
> employee)… and terribly opinionated without data to back up… I’m just
> sayin… ;-)
> >>>
> >>> Colin… did you even look at the driver referenced by Johan?  If so,
> thats certainly is the fastest code review and driver test I have ever
> seen. ;-)
> >>>
> >>> Perhaps a bit more kindness may be more appropriate?  Not a great way
> to build contributions from the community...
> >>>
> >>> <SNIP>
> >>>
> >>>> Whatever you do, make sure the driver you use supports CQL 3 and the
> native protocol.  Thrift, like BOP, will most likely go away at some point
> in the future.
> >>>
> >>> Read what Johan stated… “hecate-cql3” <— CQL 3
> >>>
> >>> I think a nice look at what was produced may be a good thing for the
> community and maybe even Datastax may think its kinda cool?
> >>>
> >>> Jeff Genender
> >>> Apache Member
> >>> http://www.apache.org
> >>>
> >>>
> >>>> --
> >>>> Colin
> >>>> 320-221-9531
> >>>>
> >>>>
> >>>>> On Jun 8, 2014, at 8:58 PM, Johan Edstrom <se...@gmail.com> wrote:
> >>>>>
> >>>>> Kevin,
> >>>>>
> >>>>> We are about to release 2.0 of https://github.com/savoirtech/hecate
> >>>>> It is an ASL licensed library that started with Jeff Genender
> writing a Pojo
> >>>>> library in Hector for a project we did for Ecuador (Essentially all
> of Ecuador uses this).
> >>>>> I extended this with Pojo Graph stuff like Collections and Composite
> key indexing.
> >>>>>
> >>>>> James Carman then took this a bit further in Cassidy with some new
> concepts.
> >>>>> I then a while back decided to bite the bullet and my hatred of CQL
> and just write
> >>>>> the same thing, it started out with a very reflection and somewhat
> clunky interface,
> >>>>> James decided to re-write this and incorporate the learnings from
> Cassidy.
> >>>>>
> >>>>> - Jeff, James and I all work together. This library is already in
> use and has been
> >>>>> in use under 30 mil account circumstances as well as quite decent
> loads.
> >>>>>
> >>>>> What you see in trunk now under hecate-cql3 is what'll go out as
> 2.0, it is a new API,
> >>>>> we support "single" pojo and Object graph, column modifiers, indexer
> and everything
> >>>>> else we could think of in a library that isn't ORM but maps data to
> C*.
> >>>>>
> >>>>> What will be out in I think 2.0.2 is an external indexer very much
> like Titan and
> >>>>> possibly some more real graph (vertices) stuff. We are also looking
> at an SchemaIdentifier
> >>>>> so that we can get back to working with dynamic columns at a decent
> conceptual speed :)
> >>>>>
> >>>>> /je
> >>>>>
> >>>>>> On Jun 8, 2014, at 2:46 AM, DuyHai Doan <do...@gmail.com>
> wrote:
> >>>>>>
> >>>>>> You can have a look at Achilles, it's using the Java Driver
> underneath : https://github.com/doanduyhai/Achilles
> >>>>>>
> >>>>>> Le 8 juin 2014 04:24, "Kevin Burton" <bu...@spinn3r.com> a écrit :
> >>>>>> Looks like the java-driver is working on an object mapper:
> >>>>>>
> >>>>>> "More modules including a simple object mapper will come shortly."
> >>>>>> But of course I need one now …
> >>>>>> I'm curious what others are doing here.
> >>>>>>
> >>>>>> I don't want to pass around Row objects in my code if I can avoid
> it.. Ideally I would just run a query and get back a POJO.
> >>>>>>
> >>>>>> Another issue is how are these POJOs generated.  Are they generated
> from the schema?  is the schema generated from the POJOs ?  From a side
> file?
> >>>>>>
> >>>>>> And granted, there are existing ORMs out there but I don't think
> any support CQL.
> >>>>>>
> >>>>>> --
> >>>>>>
> >>>>>> Founder/CEO Spinn3r.com
> >>>>>> Location: San Francisco, CA
> >>>>>> Skype: burtonator
> >>>>>> blog: http://burtonator.wordpress.com
> >>>>>> … or check out my Google+ profile
> >>>>>>
> >>>>>> War is peace. Freedom is slavery. Ignorance is strength.
> Corporations are people.
> >
>



-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
Skype: *burtonator*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>
War is peace. Freedom is slavery. Ignorance is strength. Corporations are
people.

Re: Object mapper for CQL

Posted by Colin <co...@gmail.com>.
Sounds like you've done some great work.  But I still think it's a good idea for people new to Cassandra establish a base line so that they have something to compare other approaches against.

It sounds like we potentially have different views in this regard, but are still interested in the same thing-helping people be successful using Casaandra.

--
Colin
320-221-9531


> On Jun 8, 2014, at 10:24 PM, Johan Edstrom <se...@gmail.com> wrote:
> 
> On a second reply I'll provide some docs.
> 
> We looked at Astynax (Yeah I didn't like the refactor)
> We looked at spring - "Are you fucking kidding me?"
> We have done quite a bit of work in the ORM arena.
> 
> * I passionately hate the idea of CQL.  *
> 
> So - I told myself, I need to make this work so I never ever
> have to work with that. See, I liked Big Table, I loved the idea of modeling without 
> constrained and  contrived relations. I was even more of a fan 
> combining analytics and adjoining vertices.
> 
> That said, - Hecate-CQL3 does address all of the above, as well as 
> a Pojo / DAO cache, a Table Cache, a what was changed store.
> 
> If you actually think you'll be writing enterprise code at speed using 
> a Rowset, sorry, you need a foam helmet.
> 
> /je
> 
> 
> 
>> On Jun 8, 2014, at 9:05 PM, Colin <co...@gmail.com> wrote:
>> 
>> I wasn't responding as a Datastax employee.
>> 
>> I have used hector, Achilles and a few others as well.  The .net drivers used to have an edge, but that is evaporating as well.
>> 
>> I have also built my own mapping layers.
>> 
>> But all if that was when the drivers from Datastax weren't there yet.
>> 
>> Yes, I work for Datastax.  I also speak at meetups, and contribute to the community.  
>> 
>> Datastax doesn't  charge for the drivers by the way.
>> 
>> I have seen folks use third party drivers and end up paying for it down the road. 
>> 
>> If you're going to consider using a community driver, then I would recommend something that wraps the Datastax drivers, like netflix does.
>> 
>> All I am saying is that sometimes, people make using Casaandra more complex than it needs to be and end up introducing a lot of new tech in their initial adoption-this increases the risk of the project.
>> 
>> Also, I wouldn't use anything built on thrift.  Datastax has a growing driver team, a growing focus on testing and certification, and if you end up wanting support for your project and are using an unsupported driver, it can make your life more difficult.
>> 
>> In response to how quickly  responded, I often try to provide assistance out here-I don't get paid for it, and it's not part of my job. Having close to 5 years of production experience with Cassandra means that I have made all the mistakes out there and probably invented a few of my own.
>> 
>> I have watched a lot if the questions Kevin has asked-his project is ambitious for a first dip into Cassandra, I want to see him succeed, and have given him the same advice I give our customers.
>> --
>> Colin
>> 320-221-9531
>> 
>> 
>>> On Jun 8, 2014, at 9:43 PM, Jeff Genender <jg...@apache.org> wrote:
>>> 
>>> Comments in line...
>>> 
>>>> On Jun 8, 2014, at 8:05 PM, Colin <co...@gmail.com> wrote:
>>>> 
>>>> I would check out spring Cassandra-most of the java drivers out there for Cassandra offer very little over the new 2. driver from Datastax.  Or just use the java driver 2. as is.
>>> 
>>> Interesting… answer came within 7 minutes… from a vendor (Datastax employee)… and terribly opinionated without data to back up… I’m just sayin… ;-)
>>> 
>>> Colin… did you even look at the driver referenced by Johan?  If so, thats certainly is the fastest code review and driver test I have ever seen. ;-)
>>> 
>>> Perhaps a bit more kindness may be more appropriate?  Not a great way to build contributions from the community...
>>> 
>>> <SNIP>
>>> 
>>>> Whatever you do, make sure the driver you use supports CQL 3 and the native protocol.  Thrift, like BOP, will most likely go away at some point in the future.
>>> 
>>> Read what Johan stated… “hecate-cql3” <— CQL 3
>>> 
>>> I think a nice look at what was produced may be a good thing for the community and maybe even Datastax may think its kinda cool?
>>> 
>>> Jeff Genender
>>> Apache Member
>>> http://www.apache.org
>>> 
>>> 
>>>> --
>>>> Colin
>>>> 320-221-9531
>>>> 
>>>> 
>>>>> On Jun 8, 2014, at 8:58 PM, Johan Edstrom <se...@gmail.com> wrote:
>>>>> 
>>>>> Kevin, 
>>>>> 
>>>>> We are about to release 2.0 of https://github.com/savoirtech/hecate
>>>>> It is an ASL licensed library that started with Jeff Genender writing a Pojo
>>>>> library in Hector for a project we did for Ecuador (Essentially all of Ecuador uses this).
>>>>> I extended this with Pojo Graph stuff like Collections and Composite key indexing.
>>>>> 
>>>>> James Carman then took this a bit further in Cassidy with some new concepts.
>>>>> I then a while back decided to bite the bullet and my hatred of CQL and just write 
>>>>> the same thing, it started out with a very reflection and somewhat clunky interface, 
>>>>> James decided to re-write this and incorporate the learnings from Cassidy.
>>>>> 
>>>>> - Jeff, James and I all work together. This library is already in use and has been 
>>>>> in use under 30 mil account circumstances as well as quite decent loads.
>>>>> 
>>>>> What you see in trunk now under hecate-cql3 is what'll go out as 2.0, it is a new API, 
>>>>> we support "single" pojo and Object graph, column modifiers, indexer and everything
>>>>> else we could think of in a library that isn't ORM but maps data to C*.
>>>>> 
>>>>> What will be out in I think 2.0.2 is an external indexer very much like Titan and 
>>>>> possibly some more real graph (vertices) stuff. We are also looking at an SchemaIdentifier
>>>>> so that we can get back to working with dynamic columns at a decent conceptual speed :)
>>>>> 
>>>>> /je
>>>>> 
>>>>>> On Jun 8, 2014, at 2:46 AM, DuyHai Doan <do...@gmail.com> wrote:
>>>>>> 
>>>>>> You can have a look at Achilles, it's using the Java Driver underneath : https://github.com/doanduyhai/Achilles
>>>>>> 
>>>>>> Le 8 juin 2014 04:24, "Kevin Burton" <bu...@spinn3r.com> a écrit :
>>>>>> Looks like the java-driver is working on an object mapper:
>>>>>> 
>>>>>> "More modules including a simple object mapper will come shortly."
>>>>>> But of course I need one now … 
>>>>>> I'm curious what others are doing here.  
>>>>>> 
>>>>>> I don't want to pass around Row objects in my code if I can avoid it.. Ideally I would just run a query and get back a POJO.  
>>>>>> 
>>>>>> Another issue is how are these POJOs generated.  Are they generated from the schema?  is the schema generated from the POJOs ?  From a side file?  
>>>>>> 
>>>>>> And granted, there are existing ORMs out there but I don't think any support CQL.
>>>>>> 
>>>>>> -- 
>>>>>> 
>>>>>> Founder/CEO Spinn3r.com
>>>>>> Location: San Francisco, CA
>>>>>> Skype: burtonator
>>>>>> blog: http://burtonator.wordpress.com
>>>>>> … or check out my Google+ profile
>>>>>> 
>>>>>> War is peace. Freedom is slavery. Ignorance is strength. Corporations are people.
> 

Re: Object mapper for CQL

Posted by Johan Edstrom <se...@gmail.com>.
On a second reply I'll provide some docs.

We looked at Astynax (Yeah I didn't like the refactor)
We looked at spring - "Are you fucking kidding me?"
We have done quite a bit of work in the ORM arena.

* I passionately hate the idea of CQL.  *

So - I told myself, I need to make this work so I never ever
have to work with that. See, I liked Big Table, I loved the idea of modeling without 
constrained and  contrived relations. I was even more of a fan 
combining analytics and adjoining vertices.

That said, - Hecate-CQL3 does address all of the above, as well as 
a Pojo / DAO cache, a Table Cache, a what was changed store.

If you actually think you'll be writing enterprise code at speed using 
a Rowset, sorry, you need a foam helmet.

/je



On Jun 8, 2014, at 9:05 PM, Colin <co...@gmail.com> wrote:

> I wasn't responding as a Datastax employee.
> 
> I have used hector, Achilles and a few others as well.  The .net drivers used to have an edge, but that is evaporating as well.
> 
> I have also built my own mapping layers.
> 
> But all if that was when the drivers from Datastax weren't there yet.
> 
> Yes, I work for Datastax.  I also speak at meetups, and contribute to the community.  
> 
> Datastax doesn't  charge for the drivers by the way.
> 
> I have seen folks use third party drivers and end up paying for it down the road. 
> 
> If you're going to consider using a community driver, then I would recommend something that wraps the Datastax drivers, like netflix does.
> 
> All I am saying is that sometimes, people make using Casaandra more complex than it needs to be and end up introducing a lot of new tech in their initial adoption-this increases the risk of the project.
> 
> Also, I wouldn't use anything built on thrift.  Datastax has a growing driver team, a growing focus on testing and certification, and if you end up wanting support for your project and are using an unsupported driver, it can make your life more difficult.
> 
> In response to how quickly  responded, I often try to provide assistance out here-I don't get paid for it, and it's not part of my job. Having close to 5 years of production experience with Cassandra means that I have made all the mistakes out there and probably invented a few of my own.
> 
> I have watched a lot if the questions Kevin has asked-his project is ambitious for a first dip into Cassandra, I want to see him succeed, and have given him the same advice I give our customers.
> --
> Colin
> 320-221-9531
> 
> 
>> On Jun 8, 2014, at 9:43 PM, Jeff Genender <jg...@apache.org> wrote:
>> 
>> Comments in line...
>> 
>>> On Jun 8, 2014, at 8:05 PM, Colin <co...@gmail.com> wrote:
>>> 
>>> I would check out spring Cassandra-most of the java drivers out there for Cassandra offer very little over the new 2. driver from Datastax.  Or just use the java driver 2. as is.
>> 
>> Interesting… answer came within 7 minutes… from a vendor (Datastax employee)… and terribly opinionated without data to back up… I’m just sayin… ;-)
>> 
>> Colin… did you even look at the driver referenced by Johan?  If so, thats certainly is the fastest code review and driver test I have ever seen. ;-)
>> 
>> Perhaps a bit more kindness may be more appropriate?  Not a great way to build contributions from the community...
>> 
>> <SNIP>
>> 
>>> Whatever you do, make sure the driver you use supports CQL 3 and the native protocol.  Thrift, like BOP, will most likely go away at some point in the future.
>> 
>> Read what Johan stated… “hecate-cql3” <— CQL 3
>> 
>> I think a nice look at what was produced may be a good thing for the community and maybe even Datastax may think its kinda cool?
>> 
>> Jeff Genender
>> Apache Member
>> http://www.apache.org
>> 
>> 
>>> --
>>> Colin
>>> 320-221-9531
>>> 
>>> 
>>>> On Jun 8, 2014, at 8:58 PM, Johan Edstrom <se...@gmail.com> wrote:
>>>> 
>>>> Kevin, 
>>>> 
>>>> We are about to release 2.0 of https://github.com/savoirtech/hecate
>>>> It is an ASL licensed library that started with Jeff Genender writing a Pojo
>>>> library in Hector for a project we did for Ecuador (Essentially all of Ecuador uses this).
>>>> I extended this with Pojo Graph stuff like Collections and Composite key indexing.
>>>> 
>>>> James Carman then took this a bit further in Cassidy with some new concepts.
>>>> I then a while back decided to bite the bullet and my hatred of CQL and just write 
>>>> the same thing, it started out with a very reflection and somewhat clunky interface, 
>>>> James decided to re-write this and incorporate the learnings from Cassidy.
>>>> 
>>>> - Jeff, James and I all work together. This library is already in use and has been 
>>>> in use under 30 mil account circumstances as well as quite decent loads.
>>>> 
>>>> What you see in trunk now under hecate-cql3 is what'll go out as 2.0, it is a new API, 
>>>> we support "single" pojo and Object graph, column modifiers, indexer and everything
>>>> else we could think of in a library that isn't ORM but maps data to C*.
>>>> 
>>>> What will be out in I think 2.0.2 is an external indexer very much like Titan and 
>>>> possibly some more real graph (vertices) stuff. We are also looking at an SchemaIdentifier
>>>> so that we can get back to working with dynamic columns at a decent conceptual speed :)
>>>> 
>>>> /je
>>>> 
>>>>> On Jun 8, 2014, at 2:46 AM, DuyHai Doan <do...@gmail.com> wrote:
>>>>> 
>>>>> You can have a look at Achilles, it's using the Java Driver underneath : https://github.com/doanduyhai/Achilles
>>>>> 
>>>>> Le 8 juin 2014 04:24, "Kevin Burton" <bu...@spinn3r.com> a écrit :
>>>>> Looks like the java-driver is working on an object mapper:
>>>>> 
>>>>> "More modules including a simple object mapper will come shortly."
>>>>> But of course I need one now … 
>>>>> I'm curious what others are doing here.  
>>>>> 
>>>>> I don't want to pass around Row objects in my code if I can avoid it.. Ideally I would just run a query and get back a POJO.  
>>>>> 
>>>>> Another issue is how are these POJOs generated.  Are they generated from the schema?  is the schema generated from the POJOs ?  From a side file?  
>>>>> 
>>>>> And granted, there are existing ORMs out there but I don't think any support CQL.
>>>>> 
>>>>> -- 
>>>>> 
>>>>> Founder/CEO Spinn3r.com
>>>>> Location: San Francisco, CA
>>>>> Skype: burtonator
>>>>> blog: http://burtonator.wordpress.com
>>>>> … or check out my Google+ profile
>>>>> 
>>>>> War is peace. Freedom is slavery. Ignorance is strength. Corporations are people.
>> 


Re: Object mapper for CQL

Posted by Johan Edstrom <se...@gmail.com>.
So - you deduced that we were not using the driver, 
were not datstax friendly and we'd be paying for this down the road?

On Jun 8, 2014, at 9:05 PM, Colin <co...@gmail.com> wrote:

> I wasn't responding as a Datastax employee.
> 
> I have used hector, Achilles and a few others as well.  The .net drivers used to have an edge, but that is evaporating as well.
> 
> I have also built my own mapping layers.
> 
> But all if that was when the drivers from Datastax weren't there yet.
> 
> Yes, I work for Datastax.  I also speak at meetups, and contribute to the community.  
> 
> Datastax doesn't  charge for the drivers by the way.
> 
> I have seen folks use third party drivers and end up paying for it down the road. 
> 
> If you're going to consider using a community driver, then I would recommend something that wraps the Datastax drivers, like netflix does.
> 
> All I am saying is that sometimes, people make using Casaandra more complex than it needs to be and end up introducing a lot of new tech in their initial adoption-this increases the risk of the project.
> 
> Also, I wouldn't use anything built on thrift.  Datastax has a growing driver team, a growing focus on testing and certification, and if you end up wanting support for your project and are using an unsupported driver, it can make your life more difficult.
> 
> In response to how quickly  responded, I often try to provide assistance out here-I don't get paid for it, and it's not part of my job. Having close to 5 years of production experience with Cassandra means that I have made all the mistakes out there and probably invented a few of my own.
> 
> I have watched a lot if the questions Kevin has asked-his project is ambitious for a first dip into Cassandra, I want to see him succeed, and have given him the same advice I give our customers.
> --
> Colin
> 320-221-9531
> 
> 
>> On Jun 8, 2014, at 9:43 PM, Jeff Genender <jg...@apache.org> wrote:
>> 
>> Comments in line...
>> 
>>> On Jun 8, 2014, at 8:05 PM, Colin <co...@gmail.com> wrote:
>>> 
>>> I would check out spring Cassandra-most of the java drivers out there for Cassandra offer very little over the new 2. driver from Datastax.  Or just use the java driver 2. as is.
>> 
>> Interesting… answer came within 7 minutes… from a vendor (Datastax employee)… and terribly opinionated without data to back up… I’m just sayin… ;-)
>> 
>> Colin… did you even look at the driver referenced by Johan?  If so, thats certainly is the fastest code review and driver test I have ever seen. ;-)
>> 
>> Perhaps a bit more kindness may be more appropriate?  Not a great way to build contributions from the community...
>> 
>> <SNIP>
>> 
>>> Whatever you do, make sure the driver you use supports CQL 3 and the native protocol.  Thrift, like BOP, will most likely go away at some point in the future.
>> 
>> Read what Johan stated… “hecate-cql3” <— CQL 3
>> 
>> I think a nice look at what was produced may be a good thing for the community and maybe even Datastax may think its kinda cool?
>> 
>> Jeff Genender
>> Apache Member
>> http://www.apache.org
>> 
>> 
>>> --
>>> Colin
>>> 320-221-9531
>>> 
>>> 
>>>> On Jun 8, 2014, at 8:58 PM, Johan Edstrom <se...@gmail.com> wrote:
>>>> 
>>>> Kevin, 
>>>> 
>>>> We are about to release 2.0 of https://github.com/savoirtech/hecate
>>>> It is an ASL licensed library that started with Jeff Genender writing a Pojo
>>>> library in Hector for a project we did for Ecuador (Essentially all of Ecuador uses this).
>>>> I extended this with Pojo Graph stuff like Collections and Composite key indexing.
>>>> 
>>>> James Carman then took this a bit further in Cassidy with some new concepts.
>>>> I then a while back decided to bite the bullet and my hatred of CQL and just write 
>>>> the same thing, it started out with a very reflection and somewhat clunky interface, 
>>>> James decided to re-write this and incorporate the learnings from Cassidy.
>>>> 
>>>> - Jeff, James and I all work together. This library is already in use and has been 
>>>> in use under 30 mil account circumstances as well as quite decent loads.
>>>> 
>>>> What you see in trunk now under hecate-cql3 is what'll go out as 2.0, it is a new API, 
>>>> we support "single" pojo and Object graph, column modifiers, indexer and everything
>>>> else we could think of in a library that isn't ORM but maps data to C*.
>>>> 
>>>> What will be out in I think 2.0.2 is an external indexer very much like Titan and 
>>>> possibly some more real graph (vertices) stuff. We are also looking at an SchemaIdentifier
>>>> so that we can get back to working with dynamic columns at a decent conceptual speed :)
>>>> 
>>>> /je
>>>> 
>>>>> On Jun 8, 2014, at 2:46 AM, DuyHai Doan <do...@gmail.com> wrote:
>>>>> 
>>>>> You can have a look at Achilles, it's using the Java Driver underneath : https://github.com/doanduyhai/Achilles
>>>>> 
>>>>> Le 8 juin 2014 04:24, "Kevin Burton" <bu...@spinn3r.com> a écrit :
>>>>> Looks like the java-driver is working on an object mapper:
>>>>> 
>>>>> "More modules including a simple object mapper will come shortly."
>>>>> But of course I need one now … 
>>>>> I'm curious what others are doing here.  
>>>>> 
>>>>> I don't want to pass around Row objects in my code if I can avoid it.. Ideally I would just run a query and get back a POJO.  
>>>>> 
>>>>> Another issue is how are these POJOs generated.  Are they generated from the schema?  is the schema generated from the POJOs ?  From a side file?  
>>>>> 
>>>>> And granted, there are existing ORMs out there but I don't think any support CQL.
>>>>> 
>>>>> -- 
>>>>> 
>>>>> Founder/CEO Spinn3r.com
>>>>> Location: San Francisco, CA
>>>>> Skype: burtonator
>>>>> blog: http://burtonator.wordpress.com
>>>>> … or check out my Google+ profile
>>>>> 
>>>>> War is peace. Freedom is slavery. Ignorance is strength. Corporations are people.
>> 


Re: Object mapper for CQL

Posted by Colin <co...@gmail.com>.
I wasn't responding as a Datastax employee.

I have used hector, Achilles and a few others as well.  The .net drivers used to have an edge, but that is evaporating as well.

I have also built my own mapping layers.

But all if that was when the drivers from Datastax weren't there yet.

Yes, I work for Datastax.  I also speak at meetups, and contribute to the community.  

Datastax doesn't  charge for the drivers by the way.

I have seen folks use third party drivers and end up paying for it down the road. 

If you're going to consider using a community driver, then I would recommend something that wraps the Datastax drivers, like netflix does.

All I am saying is that sometimes, people make using Casaandra more complex than it needs to be and end up introducing a lot of new tech in their initial adoption-this increases the risk of the project.

Also, I wouldn't use anything built on thrift.  Datastax has a growing driver team, a growing focus on testing and certification, and if you end up wanting support for your project and are using an unsupported driver, it can make your life more difficult.

In response to how quickly  responded, I often try to provide assistance out here-I don't get paid for it, and it's not part of my job. Having close to 5 years of production experience with Cassandra means that I have made all the mistakes out there and probably invented a few of my own.

I have watched a lot if the questions Kevin has asked-his project is ambitious for a first dip into Cassandra, I want to see him succeed, and have given him the same advice I give our customers.
--
Colin
320-221-9531


> On Jun 8, 2014, at 9:43 PM, Jeff Genender <jg...@apache.org> wrote:
> 
> Comments in line...
> 
>> On Jun 8, 2014, at 8:05 PM, Colin <co...@gmail.com> wrote:
>> 
>> I would check out spring Cassandra-most of the java drivers out there for Cassandra offer very little over the new 2. driver from Datastax.  Or just use the java driver 2. as is.
> 
> Interesting… answer came within 7 minutes… from a vendor (Datastax employee)… and terribly opinionated without data to back up… I’m just sayin… ;-)
> 
> Colin… did you even look at the driver referenced by Johan?  If so, thats certainly is the fastest code review and driver test I have ever seen. ;-)
> 
> Perhaps a bit more kindness may be more appropriate?  Not a great way to build contributions from the community...
> 
> <SNIP>
> 
>> Whatever you do, make sure the driver you use supports CQL 3 and the native protocol.  Thrift, like BOP, will most likely go away at some point in the future.
> 
> Read what Johan stated… “hecate-cql3” <— CQL 3
> 
> I think a nice look at what was produced may be a good thing for the community and maybe even Datastax may think its kinda cool?
> 
> Jeff Genender
> Apache Member
> http://www.apache.org
> 
> 
>> --
>> Colin
>> 320-221-9531
>> 
>> 
>>> On Jun 8, 2014, at 8:58 PM, Johan Edstrom <se...@gmail.com> wrote:
>>> 
>>> Kevin, 
>>> 
>>> We are about to release 2.0 of https://github.com/savoirtech/hecate
>>> It is an ASL licensed library that started with Jeff Genender writing a Pojo
>>> library in Hector for a project we did for Ecuador (Essentially all of Ecuador uses this).
>>> I extended this with Pojo Graph stuff like Collections and Composite key indexing.
>>> 
>>> James Carman then took this a bit further in Cassidy with some new concepts.
>>> I then a while back decided to bite the bullet and my hatred of CQL and just write 
>>> the same thing, it started out with a very reflection and somewhat clunky interface, 
>>> James decided to re-write this and incorporate the learnings from Cassidy.
>>> 
>>> - Jeff, James and I all work together. This library is already in use and has been 
>>> in use under 30 mil account circumstances as well as quite decent loads.
>>> 
>>> What you see in trunk now under hecate-cql3 is what'll go out as 2.0, it is a new API, 
>>> we support "single" pojo and Object graph, column modifiers, indexer and everything
>>> else we could think of in a library that isn't ORM but maps data to C*.
>>> 
>>> What will be out in I think 2.0.2 is an external indexer very much like Titan and 
>>> possibly some more real graph (vertices) stuff. We are also looking at an SchemaIdentifier
>>> so that we can get back to working with dynamic columns at a decent conceptual speed :)
>>> 
>>> /je
>>> 
>>>> On Jun 8, 2014, at 2:46 AM, DuyHai Doan <do...@gmail.com> wrote:
>>>> 
>>>> You can have a look at Achilles, it's using the Java Driver underneath : https://github.com/doanduyhai/Achilles
>>>> 
>>>> Le 8 juin 2014 04:24, "Kevin Burton" <bu...@spinn3r.com> a écrit :
>>>> Looks like the java-driver is working on an object mapper:
>>>> 
>>>> "More modules including a simple object mapper will come shortly."
>>>> But of course I need one now … 
>>>> I'm curious what others are doing here.  
>>>> 
>>>> I don't want to pass around Row objects in my code if I can avoid it.. Ideally I would just run a query and get back a POJO.  
>>>> 
>>>> Another issue is how are these POJOs generated.  Are they generated from the schema?  is the schema generated from the POJOs ?  From a side file?  
>>>> 
>>>> And granted, there are existing ORMs out there but I don't think any support CQL.
>>>> 
>>>> -- 
>>>> 
>>>> Founder/CEO Spinn3r.com
>>>> Location: San Francisco, CA
>>>> Skype: burtonator
>>>> blog: http://burtonator.wordpress.com
>>>> … or check out my Google+ profile
>>>> 
>>>> War is peace. Freedom is slavery. Ignorance is strength. Corporations are people.
> 

Re: Object mapper for CQL

Posted by Colin <co...@gmail.com>.
I would check out spring Cassandra-most of the java drivers out there for Cassandra offer very little over the new 2. driver from Datastax.  Or just use the java driver 2. as is.

There's even a query builder light fluent DSL if you don't like cql.  Based upon your use case description so far, I don't think you need to get too funky with your data access layer.

Whatever you do, make sure the driver you use supports CQL 3 and the native protocol.  Thrift, like BOP, will most likely go away at some point in the future.
--
Colin
320-221-9531


> On Jun 8, 2014, at 8:58 PM, Johan Edstrom <se...@gmail.com> wrote:
> 
> Kevin, 
> 
> We are about to release 2.0 of https://github.com/savoirtech/hecate
> It is an ASL licensed library that started with Jeff Genender writing a Pojo
> library in Hector for a project we did for Ecuador (Essentially all of Ecuador uses this).
> I extended this with Pojo Graph stuff like Collections and Composite key indexing.
> 
> James Carman then took this a bit further in Cassidy with some new concepts.
> I then a while back decided to bite the bullet and my hatred of CQL and just write 
> the same thing, it started out with a very reflection and somewhat clunky interface, 
> James decided to re-write this and incorporate the learnings from Cassidy.
> 
> - Jeff, James and I all work together. This library is already in use and has been 
> in use under 30 mil account circumstances as well as quite decent loads.
> 
> What you see in trunk now under hecate-cql3 is what'll go out as 2.0, it is a new API, 
> we support "single" pojo and Object graph, column modifiers, indexer and everything
> else we could think of in a library that isn't ORM but maps data to C*.
> 
> What will be out in I think 2.0.2 is an external indexer very much like Titan and 
> possibly some more real graph (vertices) stuff. We are also looking at an SchemaIdentifier
> so that we can get back to working with dynamic columns at a decent conceptual speed :)
> 
> /je
> 
>> On Jun 8, 2014, at 2:46 AM, DuyHai Doan <do...@gmail.com> wrote:
>> 
>> You can have a look at Achilles, it's using the Java Driver underneath : https://github.com/doanduyhai/Achilles
>> 
>> Le 8 juin 2014 04:24, "Kevin Burton" <bu...@spinn3r.com> a écrit :
>> Looks like the java-driver is working on an object mapper:
>> 
>> "More modules including a simple object mapper will come shortly."
>> But of course I need one now … 
>> I'm curious what others are doing here.  
>> 
>> I don't want to pass around Row objects in my code if I can avoid it.. Ideally I would just run a query and get back a POJO.  
>> 
>> Another issue is how are these POJOs generated.  Are they generated from the schema?  is the schema generated from the POJOs ?  From a side file?  
>> 
>> And granted, there are existing ORMs out there but I don't think any support CQL.
>> 
>> -- 
>> 
>> Founder/CEO Spinn3r.com
>> Location: San Francisco, CA
>> Skype: burtonator
>> blog: http://burtonator.wordpress.com
>> … or check out my Google+ profile
>> 
>> War is peace. Freedom is slavery. Ignorance is strength. Corporations are people.
> 

Re: Object mapper for CQL

Posted by Johan Edstrom <se...@gmail.com>.
Kevin, 

We are about to release 2.0 of https://github.com/savoirtech/hecate
It is an ASL licensed library that started with Jeff Genender writing a Pojo
library in Hector for a project we did for Ecuador (Essentially all of Ecuador uses this).
I extended this with Pojo Graph stuff like Collections and Composite key indexing.

James Carman then took this a bit further in Cassidy with some new concepts.
I then a while back decided to bite the bullet and my hatred of CQL and just write 
the same thing, it started out with a very reflection and somewhat clunky interface, 
James decided to re-write this and incorporate the learnings from Cassidy.

- Jeff, James and I all work together. This library is already in use and has been 
in use under 30 mil account circumstances as well as quite decent loads.

What you see in trunk now under hecate-cql3 is what'll go out as 2.0, it is a new API, 
we support "single" pojo and Object graph, column modifiers, indexer and everything
else we could think of in a library that isn't ORM but maps data to C*.

What will be out in I think 2.0.2 is an external indexer very much like Titan and 
possibly some more real graph (vertices) stuff. We are also looking at an SchemaIdentifier
so that we can get back to working with dynamic columns at a decent conceptual speed :)

/je

On Jun 8, 2014, at 2:46 AM, DuyHai Doan <do...@gmail.com> wrote:

> You can have a look at Achilles, it's using the Java Driver underneath : https://github.com/doanduyhai/Achilles
> 
> Le 8 juin 2014 04:24, "Kevin Burton" <bu...@spinn3r.com> a écrit :
> Looks like the java-driver is working on an object mapper:
> 
> "More modules including a simple object mapper will come shortly."
> But of course I need one now … 
> I'm curious what others are doing here.  
> 
> I don't want to pass around Row objects in my code if I can avoid it.. Ideally I would just run a query and get back a POJO.  
> 
> Another issue is how are these POJOs generated.  Are they generated from the schema?  is the schema generated from the POJOs ?  From a side file?  
> 
> And granted, there are existing ORMs out there but I don't think any support CQL.
> 
> -- 
> 
> Founder/CEO Spinn3r.com
> Location: San Francisco, CA
> Skype: burtonator
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> 
> War is peace. Freedom is slavery. Ignorance is strength. Corporations are people.
> 


Re: Object mapper for CQL

Posted by DuyHai Doan <do...@gmail.com>.
You can have a look at Achilles, it's using the Java Driver underneath :
https://github.com/doanduyhai/Achilles
Le 8 juin 2014 04:24, "Kevin Burton" <bu...@spinn3r.com> a écrit :

> Looks like the java-driver is working on an object mapper:
>
> "More modules including a simple object mapper will come shortly."
> But of course I need one now …
> I'm curious what others are doing here.
>
> I don't want to pass around Row objects in my code if I can avoid it..
> Ideally I would just run a query and get back a POJO.
>
> Another issue is how are these POJOs generated.  Are they generated from
> the schema?  is the schema generated from the POJOs ?  From a side file?
>
> And granted, there are existing ORMs out there but I don't think any
> support CQL.
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> Skype: *burtonator*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
> War is peace. Freedom is slavery. Ignorance is strength. Corporations are
> people.
>
>

Re: Object mapper for CQL

Posted by Kuldeep Mishra <ku...@gmail.com>.
There is one High Level Java client for Cassandra which supports CQL is
Kundera.
You can find it here https://github.com/impetus-opensource/Kundera.

Other useful links are
https://github.com/impetus-opensource/Kundera/wiki/Getting-Started-in-5-minutes
https://github.com/impetus-opensource/Kundera/wiki/Object-mapper

How to use CQL
https://github.com/impetus-opensource/Kundera/wiki/Cassandra-Specific-Features

I hope it would help you.





On Sun, Jun 8, 2014 at 7:53 AM, Kevin Burton <bu...@spinn3r.com> wrote:

> Looks like the java-driver is working on an object mapper:
>
> "More modules including a simple object mapper will come shortly."
> But of course I need one now …
> I'm curious what others are doing here.
>
> I don't want to pass around Row objects in my code if I can avoid it..
> Ideally I would just run a query and get back a POJO.
>
> Another issue is how are these POJOs generated.  Are they generated from
> the schema?  is the schema generated from the POJOs ?  From a side file?
>
> And granted, there are existing ORMs out there but I don't think any
> support CQL.
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> Skype: *burtonator*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
> War is peace. Freedom is slavery. Ignorance is strength. Corporations are
> people.
>
>


-- 
Thanks and Regards
Kuldeep Kumar Mishra
+919540965199