incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Ribeiro <>
Subject Re: REST client interface
Date Wed, 08 Jul 2009 21:06:05 GMT
> How far away from giving us something like this is thrift's HTTPTransport?
The only thing in common between Thrift-over-http and REST is the
application level protocol.

> But does it 'really' make sense internally?

No, it doesn't make sense. But I am not talking about put it
internally. No, by any means! Thrift should be used for this and works
just great!

I'm thinking about the a guy who wants to write a PHP/Java/Ruby web
app and don't want to mess with thrift. Everything is already there
for him, that is, the http lib of his/her language.

REST is not an rpc mechanism like thrift or xml-rpc or soap or rpc.
For REST the URL has a semantics as well as the http methods. REST is
most flexible, and simple than using any rpc mechanism.

> That said, I don't see the need for a RESTful public interface

I agree with Michael, but the idea is not have an internet available
interface. By any means, again. :-) Nevertheless, ActiveMQ, for
example, do this.

And I am a great supporter of thrift for communication among the nodes
of cassandra, but if I am designing a PHP app I would be very glad if
I had a REST interface to talk to cassandra. I am thinking from a user
perspective here. You don't have to tell devs: "oh, you want to talk
to Cassandra? Then get this IDL and compile it and put thrift.lib on
this folder, but be aware that  if we add new methods you will have to
compile for your favourite lang again". You just tell them: "get your
favorite lang http lib and there you go."

Look, I've got misunderstood here. I am not talking about using REST
for node to node communication. This just doesn't make sense at all! I
am talking about a web app talking to Cassandra through REST.

Best regards,

On Wed, Jul 8, 2009 at 5:33 PM, Michael Greene<> wrote:
> I don't think Thrift's HTTP transport would be ideal for a RESTful
> client interface.  It's more of a Thrift-over-HTTP than it is RESTful
> That said, I don't see the need for a RESTful public interface.  You
> would want to filter requests from the public anyway, and using pure
> Thrift internally is going to be more efficient on the backend.
> Michael
> On Wed, Jul 8, 2009 at 3:17 PM, Jonathan Ellis<> wrote:
>> How far away from giving us something like this is thrift's HTTPTransport?
>> On Wed, Jul 8, 2009 at 3:10 PM, Edward Ribeiro<> wrote:
>>> Hi folks,
>>> I've started to write a RESTful client interface. Anyone is working on this?
>>> Well, it uses jersey + jetty. Jetty loads quickly and has a relatively
>>> small footprint. And REST rocks! The downside is that both frameworks
>>> require an awful bunch of jars (8 jars or so). The small URLs that
>>> I've got working make sure that REST is the way to go when it comes to
>>> client apis.
>>> It's still an early draft, but next Tuesday I should be posting the
>>> first version as a JIRA issue, I hope. Below is a small list of things
>>> that are currently working (I've just started this afternoon):
>>> http://localhost:9999 --> retrieves info about the node
>>> http://localhost:9999/tables --> list the tables available
>>> http://localhost:9999/config --> echo the XML config file
>>> http://localhost:9999/tables/<Table Name> --> describe the table
>>> http://localhost:9999/tables/<Table Name>/<Column
>>> Family>/<Column>/<Key> --> retrieve row.
>>> The examples above will certainly change to suit the rest philosophy.
>>> I am not particularly fond of the last example... If anyone is
>>> interested, just drop me a mail and I'll send you the files, but I
>>> should open a JIRA issue next week. Any suggestion about URLs for
>>> operations is also welcome.
>>> Best regards,
>>> Edward

View raw message