Re: ORM in Cassandra?

2010-04-26 Thread Paul Bohm
I call tragedy a 'Cassandra Object Abstraction' (COA), because I try
write a reusable implementation of patterns that are commonly used for
cassandra data modeling. E.g. using TimeUUID columns for storing an
Index is a pattern. Then various strategies to partition these Indexes
are another pattern.

I'm hoping that after some iteration a good mix of high-level
abstractions that can be reused for all kinds of apps will emerge. It
feels ambitious to me to try to implement cross-nosql-store
abstractions before these patterns and best practices have been
documented and battle-proven. On that note, if such documentation does
exist, or you know cool patterns, i'd love to hear about them!

Paul

On Mon, Apr 26, 2010 at 10:46 AM, banks  wrote:
> The real tragedy is that we have not created a new acronym for this yet...
>
> OKVM... it makes more sense...
>
>
> On Mon, Apr 26, 2010 at 10:35 AM, Ethan Rowe  wrote:
>>
>> On 04/26/2010 01:26 PM, Isaac Arias wrote:
>>>
>>> On Apr 26, 2010, at 12:13 PM, Geoffry Roberts wrote:
>>>
>>>

 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.

>>>
>>> I agree with eliminating boilerplate code. Chris Shorrock wrote a
>>> simple object mapper in Scala for his Cascal Cassandra client. You may
>>> want to check out the wiki on GitHub
>>> (http://wiki.github.com/shorrockin/cascal/).
>>>
>>> In my opinion, a mapping solution for Cassandra should be more like a
>>> Template. Something that helps map (back and forth) rows to objects,
>>> columns to properties, etc. Since the data model can vary so much
>>> depending on data access patters, any overly structured approach that
>>> prescribes a particular schema will be of limited use.
>>>
>>
>> For what it's worth, this is exactly my opinion after looking at the
>> problem for a bit, and I'm actively developing such a solution in Ruby.  I
>> spent some time playing with the CassandraObject project, but felt that
>> despite all the good work that went in there, it didn't feel to me like it
>> fit the problem space in an idiomatic manner.  No criticism intended there;
>> it seems to lean a little more towards a very structured schema, with less
>> flexibility for things like collection attributes the members of which all
>> have a key that matches a pattern (which is a use case we have).
>>
>> So, for my approach, there's one project that gives metaprogramming
>> semantics for building the mapping behavior you describe: build classes that
>> are oriented towards mapping between simple JSON-like structures and
>> full-blown business objects.  And a separate project that layers Cassandra
>> specifics on top of that underlying mapper tool.
>>
>> The rub being: it's for a client, and we're collectively sorting out the
>> details for releasing the code in some useful, public manner.  But hopefully
>> I'll get something useful out there for potential Ruby enthusiasts before
>> too long.  Hopefully a week or two.
>>
>> Thanks.
>> - Ethan
>>
>> --
>> Ethan Rowe
>> End Point Corporation
>> et...@endpoint.com
>>
>
>


Re: ORM in Cassandra?

2010-04-26 Thread Ethan Rowe

On 04/26/2010 03:11 PM, Tatu Saloranta wrote:

On Mon, Apr 26, 2010 at 10:35 AM, Ethan Rowe  wrote:


On 04/26/2010 01:26 PM, Isaac Arias wrote:


On Apr 26, 2010, at 12:13 PM, Geoffry Roberts wrote:



...


In my opinion, a mapping solution for Cassandra should be more like a
Template. Something that helps map (back and forth) rows to objects,
columns to properties, etc. Since the data model can vary so much
depending on data access patters, any overly structured approach that
prescribes a particular schema will be of limited use.



For what it's worth, this is exactly my opinion after looking at the problem
for a bit, and I'm actively developing such a solution in Ruby.  I spent


...


So, for my approach, there's one project that gives metaprogramming
semantics for building the mapping behavior you describe: build classes that
are oriented towards mapping between simple JSON-like structures and
full-blown business objects.  And a separate project that layers Cassandra
specifics on top of that underlying mapper tool.


+1

I think proper layering is the way to go: it makes problem (of simple
construction of services that use Cassandra as the storage system)
much easier to solve, divide and conquer. There are pretty decent
OJM/OXM solutions that are mostly orthogonal wrt distributed storage
part. I understand that there are some trade-offs (some things are
easiest to optimize when Cassandra core handles them), but flexibility
and best-tool-for-the-job have their benefits too.



Right.  Additionally, this mapping layer between "simple" (i.e. 
JSON-ready) structures and "complex" (i.e. business objects) would seem 
to be of much more general value than a Cassandra-specific mapper.  I 
would think most any environment with a heavy reliance on Thrift 
services would benefit from such tools.


--
Ethan Rowe
End Point Corporation
et...@endpoint.com



Re: ORM in Cassandra?

2010-04-26 Thread Tatu Saloranta
On Mon, Apr 26, 2010 at 10:35 AM, Ethan Rowe  wrote:
> On 04/26/2010 01:26 PM, Isaac Arias wrote:
>>
>> On Apr 26, 2010, at 12:13 PM, Geoffry Roberts wrote:
>>
...
>> In my opinion, a mapping solution for Cassandra should be more like a
>> Template. Something that helps map (back and forth) rows to objects,
>> columns to properties, etc. Since the data model can vary so much
>> depending on data access patters, any overly structured approach that
>> prescribes a particular schema will be of limited use.
>>
> For what it's worth, this is exactly my opinion after looking at the problem
> for a bit, and I'm actively developing such a solution in Ruby.  I spent
...
> So, for my approach, there's one project that gives metaprogramming
> semantics for building the mapping behavior you describe: build classes that
> are oriented towards mapping between simple JSON-like structures and
> full-blown business objects.  And a separate project that layers Cassandra
> specifics on top of that underlying mapper tool.

+1

I think proper layering is the way to go: it makes problem (of simple
construction of services that use Cassandra as the storage system)
much easier to solve, divide and conquer. There are pretty decent
OJM/OXM solutions that are mostly orthogonal wrt distributed storage
part. I understand that there are some trade-offs (some things are
easiest to optimize when Cassandra core handles them), but flexibility
and best-tool-for-the-job have their benefits too.

-+ Tatu +-


Re: ORM in Cassandra?

2010-04-26 Thread banks
The real tragedy is that we have not created a new acronym for this yet...

OKVM... it makes more sense...


On Mon, Apr 26, 2010 at 10:35 AM, Ethan Rowe  wrote:

> On 04/26/2010 01:26 PM, Isaac Arias wrote:
>
>> On Apr 26, 2010, at 12:13 PM, Geoffry Roberts wrote:
>>
>>
>>
>>> 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.
>>>
>>>
>> I agree with eliminating boilerplate code. Chris Shorrock wrote a
>> simple object mapper in Scala for his Cascal Cassandra client. You may
>> want to check out the wiki on GitHub
>> (http://wiki.github.com/shorrockin/cascal/).
>>
>> In my opinion, a mapping solution for Cassandra should be more like a
>> Template. Something that helps map (back and forth) rows to objects,
>> columns to properties, etc. Since the data model can vary so much
>> depending on data access patters, any overly structured approach that
>> prescribes a particular schema will be of limited use.
>>
>>
>
> For what it's worth, this is exactly my opinion after looking at the
> problem for a bit, and I'm actively developing such a solution in Ruby.  I
> spent some time playing with the CassandraObject project, but felt that
> despite all the good work that went in there, it didn't feel to me like it
> fit the problem space in an idiomatic manner.  No criticism intended there;
> it seems to lean a little more towards a very structured schema, with less
> flexibility for things like collection attributes the members of which all
> have a key that matches a pattern (which is a use case we have).
>
> So, for my approach, there's one project that gives metaprogramming
> semantics for building the mapping behavior you describe: build classes that
> are oriented towards mapping between simple JSON-like structures and
> full-blown business objects.  And a separate project that layers Cassandra
> specifics on top of that underlying mapper tool.
>
> The rub being: it's for a client, and we're collectively sorting out the
> details for releasing the code in some useful, public manner.  But hopefully
> I'll get something useful out there for potential Ruby enthusiasts before
> too long.  Hopefully a week or two.
>
> Thanks.
> - Ethan
>
> --
> Ethan Rowe
> End Point Corporation
> et...@endpoint.com
>
>


Re: ORM in Cassandra?

2010-04-26 Thread Ethan Rowe

On 04/26/2010 01:26 PM, Isaac Arias wrote:

On Apr 26, 2010, at 12:13 PM, Geoffry Roberts wrote:

   

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.
 

I agree with eliminating boilerplate code. Chris Shorrock wrote a
simple object mapper in Scala for his Cascal Cassandra client. You may
want to check out the wiki on GitHub
(http://wiki.github.com/shorrockin/cascal/).

In my opinion, a mapping solution for Cassandra should be more like a
Template. Something that helps map (back and forth) rows to objects,
columns to properties, etc. Since the data model can vary so much
depending on data access patters, any overly structured approach that
prescribes a particular schema will be of limited use.
   


For what it's worth, this is exactly my opinion after looking at the 
problem for a bit, and I'm actively developing such a solution in Ruby.  
I spent some time playing with the CassandraObject project, but felt 
that despite all the good work that went in there, it didn't feel to me 
like it fit the problem space in an idiomatic manner.  No criticism 
intended there; it seems to lean a little more towards a very structured 
schema, with less flexibility for things like collection attributes the 
members of which all have a key that matches a pattern (which is a use 
case we have).


So, for my approach, there's one project that gives metaprogramming 
semantics for building the mapping behavior you describe: build classes 
that are oriented towards mapping between simple JSON-like structures 
and full-blown business objects.  And a separate project that layers 
Cassandra specifics on top of that underlying mapper tool.


The rub being: it's for a client, and we're collectively sorting out the 
details for releasing the code in some useful, public manner.  But 
hopefully I'll get something useful out there for potential Ruby 
enthusiasts before too long.  Hopefully a week or two.


Thanks.
- Ethan

--
Ethan Rowe
End Point Corporation
et...@endpoint.com



Re: ORM in Cassandra?

2010-04-26 Thread Jeff Hodges
There is, of course, also cassandra_object on the ruby side. I assume
this thread has the implicit requirement of Java, though.
--
Jeff

On Mon, Apr 26, 2010 at 10:26 AM, Isaac Arias  wrote:
> On Apr 26, 2010, at 12:13 PM, Geoffry Roberts wrote:
>
>> 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.
>
> I agree with eliminating boilerplate code. Chris Shorrock wrote a
> simple object mapper in Scala for his Cascal Cassandra client. You may
> want to check out the wiki on GitHub
> (http://wiki.github.com/shorrockin/cascal/).
>
> In my opinion, a mapping solution for Cassandra should be more like a
> Template. Something that helps map (back and forth) rows to objects,
> columns to properties, etc. Since the data model can vary so much
> depending on data access patters, any overly structured approach that
> prescribes a particular schema will be of limited use.
>
> If you're from the Java world, think of iBATIS vs. Hibernate.
>
>
>>
>> On Mon, Apr 26, 2010 at 9:00 AM, Ned Wolpert =
>  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.
>>=20
>>=20
>> On Fri, Apr 23, 2010 at 8:00 PM, aXqd  wrote:
>> On Sat, Apr 24, 2010 at 1:36 AM, Ned Wolpert =
>  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.
>>=20
>> 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.
>>=20
>> Is this the right way to go? Or what I am doing is still trying to
>> convert Cassandra to a RDBMS?
>>=20
>> >
>> > On Fri, Apr 23, 2010 at 1:29 AM, aXqd  wrote:
>> >>
>> >> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud =
> 
>> >> 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 =3D {"name", "label", ...}
>> >> > List columns;
>> >> > for (String field : myFields) {
>> >> >    if (field =3D=3D "name") {
>> >> >       columns.add(new Column(field, data.getName()))
>> >> >    } else if (field =3D=3D "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 :
>> >> >>>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 corr

Re: ORM in Cassandra?

2010-04-26 Thread Isaac Arias
On Apr 26, 2010, at 12:13 PM, Geoffry Roberts wrote:

> 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.

I agree with eliminating boilerplate code. Chris Shorrock wrote a
simple object mapper in Scala for his Cascal Cassandra client. You may
want to check out the wiki on GitHub
(http://wiki.github.com/shorrockin/cascal/).

In my opinion, a mapping solution for Cassandra should be more like a
Template. Something that helps map (back and forth) rows to objects,
columns to properties, etc. Since the data model can vary so much
depending on data access patters, any overly structured approach that
prescribes a particular schema will be of limited use.

If you're from the Java world, think of iBATIS vs. Hibernate.


>
> On Mon, Apr 26, 2010 at 9:00 AM, Ned Wolpert =
 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.
>=20
>=20
> On Fri, Apr 23, 2010 at 8:00 PM, aXqd  wrote:
> On Sat, Apr 24, 2010 at 1:36 AM, Ned Wolpert =
 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.
>=20
> 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.
>=20
> Is this the right way to go? Or what I am doing is still trying to
> convert Cassandra to a RDBMS?
>=20
> >
> > On Fri, Apr 23, 2010 at 1:29 AM, aXqd  wrote:
> >>
> >> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud =

> >> 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 =3D {"name", "label", ...}
> >> > List columns;
> >> > for (String field : myFields) {
> >> >if (field =3D=3D "name") {
> >> >   columns.add(new Column(field, data.getName()))
> >> >} else if (field =3D=3D "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 :
> >> >>>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  =
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.
>

Re: ORM in Cassandra?

2010-04-26 Thread Geoffry Roberts
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 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  wrote:
>
>> On Sat, Apr 24, 2010 at 1:36 AM, Ned Wolpert 
>> 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  wrote:
>> >>
>> >> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud 
>> >> 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 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 :
>> >> >>>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  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
>


Re: ORM in Cassandra?

2010-04-26 Thread Ned Wolpert
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  wrote:

> On Sat, Apr 24, 2010 at 1:36 AM, Ned Wolpert 
> 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  wrote:
> >>
> >> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud 
> >> 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 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 :
> >> >>>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  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


Re: ORM in Cassandra?

2010-04-26 Thread Geoffry Roberts
I am going to agree with axQd. Having something that does for Cassandra what
say, Hibernate does for RDBMS seems an effort well worth pursuing.  I have
some complex object graphs written in Java.  If I could annotate them and
get persistence with a well laid out schema. It would be good.

On Mon, Apr 26, 2010 at 8:21 AM, Schubert Zhang  wrote:

> I think you should forget these RDBMS tech.
>
>
>
> On Sat, Apr 24, 2010 at 11:00 AM, aXqd  wrote:
>
>> On Sat, Apr 24, 2010 at 1:36 AM, Ned Wolpert 
>> 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  wrote:
>> >>
>> >> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud 
>> >> 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 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 :
>> >> >>>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  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
>> >
>>
>
>


Re: ORM in Cassandra?

2010-04-26 Thread Schubert Zhang
I think you should forget these RDBMS tech.


On Sat, Apr 24, 2010 at 11:00 AM, aXqd  wrote:

> On Sat, Apr 24, 2010 at 1:36 AM, Ned Wolpert 
> 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  wrote:
> >>
> >> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud 
> >> 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 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 :
> >> >>>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  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
> >
>


Re: ORM in Cassandra?

2010-04-23 Thread aXqd
On Sat, Apr 24, 2010 at 1:36 AM, Ned Wolpert  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  wrote:
>>
>> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud 
>> 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 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 :
>> >>>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  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
>


Re: ORM in Cassandra?

2010-04-23 Thread Ned Wolpert
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.

On Fri, Apr 23, 2010 at 1:29 AM, aXqd  wrote:

> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud 
> 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 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 :
> >>>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  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


Re: ORM in Cassandra?

2010-04-23 Thread aXqd
On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud  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 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 :
>>>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  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
>>
>>
>


Re: ORM in Cassandra?

2010-04-23 Thread aXqd
On Fri, Apr 23, 2010 at 1:25 PM, Jeremy Dunck  wrote:
> See what you think of tragedy:
> http://github.com/enki/tragedy

This one is feasible. I love the idea of 'Build your data model from
Model and Index'. Even better, I am INDEED working with python and
those indexes can be deferred to be resolved. Thanks.

>
>
> On Fri, Apr 23, 2010 at 12:12 AM, aXqd  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
>>
>


Re: ORM in Cassandra?

2010-04-23 Thread Benoit Perroud
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 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).

Kind regards,

Benoit.

2010/4/23 dir dir :
>>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.
>
> On Fri, Apr 23, 2010 at 12:12 PM, aXqd  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
>
>


Re: ORM in Cassandra?

2010-04-22 Thread dir dir
>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.

On Fri, Apr 23, 2010 at 12:12 PM, aXqd  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
>


Re: ORM in Cassandra?

2010-04-22 Thread Michael Pearson
For PHP there's Pandra http://github.com/mjpearson/Pandra . As much as
I dislike PHP and ORM's generally (ironic, yes) PHP's array/iterator
interfaces make building a domain model ontop of Cassandra a fairly
intuitive process.

-michael

On Fri, Apr 23, 2010 at 3:12 PM, aXqd  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
>


Re: ORM in Cassandra?

2010-04-22 Thread Jeremy Dunck
See what you think of tragedy:
http://github.com/enki/tragedy


On Fri, Apr 23, 2010 at 12:12 AM, aXqd  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
>


ORM in Cassandra?

2010-04-22 Thread aXqd
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