You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Daniel Colchete <da...@cloud3.tc> on 2011/06/18 00:02:32 UTC

Cassandra Clients for Java

Good day everyone!

I'm getting started with a new project and I'm thinking about using
Cassandra because of its distributed quality and because of its performance.

I'm using Java on the back-end. There are many many things being said about
the Java high level clients for Cassandra on the web. To be frank, I see
problems with all of the java clients. For example, Hector and Scale7-pelops
have new semantics on them that are neither Java's or Cassandra's, and I
don't see much gain from it apart from the fact that it is more complex.
Also, I was hoping to go with something that was annotation based so that it
wouldn't be necessary to write boilerplate code (again, no gain).

Demoiselle Cassandra seems to be one option but I couldn't find a download
for it. I'm new to Java in the back-end and I find that maven is too much to
learn just because of a client library. Also it seems to be hard to
integrate with the other things I use on my project (GWT, GWT-platform,
Google Eclipse Plugin).

Kundera looks great but besides not having a download link (Google site link
to Github, that links to Google site, but no download) its information is
partitioned on many blog posts, some of them saying things I couldn't find
on its website. One says it uses Lucandra for indexes but that is the only
place talking about it, no documentation about using it. It doesn't seem to
support Cassandra 0.8 also. Does it?

I would like to hear from the users here what worked for you guys. Some real
world project in production that was good to write in Java, where the client
was stable and is maintained. What are the success stories of using
Cassandra with Java. What would you recommend?

Thank you very much!

Best,
-- 
Dani
Cloud3 Tech - http://cloud3.tc/
Twitter: @DaniCloud3 @Cloud3Tech

Re: Cassandra Clients for Java

Posted by Dan Retzlaff <dr...@gmail.com>.
That's pretty awesome! Apologies for my misleading statement about
marshaling support. I clearly haven't been keeping up. :)

On Fri, Jun 17, 2011 at 8:13 PM, Dan Washusen <da...@reactive.org> wrote:

