cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffry Roberts <geoffry.robe...@gmail.com>
Subject Re: ORM in Cassandra?
Date Mon, 26 Apr 2010 16:13:41 GMT
Clearly Cassandra is not an RDBMS.  The intent of my Hibernate reference was
to be more lyrical.  Sorry if that didn't come through.

Nonetheless, the need remains to relieve ourselves from excessive
boilerplate coding.

On Mon, Apr 26, 2010 at 9:00 AM, Ned Wolpert <ned.wolpert@imemories.com>wrote:

> I don't think you are trying to convert Cassandra to a RDBMS with what you
> want. The issue is that finding a way to map these objects to Cassandra in a
> meaningful way is hard. Its not as easy as saying 'do what hibernate does'
> simply because its not an RDBMS...but it is a reasonable and useful goal.
> I'm trying to accomplish this myself with the grails Cassandra plugin.
>
>
> On Fri, Apr 23, 2010 at 8:00 PM, aXqd <axqd001@gmail.com> wrote:
>
>> On Sat, Apr 24, 2010 at 1:36 AM, Ned Wolpert <ned.wolpert@imemories.com>
>> wrote:
>> > There is nothing wrong with what you are asking. Some work has been done
>> to
>> > get an ORM layer ontop of cassandra, for example, with a RubyOnRails
>> > project. I'm trying to simplify cassandra integration with grails with
>> the
>> > plugin I'm writing.
>> > The problem is ORM solutions to date are wrapping a relational database.
>> > (The 'R' in ORM) Cassandra isn't a relational database so it does not
>> map
>> > cleanly.
>>
>> Thanks. I noticed this problem before. I just want to know, in the
>> first place, what exactly is the right way to model relations in
>> Cassandra(a no-relational database).
>> So far, I still have those entities, and, without foreign keys, I use
>> relational entities, which contains the IDs of both sides of
>> relations.
>> In some other cases, I just duplicate data, and maintain the relations
>> manually by updating all the data in the same time.
>>
>> Is this the right way to go? Or what I am doing is still trying to
>> convert Cassandra to a RDBMS?
>>
>> >
>> > On Fri, Apr 23, 2010 at 1:29 AM, aXqd <axqd001@gmail.com> wrote:
>> >>
>> >> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud <benoit@noisette.ch>
>> >> wrote:
>> >> > I understand the question more like : Is there already a lib which
>> >> > help to get rid of writing hardcoded and hard to maintain lines like
>> :
>> >> >
>> >> > MyClass data;
>> >> > String[] myFields = {"name", "label", ...}
>> >> > List<Column> columns;
>> >> > for (String field : myFields) {
>> >> >    if (field == "name") {
>> >> >       columns.add(new Column(field, data.getName()))
>> >> >    } else if (field == "label") {
>> >> >      columns.add(new Column(field, data.getLabel()))
>> >> >    } else ...
>> >> > }
>> >> > (same for loading (instanciating) automagically the object).
>> >>
>> >> Yes, I am talking about this question.
>> >>
>> >> >
>> >> > Kind regards,
>> >> >
>> >> > Benoit.
>> >> >
>> >> > 2010/4/23 dir dir <sikerasakti@gmail.com>:
>> >> >>>So maybe it's weird to combine ORM and Cassandra, right? Is
there
>> >> >>>anything we can take from ORM?
>> >> >>
>> >> >> Honestly I do not understand what is your question. It is clear
that
>> >> >> you can not combine ORM such as Hibernate or iBATIS with Cassandra.
>> >> >> Cassandra it self is not a RDBMS, so you will not map the table
into
>> >> >> the object.
>> >> >>
>> >> >> Dir.
>> >>
>> >> Sorry, English is not my mother tongue.
>> >>
>> >> I do understand I cannot combine ORM with Cassandra, because they are
>> >> totally different ways for building our data model. But I think there
>> >> are still something can be learnt from ORM to make Cassandra easier to
>> >> use, just as what ORM did to RDBMS before.
>> >>
>> >> IMHO, domain model is still intact when we design our software, hence
>> >> we need another way to map them to Cassandra's entity model. Relation
>> >> does not just go away in this case, hence we need another way to
>> >> express those relations and have a tool to set up Keyspace /
>> >> ColumnFamily automatically as what django's SYNCDB does.
>> >>
>> >> According to my limited experience with Cassandra, now, we do more
>> >> when we write, and less when we read/query. Hence I think the problem
>> >> lies exactly in how we duplicate our data to do queries.
>> >>
>> >> Please correct me if I got these all wrong.
>> >>
>> >> >>
>> >> >> On Fri, Apr 23, 2010 at 12:12 PM, aXqd <axqd001@gmail.com>
wrote:
>> >> >>>
>> >> >>> Hi, all:
>> >> >>>
>> >> >>> I know many people regard O/R Mapping as rubbish. However it
is
>> >> >>> undeniable that ORM is quite easy to use in most simple cases,
>> >> >>> Meanwhile Cassandra is well known as No-SQL solution, a.k.a.
>> >> >>> No-Relational solution.
>> >> >>> So maybe it's weird to combine ORM and Cassandra, right? Is
there
>> >> >>> anything we can take from ORM?
>> >> >>> I just hate to write CRUD functions/Data layer for each object
in
>> even
>> >> >>> a disposable prototype program.
>> >> >>>
>> >> >>> Regards.
>> >> >>> -Tian
>> >> >>
>> >> >>
>> >> >
>> >
>> >
>> >
>> > --
>> > Virtually, Ned Wolpert
>> >
>> > "Settle thy studies, Faustus, and begin..."   --Marlowe
>> >
>>
>
>
>
> --
> Virtually, Ned Wolpert
>
> "Settle thy studies, Faustus, and begin..."   --Marlowe
>

Mime
View raw message