You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Paul Brown <pa...@gmail.com> on 2009/12/09 01:35:50 UTC

StorageService versus Thrift interface?

I'm making some design decisions about using the
StorageService/StorageProxy and Thrift interface approaches, and it
looks like there are some moving pieces to consider.  (Someone should
update or remove the example on the wiki, as it no longer applies to
the API as shipped in 0.5.0.)

The StorageService/StorageProxy approach looks appealing, but it also
had a few things that I have at least aesthetic objections to
(promotion of IOException to IOError, System.exit(), static
singletons, etc.).

What are people in the Java space using?  What's the intended future
for StorageService/StorageProxy versus Thrift API access?

Thanks in advance.

-- Paul

Re: StorageService versus Thrift interface?

Posted by Gary Dusbabek <gd...@gmail.com>.
On Wed, Dec 9, 2009 at 07:25, Jonathan Ellis <jb...@gmail.com> wrote:
> On Wed, Dec 9, 2009 at 12:36 AM, Paul Brown <pa...@gmail.com> wrote:
>> The example I have in mind is in the Java section of
>> http://wiki.apache.org/cassandra/ClientExamples; it starts out with
>> StorageService.instance().initClient(), and the initClient method
>> isn't present on the version of the class that is part of the
>> 0.5.0-beta snapshot.
>
> No, but it will be in the next one.  So someone's actually ahead of the game. :)
>
> -Jonathan
>

My bad.  I've updated the wiki to indicate that client-only mode is
only available in the trunk.

Gary.

Re: StorageService versus Thrift interface?

Posted by Jonathan Ellis <jb...@gmail.com>.
On Wed, Dec 9, 2009 at 12:36 AM, Paul Brown <pa...@gmail.com> wrote:
> The example I have in mind is in the Java section of
> http://wiki.apache.org/cassandra/ClientExamples; it starts out with
> StorageService.instance().initClient(), and the initClient method
> isn't present on the version of the class that is part of the
> 0.5.0-beta snapshot.

No, but it will be in the next one.  So someone's actually ahead of the game. :)

-Jonathan

Re: StorageService versus Thrift interface?

Posted by Paul Brown <pa...@gmail.com>.
Hi, Jonathan --

On Tue, Dec 8, 2009 at 5:53 PM, Jonathan Ellis <jb...@gmail.com> wrote:
> On Tue, Dec 8, 2009 at 6:35 PM, Paul Brown <pa...@gmail.com> wrote:
>> I'm making some design decisions about using the
>> StorageService/StorageProxy and Thrift interface approaches, and it
>> looks like there are some moving pieces to consider.  (Someone should
>> update or remove the example on the wiki, as it no longer applies to
>> the API as shipped in 0.5.0.)
> Which example do you mean?

The example I have in mind is in the Java section of
http://wiki.apache.org/cassandra/ClientExamples; it starts out with
StorageService.instance().initClient(), and the initClient method
isn't present on the version of the class that is part of the
0.5.0-beta snapshot.

>> The StorageService/StorageProxy approach looks appealing, but it also
>> had a few things that I have at least aesthetic objections to [...]
> Patches welcome, of course.

I'm happy to take a pass over it, so long as I know that it's expected
to be a long-term part of the system and that someone else isn't
already working on it.

>> What are people in the Java space using?  What's the intended future
>> for StorageService/StorageProxy versus Thrift API access?
> IMO you should use Thrift unless you have a compelling reason
> otherwise. [...]

Stable subset is the place to be — Thrift it is, then.

-- 
paulrbrown@gmail.com
http://mult.ifario.us/

Re: StorageService versus Thrift interface?

Posted by Jonathan Ellis <jb...@gmail.com>.
On Tue, Dec 8, 2009 at 6:35 PM, Paul Brown <pa...@gmail.com> wrote:
> I'm making some design decisions about using the
> StorageService/StorageProxy and Thrift interface approaches, and it
> looks like there are some moving pieces to consider.  (Someone should
> update or remove the example on the wiki, as it no longer applies to
> the API as shipped in 0.5.0.)

Which example do you mean?

> The StorageService/StorageProxy approach looks appealing, but it also
> had a few things that I have at least aesthetic objections to
> (promotion of IOException to IOError, System.exit(), static
> singletons, etc.).

Patches welcome, of course.

> What are people in the Java space using?  What's the intended future
> for StorageService/StorageProxy versus Thrift API access?

IMO you should use Thrift unless you have a compelling reason
otherwise.  Thrift _very roughly_ adds about 30% overhead, but if you
can live with that it's a lot more battle-tested and I expect it to be
more stable for the next release or two.  AFAIK only one-off bulk
loaders and proof of concepts have been done with the StorageProxy
API.

-Jonathan