>
> Also, a quick look at the Hector wiki suggests that they have some form of
> annotation support (
> https://github.com/rantav/hector/wiki/Using-the-EntityManager).
>

Re: Cassandra Clients for Java

Posted by Damien Picard <pi...@gmail.com>.
Hi,

I use Cassandra with Pelops on a GWT/Java project. You are right in the fact
that you have to write boiler plate code : threre is no driver to use Pelops
or Cassandra with GWT's RequestFactory.
But, in my case I use standards GWT-RPC as services, and the DTOs are
persisted onto Cassandra with Pelops (furthermore, my application needs some
server push and RequestFactory can not provide that).

All my project is build under Maven and there is no issue to use Cassandra,
Pelops and GWT together., quite the contrary !

Hope this could help you.

2011/6/18 Jeffrey Kesselman <je...@gmail.com>

> If by this you are obliquely referring to JDBC, I understand there is
> a CQL JDBC driver  under development....
>
> > new semantics on them that are neither Java's or Cassandra's, and I
> >
>
> Obviously thats going to support CQL, not SQL like existing JDBC drivers.
>



-- 
Damien Picard
Axeiya Services : http://axeiya.com/
gwt-ckeditor : http://code.google.com/p/gwt-ckeditor/
Mon livre sur GWT : http://axeiya.com/index.php/ouvrage-gwt.html

Re: Cassandra Clients for Java

Posted by Jeffrey Kesselman <je...@gmail.com>.
If by this you are obliquely referring to JDBC, I understand there is
a CQL JDBC driver  under development....

> new semantics on them that are neither Java's or Cassandra's, and I
>

Obviously thats going to support CQL, not SQL like existing JDBC drivers.

Re: Cassandra Clients for Java

Posted by Dan Washusen <da...@reactive.org>.
I've added some comments/questions inline...

Cheers,
-- 
Dan Washusen

On Saturday, 18 June 2011 at 8:02 AM, Daniel Colchete wrote:

> Good day everyone!
> 
> I'm getting started with a new project and I'm thinking about using Cassandra because of its distributed quality and because of its performance.
> 
> I'm using Java on the back-end. There are many many things being said about the Java high level clients for Cassandra on the web. To be frank, I see problems with all of the java clients. For example, Hector and Scale7-pelops have new semantics on them that are neither Java's or Cassandra's, and I don't see much gain from it apart from the fact that it is more complex. Also, I was hoping to go with something that was annotation based so that it wouldn't be necessary to write boilerplate code (again, no gain). 
I'm interested in hearing more on your comment regarding Hector and Pelops adding little but complexity; could you add a little context to the comment? If you're coming from an ORM framework like Hibernate then doing simple tasks may seem cumbersome. However, once you've wrapped your head around Cassandra's read and write concepts both Hector and Pelops seem relatively straight forward (to me)...?

Also, a quick look at the Hector wiki suggests that they have some form of annotation support (https://github.com/rantav/hector/wiki/Using-the-EntityManager).
> 
> Demoiselle Cassandra seems to be one option but I couldn't find a download for it. I'm new to Java in the back-end and I find that maven is too much to learn just because of a client library. Also it seems to be hard to integrate with the other things I use on my project (GWT, GWT-platform, Google Eclipse Plugin). 
> 
> Kundera looks great but besides not having a download link (Google site link to Github, that links to Google site, but no download) its information is partitioned on many blog posts, some of them saying things I couldn't find on its website. One says it uses Lucandra for indexes but that is the only place talking about it, no documentation about using it. It doesn't seem to support Cassandra 0.8 also. Does it?
It's my understand that Lucandra has been superseded by Solandra (https://github.com/tjake/Solandra).
> 
> I would like to hear from the users here what worked for you guys. Some real world project in production that was good to write in Java, where the client was stable and is maintained. What are the success stories of using Cassandra with Java. What would you recommend?
Pelops is used successfully on (at least) fightmymonster.com and digitalpigeon.com. Pelops is actively developed and maintained by those two companies + contributors and Hector looks like it's backed by Datastax, which would seem to be a pretty compelling sell point. 
> 
> Thank you very much!
> 
> Best,
> -- 
> Dani
> Cloud3 Tech - http://cloud3.tc/ 
> Twitter: @DaniCloud3 @Cloud3Tech


Re: Cassandra Clients for Java

Posted by Dan Retzlaff <dr...@gmail.com>.
My team prefers Pelops. https://github.com/s7/scale7-pelops

It's had failover since 0.7.
http://groups.google.com/group/scale7/browse_thread/thread/19d441b7cd000de0/624257fe4f94a037

With respect to avoiding writing marshaling code yourself, I agree with the
OP that that is rather lacking with these libraries themselves. DataNucleus
was recommended to me as a framework with the right abstractions to use
Cassandra as a JPA persistence provider, but I haven't had the time to
investigate.

Dan

On Fri, Jun 17, 2011 at 3:18 PM, Jeffrey Kesselman <je...@gmail.com> wrote:

> I'm using Hector.  AFAIK its the only one that supports failover today.
>
> On Fri, Jun 17, 2011 at 6:02 PM, Daniel Colchete <da...@cloud3.tc> wrote:
> > Good day everyone!
> > I'm getting started with a new project and I'm thinking about using
> > Cassandra because of its distributed quality and because of its
> performance.
> > I'm using Java on the back-end. There are many many things being said
> about
> > the Java high level clients for Cassandra on the web. To be frank, I see
> > problems with all of the java clients. For example, Hector and
> Scale7-pelops
> > have new semantics on them that are neither Java's or Cassandra's, and I
> > don't see much gain from it apart from the fact that it is more complex.
> > Also, I was hoping to go with something that was annotation based so that
> it
> > wouldn't be necessary to write boilerplate code (again, no gain).
> > Demoiselle Cassandra seems to be one option but I couldn't find a
> download
> > for it. I'm new to Java in the back-end and I find that maven is too much
> to
> > learn just because of a client library. Also it seems to be hard to
> > integrate with the other things I use on my project (GWT, GWT-platform,
> > Google Eclipse Plugin).
> > Kundera looks great but besides not having a download link (Google site
> link
> > to Github, that links to Google site, but no download) its information is
> > partitioned on many blog posts, some of them saying things I couldn't
> find
> > on its website. One says it uses Lucandra for indexes but that is the
> only
> > place talking about it, no documentation about using it. It doesn't seem
> to
> > support Cassandra 0.8 also. Does it?
> > I would like to hear from the users here what worked for you guys. Some
> real
> > world project in production that was good to write in Java, where the
> client
> > was stable and is maintained. What are the success stories of using
> > Cassandra with Java. What would you recommend?
> > Thank you very much!
> > Best,
> > --
> > Dani
> > Cloud3 Tech - http://cloud3.tc/
> > Twitter: @DaniCloud3 @Cloud3Tech
> >
>
>
>
> --
> It's always darkest just before you are eaten by a grue.
>

Re: Cassandra Clients for Java

Posted by Jeffrey Kesselman <je...@gmail.com>.
I'm using Hector.  AFAIK its the only one that supports failover today.

On Fri, Jun 17, 2011 at 6:02 PM, Daniel Colchete <da...@cloud3.tc> wrote:
> Good day everyone!
> I'm getting started with a new project and I'm thinking about using
> Cassandra because of its distributed quality and because of its performance.
> I'm using Java on the back-end. There are many many things being said about
> the Java high level clients for Cassandra on the web. To be frank, I see
> problems with all of the java clients. For example, Hector and Scale7-pelops
> have new semantics on them that are neither Java's or Cassandra's, and I
> don't see much gain from it apart from the fact that it is more complex.
> Also, I was hoping to go with something that was annotation based so that it
> wouldn't be necessary to write boilerplate code (again, no gain).
> Demoiselle Cassandra seems to be one option but I couldn't find a download
> for it. I'm new to Java in the back-end and I find that maven is too much to
> learn just because of a client library. Also it seems to be hard to
> integrate with the other things I use on my project (GWT, GWT-platform,
> Google Eclipse Plugin).
> Kundera looks great but besides not having a download link (Google site link
> to Github, that links to Google site, but no download) its information is
> partitioned on many blog posts, some of them saying things I couldn't find
> on its website. One says it uses Lucandra for indexes but that is the only
> place talking about it, no documentation about using it. It doesn't seem to
> support Cassandra 0.8 also. Does it?
> I would like to hear from the users here what worked for you guys. Some real
> world project in production that was good to write in Java, where the client
> was stable and is maintained. What are the success stories of using
> Cassandra with Java. What would you recommend?
> Thank you very much!
> Best,
> --
> Dani
> Cloud3 Tech - http://cloud3.tc/
> Twitter: @DaniCloud3 @Cloud3Tech
>



-- 
It's always darkest just before you are eaten by a grue.

Re: Cassandra Clients for Java

Posted by Chirag Patel <ch...@gmail.com>.
+2 Hector..

We have been using Hector 0.7 for a while now..have not had any issues with it so far...also hector community is very active...

We have not tried new API yet..

Sent from my iPhone

On Jun 18, 2011, at 3:04 PM, Rajesh Koilpillai <ra...@gmail.com> wrote:

> +1 to Hector (especially with the changes made in the latest version of their API)
> 
> On Sun, Jun 19, 2011 at 12:01 AM, Steve Willcox <sw...@rallydev.com> wrote:
> I'm using Hector. 
> 
> The main contributor Nate McCall is very active and responsive to any issues. The Hector community is very active.
> 
>  I've been using Java for a long time and I disagree that the client is more complex than the underlying Thrift client. The latest version of Hector has made large gains in simplifying the API. It has connection caching, load balancing and failover build into its client. 
> 
> I found it easy to use and stable. My code has been in production since April 2011 and we've not had one Hector issue yet.
> 
> Hope that helps
> 
> Steve W.
> 
> On Fri, Jun 17, 2011 at 4:02 PM, Daniel Colchete <da...@cloud3.tc> wrote:
> Good day everyone!
> 
> I'm getting started with a new project and I'm thinking about using Cassandra because of its distributed quality and because of its performance.
> 
> I'm using Java on the back-end. There are many many things being said about the Java high level clients for Cassandra on the web. To be frank, I see problems with all of the java clients. For example, Hector and Scale7-pelops have new semantics on them that are neither Java's or Cassandra's, and I don't see much gain from it apart from the fact that it is more complex. Also, I was hoping to go with something that was annotation based so that it wouldn't be necessary to write boilerplate code (again, no gain). 
> 
> Demoiselle Cassandra seems to be one option but I couldn't find a download for it. I'm new to Java in the back-end and I find that maven is too much to learn just because of a client library. Also it seems to be hard to integrate with the other things I use on my project (GWT, GWT-platform, Google Eclipse Plugin).
> 
> Kundera looks great but besides not having a download link (Google site link to Github, that links to Google site, but no download) its information is partitioned on many blog posts, some of them saying things I couldn't find on its website. One says it uses Lucandra for indexes but that is the only place talking about it, no documentation about using it. It doesn't seem to support Cassandra 0.8 also. Does it?
> 
> I would like to hear from the users here what worked for you guys. Some real world project in production that was good to write in Java, where the client was stable and is maintained. What are the success stories of using Cassandra with Java. What would you recommend?
> 
> Thank you very much!
> 
> Best,
> -- 
> Dani
> Cloud3 Tech - http://cloud3.tc/ 
> Twitter: @DaniCloud3 @Cloud3Tech
> 
> 
> 
> 
> -- 
> Thanks,
> - Rajesh Koilpillai

Re: Cassandra Clients for Java

Posted by Daniel Colchete <da...@cloud3.tc>.
Thank you Vivek. I'll start playing with the clients today. Thank you very
much!

Best,
Daniel

On Tue, Jun 21, 2011 at 9:33 AM, Vivek Mishra <vi...@impetus.co.in>wrote:

>  Hi Daniel,
>
> Just saw your email regarding kundera download.
>
>
>
> Kundera snapshot jar is available at:
>
>
>
>
> http://kundera.googlecode.com/svn/maven2/maven-missing-resources/com/impetus/kundera/1.1.1-SNAPSHOT/
>
>
>
> In addition,
>
> If you want to download source code then it is at:
>
>
>
> https://github.com/impetus-opensource/Kundera
>
>
>
> You could also refer to Kundera-examples for reference at:
>
>
>
> https://github.com/impetus-opensource/Kundera-Examples
>
>
>
> I hope it helps.
>
>
>
>
>
> *From:* Daniel Colchete [mailto:dani@cloud3.tc]
> *Sent:* Monday, June 20, 2011 8:23 PM
> *To:* user@cassandra.apache.org
> *Subject:* Re: Cassandra Clients for Java
>
>
>
> Thank you all for your answers! It hard to tell the good projects from the
> not so good projects and it seems that the choice is really between Hector
> and Pelops. On average, most of the people are using Hector or Pelops and
> most of the names starts with Da (sorry, couldn't help :)).
>
>
>
> Dan Washusen asked to comment more regarding Hector's e Pelops' APIs. Lets
> start with what cassandra gives us: get, insert, remove for simple
> operations; get_slice to read an entire row (or something like that);
> multiget_slice and batch_mutate for reading or writing multiple data with a
> single call. So we could start from this and we would be speaking
> Cassandra-nease. One CassandraClient class exporting all those methods, with
> the necessary model classes on the package.
>
>
>
> All of those methods have small details we don't want to have to work out
> every time, like timestamp (now is a perfect default value), consistency
> level (the client could have default values) and string encoding (UTF8 could
> be a default, but the CassandraClient and the model classes should handle it
> themselves). So, at this point we would have an API similar to Thrift's but
> a little less boring to use.
>
>
>
> With this API we could do failover, load balancing, auto node discovery,
> and still be speaking Cassandra-nease.
>
>
>
> But them writing methods to read from Cassandra to create models and to
> persist models would be a pretty time wasting task. So them we would move to
> an JPA implementation doing this automagically, like Hector did (thanks for
> showing this up). The JPA implementation (I have no idea how to write
> something like this, although I would like to learn), would use our
> simplified thrift-like interface.
>
>
>
> In the end: no third semantics, still have direct access to Cassandra to
> deal with special cases and for most of the cases you have JPA, still have
> failover and load balancing. How many dependencies do we need besides what
> Cassandra already requires: zero. Simple, powerful. I agree that I'm not
> showing a proof-of-concept or anything but it is a good starting vision for
> a client. Of course there are corner cases and details to work out but, what
> do you think?
>
>
>
> With Hector, from their Getting Started page, first you initialize a
> Cluster, them you create a Keyspace from that cluster, them, wait, you have
> to create a template for your column family. With that template you can
> create an updater to do an insert (in Cassandra-nease), or you can query
> columns to do an get_slice (in Cassandra-nease), or delete column to do a
> remove (in Cassandra-nease). You can clearly see a third semantics here.
>
>
>
> With Pelops their documentation on their main website (at GitHub) seems
> very lacking and I couldn't understand if you have to create a mutator to
> every write or not and why they assigned strings and not objects to organize
> connections. They have this pool thing related to the fact that they use
> strings to organize connections.
>
>
>
> In the end I think Hector should be a better choice because of their JPA
> implementation and because Pelops doesn't seem to have documentation. Thanks
> again for showing the JPA thing up, I really couldn't find anything linking
> to it. Not even their User guide.
>
>
>
> Thank you very much for all for the answers.
>
>
>
> Best,
>
> Dani
>
>
>
> On Sat, Jun 18, 2011 at 4:04 PM, Rajesh Koilpillai <
> rajesh.koilpillai@gmail.com> wrote:
>
> +1 to Hector (especially with the changes made in the latest version of
> their API)
>
>
>
> On Sun, Jun 19, 2011 at 12:01 AM, Steve Willcox <sw...@rallydev.com>
> wrote:
>
> I'm using Hector.
>
>
>
> The main contributor Nate McCall is very active and responsive to any
> issues. The Hector community is very active.
>
>
>
>  I've been using Java for a long time and I disagree that the client is
> more complex than the underlying Thrift client. The latest version of Hector
> has made large gains in simplifying the API. It has connection caching, load
> balancing and failover build into its client.
>
>
>
> I found it easy to use and stable. My code has been in production since
> April 2011 and we've not had one Hector issue yet.
>
>
>
> Hope that helps
>
>
>
> Steve W.
>
> On Fri, Jun 17, 2011 at 4:02 PM, Daniel Colchete <da...@cloud3.tc> wrote:
>
> Good day everyone!
>
>
>
> I'm getting started with a new project and I'm thinking about using
> Cassandra because of its distributed quality and because of its performance.
>
>
>
> I'm using Java on the back-end. There are many many things being said about
> the Java high level clients for Cassandra on the web. To be frank, I see
> problems with all of the java clients. For example, Hector and Scale7-pelops
> have new semantics on them that are neither Java's or Cassandra's, and I
> don't see much gain from it apart from the fact that it is more complex.
> Also, I was hoping to go with something that was annotation based so that it
> wouldn't be necessary to write boilerplate code (again, no gain).
>
>
>
> Demoiselle Cassandra seems to be one option but I couldn't find a download
> for it. I'm new to Java in the back-end and I find that maven is too much to
> learn just because of a client library. Also it seems to be hard to
> integrate with the other things I use on my project (GWT, GWT-platform,
> Google Eclipse Plugin).
>
>
>
> Kundera looks great but besides not having a download link (Google site
> link to Github, that links to Google site, but no download) its information
> is partitioned on many blog posts, some of them saying things I couldn't
> find on its website. One says it uses Lucandra for indexes but that is the
> only place talking about it, no documentation about using it. It doesn't
> seem to support Cassandra 0.8 also. Does it?
>
>
>
> I would like to hear from the users here what worked for you guys. Some
> real world project in production that was good to write in Java, where the
> client was stable and is maintained. What are the success stories of using
> Cassandra with Java. What would you recommend?
>
>
>
> Thank you very much!
>
>
>
> Best,
>
> --
> Dani
> Cloud3 Tech - http://cloud3.tc/
> Twitter: @DaniCloud3 @Cloud3Tech
>
>
>
>
>
>   --
> Thanks,
> - Rajesh Koilpillai
>
>
>
>
> --
> Dani
> Cloud3 Tech - http://cloud3.tc/
> Twitter: @DaniCloud3 @Cloud3Tech
>
>
> ------------------------------
>
> Register for Impetus Webinar on ‘Leveraging the Cloud for your Product
> Testing Needs’ on June 22 (10:00am PT). Meet Impetus as a sponsor for Hadoop
> Summit 2011 in Santa Clara, CA on June 29.
>
> Click http://www.impetus.com to know more. Follow us on
> www.twitter.com/impetuscalling
>
>
> NOTE: This message may contain information that is confidential,
> proprietary, privileged or otherwise protected by law. The message is
> intended solely for the named addressee. If received in error, please
> destroy and notify the sender. Any use of this email is prohibited when
> received in error. Impetus does not represent, warrant and/or guarantee,
> that the integrity of this communication has been maintained nor that the
> communication is free of errors, virus, interception or interference.
>



-- 
Dani
Cloud3 Tech - http://cloud3.tc/
Twitter: @DaniCloud3 @Cloud3Tech

RE: Cassandra Clients for Java

Posted by Vivek Mishra <vi...@impetus.co.in>.
Hi Daniel,
Just saw your email regarding kundera download.

Kundera snapshot jar is available at:

http://kundera.googlecode.com/svn/maven2/maven-missing-resources/com/impetus/kundera/1.1.1-SNAPSHOT/

In addition,
If you want to download source code then it is at:

https://github.com/impetus-opensource/Kundera

You could also refer to Kundera-examples for reference at:

https://github.com/impetus-opensource/Kundera-Examples

I hope it helps.


From: Daniel Colchete [mailto:dani@cloud3.tc]
Sent: Monday, June 20, 2011 8:23 PM
To: user@cassandra.apache.org
Subject: Re: Cassandra Clients for Java

Thank you all for your answers! It hard to tell the good projects from the not so good projects and it seems that the choice is really between Hector and Pelops. On average, most of the people are using Hector or Pelops and most of the names starts with Da (sorry, couldn't help :)).

Dan Washusen asked to comment more regarding Hector's e Pelops' APIs. Lets start with what cassandra gives us: get, insert, remove for simple operations; get_slice to read an entire row (or something like that); multiget_slice and batch_mutate for reading or writing multiple data with a single call. So we could start from this and we would be speaking Cassandra-nease. One CassandraClient class exporting all those methods, with the necessary model classes on the package.

All of those methods have small details we don't want to have to work out every time, like timestamp (now is a perfect default value), consistency level (the client could have default values) and string encoding (UTF8 could be a default, but the CassandraClient and the model classes should handle it themselves). So, at this point we would have an API similar to Thrift's but a little less boring to use.

With this API we could do failover, load balancing, auto node discovery, and still be speaking Cassandra-nease.

But them writing methods to read from Cassandra to create models and to persist models would be a pretty time wasting task. So them we would move to an JPA implementation doing this automagically, like Hector did (thanks for showing this up). The JPA implementation (I have no idea how to write something like this, although I would like to learn), would use our simplified thrift-like interface.

In the end: no third semantics, still have direct access to Cassandra to deal with special cases and for most of the cases you have JPA, still have failover and load balancing. How many dependencies do we need besides what Cassandra already requires: zero. Simple, powerful. I agree that I'm not showing a proof-of-concept or anything but it is a good starting vision for a client. Of course there are corner cases and details to work out but, what do you think?

With Hector, from their Getting Started page, first you initialize a Cluster, them you create a Keyspace from that cluster, them, wait, you have to create a template for your column family. With that template you can create an updater to do an insert (in Cassandra-nease), or you can query columns to do an get_slice (in Cassandra-nease), or delete column to do a remove (in Cassandra-nease). You can clearly see a third semantics here.

With Pelops their documentation on their main website (at GitHub) seems very lacking and I couldn't understand if you have to create a mutator to every write or not and why they assigned strings and not objects to organize connections. They have this pool thing related to the fact that they use strings to organize connections.

In the end I think Hector should be a better choice because of their JPA implementation and because Pelops doesn't seem to have documentation. Thanks again for showing the JPA thing up, I really couldn't find anything linking to it. Not even their User guide.

Thank you very much for all for the answers.

Best,
Dani

On Sat, Jun 18, 2011 at 4:04 PM, Rajesh Koilpillai <ra...@gmail.com>> wrote:
+1 to Hector (especially with the changes made in the latest version of their API)

On Sun, Jun 19, 2011 at 12:01 AM, Steve Willcox <sw...@rallydev.com>> wrote:
I'm using Hector.

The main contributor Nate McCall is very active and responsive to any issues. The Hector community is very active.

 I've been using Java for a long time and I disagree that the client is more complex than the underlying Thrift client. The latest version of Hector has made large gains in simplifying the API. It has connection caching, load balancing and failover build into its client.

I found it easy to use and stable. My code has been in production since April 2011 and we've not had one Hector issue yet.

Hope that helps

Steve W.
On Fri, Jun 17, 2011 at 4:02 PM, Daniel Colchete <da...@cloud3.tc>> wrote:
Good day everyone!

I'm getting started with a new project and I'm thinking about using Cassandra because of its distributed quality and because of its performance.

I'm using Java on the back-end. There are many many things being said about the Java high level clients for Cassandra on the web. To be frank, I see problems with all of the java clients. For example, Hector and Scale7-pelops have new semantics on them that are neither Java's or Cassandra's, and I don't see much gain from it apart from the fact that it is more complex. Also, I was hoping to go with something that was annotation based so that it wouldn't be necessary to write boilerplate code (again, no gain).

Demoiselle Cassandra seems to be one option but I couldn't find a download for it. I'm new to Java in the back-end and I find that maven is too much to learn just because of a client library. Also it seems to be hard to integrate with the other things I use on my project (GWT, GWT-platform, Google Eclipse Plugin).

Kundera looks great but besides not having a download link (Google site link to Github, that links to Google site, but no download) its information is partitioned on many blog posts, some of them saying things I couldn't find on its website. One says it uses Lucandra for indexes but that is the only place talking about it, no documentation about using it. It doesn't seem to support Cassandra 0.8 also. Does it?

I would like to hear from the users here what worked for you guys. Some real world project in production that was good to write in Java, where the client was stable and is maintained. What are the success stories of using Cassandra with Java. What would you recommend?

Thank you very much!

Best,
--
Dani
Cloud3 Tech - http://cloud3.tc/
Twitter: @DaniCloud3 @Cloud3Tech



--
Thanks,
- Rajesh Koilpillai



--
Dani
Cloud3 Tech - http://cloud3.tc/
Twitter: @DaniCloud3 @Cloud3Tech


________________________________

Register for Impetus Webinar on 'Leveraging the Cloud for your Product Testing Needs' on June 22 (10:00am PT). Meet Impetus as a sponsor for Hadoop Summit 2011 in Santa Clara, CA on June 29.

Click http://www.impetus.com to know more. Follow us on www.twitter.com/impetuscalling


NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.

Re: Cassandra Clients for Java

Posted by Daniel Colchete <da...@cloud3.tc>.
Thank you all for your answers! It hard to tell the good projects from the
not so good projects and it seems that the choice is really between Hector
and Pelops. On average, most of the people are using Hector or Pelops and
most of the names starts with Da (sorry, couldn't help :)).

Dan Washusen asked to comment more regarding Hector's e Pelops' APIs. Lets
start with what cassandra gives us: get, insert, remove for simple
operations; get_slice to read an entire row (or something like that);
multiget_slice and batch_mutate for reading or writing multiple data with a
single call. So we could start from this and we would be speaking
Cassandra-nease. One CassandraClient class exporting all those methods, with
the necessary model classes on the package.

All of those methods have small details we don't want to have to work out
every time, like timestamp (now is a perfect default value), consistency
level (the client could have default values) and string encoding (UTF8 could
be a default, but the CassandraClient and the model classes should handle it
themselves). So, at this point we would have an API similar to Thrift's but
a little less boring to use.

With this API we could do failover, load balancing, auto node discovery, and
still be speaking Cassandra-nease.

But them writing methods to read from Cassandra to create models and to
persist models would be a pretty time wasting task. So them we would move to
an JPA implementation doing this automagically, like Hector did (thanks for
showing this up). The JPA implementation (I have no idea how to write
something like this, although I would like to learn), would use our
simplified thrift-like interface.

In the end: no third semantics, still have direct access to Cassandra to
deal with special cases and for most of the cases you have JPA, still have
failover and load balancing. How many dependencies do we need besides what
Cassandra already requires: zero. Simple, powerful. I agree that I'm not
showing a proof-of-concept or anything but it is a good starting vision for
a client. Of course there are corner cases and details to work out but, what
do you think?

With Hector, from their Getting Started page, first you initialize a
Cluster, them you create a Keyspace from that cluster, them, wait, you have
to create a template for your column family. With that template you can
create an updater to do an insert (in Cassandra-nease), or you can query
columns to do an get_slice (in Cassandra-nease), or delete column to do a
remove (in Cassandra-nease). You can clearly see a third semantics here.

With Pelops their documentation on their main website (at GitHub) seems very
lacking and I couldn't understand if you have to create a mutator to every
write or not and why they assigned strings and not objects to organize
connections. They have this pool thing related to the fact that they use
strings to organize connections.

In the end I think Hector should be a better choice because of their JPA
implementation and because Pelops doesn't seem to have documentation. Thanks
again for showing the JPA thing up, I really couldn't find anything linking
to it. Not even their User guide.

Thank you very much for all for the answers.

Best,
Dani

On Sat, Jun 18, 2011 at 4:04 PM, Rajesh Koilpillai <
rajesh.koilpillai@gmail.com> wrote:

> +1 to Hector (especially with the changes made in the latest version of
> their API)
>
>
> On Sun, Jun 19, 2011 at 12:01 AM, Steve Willcox <sw...@rallydev.com>wrote:
>
>> I'm using Hector.
>>
>> The main contributor Nate McCall is very active and responsive to any
>> issues. The Hector community is very active.
>>
>>  I've been using Java for a long time and I disagree that the client is
>> more complex than the underlying Thrift client. The latest version of Hector
>> has made large gains in simplifying the API. It has connection caching, load
>> balancing and failover build into its client.
>>
>> I found it easy to use and stable. My code has been in production since
>> April 2011 and we've not had one Hector issue yet.
>>
>> Hope that helps
>>
>> Steve W.
>>
>> On Fri, Jun 17, 2011 at 4:02 PM, Daniel Colchete <da...@cloud3.tc> wrote:
>>
>>> Good day everyone!
>>>
>>> I'm getting started with a new project and I'm thinking about using
>>> Cassandra because of its distributed quality and because of its performance.
>>>
>>> I'm using Java on the back-end. There are many many things being said
>>> about the Java high level clients for Cassandra on the web. To be frank, I
>>> see problems with all of the java clients. For example, Hector and
>>> Scale7-pelops have new semantics on them that are neither Java's or
>>> Cassandra's, and I don't see much gain from it apart from the fact that it
>>> is more complex. Also, I was hoping to go with something that was annotation
>>> based so that it wouldn't be necessary to write boilerplate code (again, no
>>> gain).
>>>
>>> Demoiselle Cassandra seems to be one option but I couldn't find a
>>> download for it. I'm new to Java in the back-end and I find that maven is
>>> too much to learn just because of a client library. Also it seems to be hard
>>> to integrate with the other things I use on my project (GWT, GWT-platform,
>>> Google Eclipse Plugin).
>>>
>>> Kundera looks great but besides not having a download link (Google site
>>> link to Github, that links to Google site, but no download) its information
>>> is partitioned on many blog posts, some of them saying things I couldn't
>>> find on its website. One says it uses Lucandra for indexes but that is the
>>> only place talking about it, no documentation about using it. It doesn't
>>> seem to support Cassandra 0.8 also. Does it?
>>>
>>> I would like to hear from the users here what worked for you guys. Some
>>> real world project in production that was good to write in Java, where the
>>> client was stable and is maintained. What are the success stories of using
>>> Cassandra with Java. What would you recommend?
>>>
>>> Thank you very much!
>>>
>>> Best,
>>> --
>>> Dani
>>> Cloud3 Tech - http://cloud3.tc/
>>> Twitter: @DaniCloud3 @Cloud3Tech
>>>
>>
>>
>
>
> --
> Thanks,
> - Rajesh Koilpillai
>



-- 
Dani
Cloud3 Tech - http://cloud3.tc/
Twitter: @DaniCloud3 @Cloud3Tech

Re: Cassandra Clients for Java

Posted by Rajesh Koilpillai <ra...@gmail.com>.
+1 to Hector (especially with the changes made in the latest version of
their API)

On Sun, Jun 19, 2011 at 12:01 AM, Steve Willcox <sw...@rallydev.com>wrote:

> I'm using Hector.
>
> The main contributor Nate McCall is very active and responsive to any
> issues. The Hector community is very active.
>
>  I've been using Java for a long time and I disagree that the client is
> more complex than the underlying Thrift client. The latest version of Hector
> has made large gains in simplifying the API. It has connection caching, load
> balancing and failover build into its client.
>
> I found it easy to use and stable. My code has been in production since
> April 2011 and we've not had one Hector issue yet.
>
> Hope that helps
>
> Steve W.
>
> On Fri, Jun 17, 2011 at 4:02 PM, Daniel Colchete <da...@cloud3.tc> wrote:
>
>> Good day everyone!
>>
>> I'm getting started with a new project and I'm thinking about using
>> Cassandra because of its distributed quality and because of its performance.
>>
>> I'm using Java on the back-end. There are many many things being said
>> about the Java high level clients for Cassandra on the web. To be frank, I
>> see problems with all of the java clients. For example, Hector and
>> Scale7-pelops have new semantics on them that are neither Java's or
>> Cassandra's, and I don't see much gain from it apart from the fact that it
>> is more complex. Also, I was hoping to go with something that was annotation
>> based so that it wouldn't be necessary to write boilerplate code (again, no
>> gain).
>>
>> Demoiselle Cassandra seems to be one option but I couldn't find a download
>> for it. I'm new to Java in the back-end and I find that maven is too much to
>> learn just because of a client library. Also it seems to be hard to
>> integrate with the other things I use on my project (GWT, GWT-platform,
>> Google Eclipse Plugin).
>>
>> Kundera looks great but besides not having a download link (Google site
>> link to Github, that links to Google site, but no download) its information
>> is partitioned on many blog posts, some of them saying things I couldn't
>> find on its website. One says it uses Lucandra for indexes but that is the
>> only place talking about it, no documentation about using it. It doesn't
>> seem to support Cassandra 0.8 also. Does it?
>>
>> I would like to hear from the users here what worked for you guys. Some
>> real world project in production that was good to write in Java, where the
>> client was stable and is maintained. What are the success stories of using
>> Cassandra with Java. What would you recommend?
>>
>> Thank you very much!
>>
>> Best,
>> --
>> Dani
>> Cloud3 Tech - http://cloud3.tc/
>> Twitter: @DaniCloud3 @Cloud3Tech
>>
>
>


-- 
Thanks,
- Rajesh Koilpillai

Re: Cassandra Clients for Java

Posted by Steve Willcox <sw...@rallydev.com>.
I'm using Hector.

The main contributor Nate McCall is very active and responsive to any
issues. The Hector community is very active.

 I've been using Java for a long time and I disagree that the client is more
complex than the underlying Thrift client. The latest version of Hector has
made large gains in simplifying the API. It has connection caching, load
balancing and failover build into its client.

I found it easy to use and stable. My code has been in production since
April 2011 and we've not had one Hector issue yet.

Hope that helps

Steve W.

On Fri, Jun 17, 2011 at 4:02 PM, Daniel Colchete <da...@cloud3.tc> wrote:

> Good day everyone!
>
> I'm getting started with a new project and I'm thinking about using
> Cassandra because of its distributed quality and because of its performance.
>
> I'm using Java on the back-end. There are many many things being said about
> the Java high level clients for Cassandra on the web. To be frank, I see
> problems with all of the java clients. For example, Hector and Scale7-pelops
> have new semantics on them that are neither Java's or Cassandra's, and I
> don't see much gain from it apart from the fact that it is more complex.
> Also, I was hoping to go with something that was annotation based so that it
> wouldn't be necessary to write boilerplate code (again, no gain).
>
> Demoiselle Cassandra seems to be one option but I couldn't find a download
> for it. I'm new to Java in the back-end and I find that maven is too much to
> learn just because of a client library. Also it seems to be hard to
> integrate with the other things I use on my project (GWT, GWT-platform,
> Google Eclipse Plugin).
>
> Kundera looks great but besides not having a download link (Google site
> link to Github, that links to Google site, but no download) its information
> is partitioned on many blog posts, some of them saying things I couldn't
> find on its website. One says it uses Lucandra for indexes but that is the
> only place talking about it, no documentation about using it. It doesn't
> seem to support Cassandra 0.8 also. Does it?
>
> I would like to hear from the users here what worked for you guys. Some
> real world project in production that was good to write in Java, where the
> client was stable and is maintained. What are the success stories of using
> Cassandra with Java. What would you recommend?
>
> Thank you very much!
>
> Best,
> --
> Dani
> Cloud3 Tech - http://cloud3.tc/
> Twitter: @DaniCloud3 @Cloud3Tech
>