You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Brian O'Neill <bo...@alumni.brown.edu> on 2011/10/11 03:12:47 UTC

REST API?

My team desperately needs a REST API for Cassandra.

I saw the following:
http://code.google.com/p/restish/
from
http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipulation/

But it appears to have little activity and documentation.

That lead me to start work on a contrib/rest module, but before I get to far
I wanted to ask if there was any effort underway for a REST Server/API.
If not, I'll continue developing the REST server.  Any preference for a REST
stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)

Until I hear back, I'll continue with the JAX-RS / Apache CXF implementation
I have cooking.

-brian

-- 
Brian ONeill
Lead Architect, Health Market Science (http://healthmarketscience.com)
mobile:215.588.6024
blog: http://weblogs.java.net/blog/boneill42/
blog: http://brianoneill.blogspot.com/

Re: REST API?

Posted by Nick Telford <ni...@gmail.com>.
There are no plans to move to Maven for 2 reasons: 1) a majority of
committers favour Ant; 2) if it aint broke, don't fix it.

On 11 October 2011 03:33, Brian O'Neill <bo...@alumni.brown.edu> wrote:

> Will do.   I've picked up where Gary left off.  It is good starting point,
> with a good mapping between REST and get/set/mutations. (kudos to Gary)
>  I'll update it to accomodate any changes and see if I can add some tests
> on
> top of it.
>
> I may look to add in JAX-RS (on either Jersey or Apache CXF).  We use it
> for
> all of our REST services, and it may provide a good abstraction layer that
> we can build on.
>
> Give me a couple days.
> I have to get back into the "ant mentality". I've been doing maven too
> long.
> BTW -- Does anyone know if there are plans to move to maven?
> (Not trying to start a religious war, just curious. ;)
>
> -brian
>
> On Mon, Oct 10, 2011 at 10:06 PM, Jeremy Hanna
> <je...@gmail.com>wrote:
>
> > Brian,
> >
> > If you end up doing something with the rest api and making it
> > available/open source, please post again either here or on the user list.
>  I
> > think others would be interested and may contribute to it.
> >
> > Cheers,
> >
> > Jeremy
> >
> > On Oct 10, 2011, at 8:42 PM, Brian O'Neill wrote:
> >
> > > Thanks Gary. Perfect.  Checking it out now.
> > >
> > > Performance isn't much of a concern for us through the REST interface.
> >  We
> > > are using the Hadoop/PIG integration to do the heavy lifting.  This
> will
> > be
> > > mostly for reads and small number of writes.
> > >
> > > I'll definitely give this a try.  Thanks again.  I'll let you know how
> it
> > > turns out.
> > >
> > > -brian
> > >
> > > On Mon, Oct 10, 2011 at 9:35 PM, Gary Dusbabek <gd...@gmail.com>
> > wrote:
> > >
> > >> It turns out that it is pretty easy (or it was a year ago) to replace
> > >> the native Cassandra transport with your own.  I wrote about it on my
> > >> blog (http://www.onemanclapping.org/2010/09/restful-cassandra.html),
> > >> using REST as an example.
> > >>
> > >>
> > >> On Mon, Oct 10, 2011 at 20:12, Brian O'Neill <bo...@alumni.brown.edu>
> > >> wrote:
> > >>> My team desperately needs a REST API for Cassandra.
> > >>>
> > >>> I saw the following:
> > >>> http://code.google.com/p/restish/
> > >>> from
> > >>>
> > >>
> >
> http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipulation/
> > >>>
> > >>> But it appears to have little activity and documentation.
> > >>>
> > >>> That lead me to start work on a contrib/rest module, but before I get
> > to
> > >> far
> > >>> I wanted to ask if there was any effort underway for a REST
> Server/API.
> > >>> If not, I'll continue developing the REST server.  Any preference for
> a
> > >> REST
> > >>> stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)
> > >>>
> > >>> Until I hear back, I'll continue with the JAX-RS / Apache CXF
> > >> implementation
> > >>> I have cooking.
> > >>>
> > >>> -brian
> > >>>
> > >>> --
> > >>> Brian ONeill
> > >>> Lead Architect, Health Market Science (
> http://healthmarketscience.com)
> > >>> mobile:215.588.6024
> > >>> blog: http://weblogs.java.net/blog/boneill42/
> > >>> blog: http://brianoneill.blogspot.com/
> > >>>
> > >>
> > >
> > >
> > >
> > > --
> > > Brian ONeill
> > > Lead Architect, Health Market Science (http://healthmarketscience.com)
> > > mobile:215.588.6024
> > > blog: http://weblogs.java.net/blog/boneill42/
> > > blog: http://brianoneill.blogspot.com/
> >
> >
>
>
> --
> Brian ONeill
> Lead Architect, Health Market Science (http://healthmarketscience.com)
> mobile:215.588.6024
> blog: http://weblogs.java.net/blog/boneill42/
> blog: http://brianoneill.blogspot.com/
>

Re: REST API?

Posted by Brian O'Neill <bo...@alumni.brown.edu>.
Will do.   I've picked up where Gary left off.  It is good starting point,
with a good mapping between REST and get/set/mutations. (kudos to Gary)
 I'll update it to accomodate any changes and see if I can add some tests on
top of it.

I may look to add in JAX-RS (on either Jersey or Apache CXF).  We use it for
all of our REST services, and it may provide a good abstraction layer that
we can build on.

Give me a couple days.
I have to get back into the "ant mentality". I've been doing maven too long.
BTW -- Does anyone know if there are plans to move to maven?
(Not trying to start a religious war, just curious. ;)

-brian

On Mon, Oct 10, 2011 at 10:06 PM, Jeremy Hanna
<je...@gmail.com>wrote:

> Brian,
>
> If you end up doing something with the rest api and making it
> available/open source, please post again either here or on the user list.  I
> think others would be interested and may contribute to it.
>
> Cheers,
>
> Jeremy
>
> On Oct 10, 2011, at 8:42 PM, Brian O'Neill wrote:
>
> > Thanks Gary. Perfect.  Checking it out now.
> >
> > Performance isn't much of a concern for us through the REST interface.
>  We
> > are using the Hadoop/PIG integration to do the heavy lifting.  This will
> be
> > mostly for reads and small number of writes.
> >
> > I'll definitely give this a try.  Thanks again.  I'll let you know how it
> > turns out.
> >
> > -brian
> >
> > On Mon, Oct 10, 2011 at 9:35 PM, Gary Dusbabek <gd...@gmail.com>
> wrote:
> >
> >> It turns out that it is pretty easy (or it was a year ago) to replace
> >> the native Cassandra transport with your own.  I wrote about it on my
> >> blog (http://www.onemanclapping.org/2010/09/restful-cassandra.html),
> >> using REST as an example.
> >>
> >>
> >> On Mon, Oct 10, 2011 at 20:12, Brian O'Neill <bo...@alumni.brown.edu>
> >> wrote:
> >>> My team desperately needs a REST API for Cassandra.
> >>>
> >>> I saw the following:
> >>> http://code.google.com/p/restish/
> >>> from
> >>>
> >>
> http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipulation/
> >>>
> >>> But it appears to have little activity and documentation.
> >>>
> >>> That lead me to start work on a contrib/rest module, but before I get
> to
> >> far
> >>> I wanted to ask if there was any effort underway for a REST Server/API.
> >>> If not, I'll continue developing the REST server.  Any preference for a
> >> REST
> >>> stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)
> >>>
> >>> Until I hear back, I'll continue with the JAX-RS / Apache CXF
> >> implementation
> >>> I have cooking.
> >>>
> >>> -brian
> >>>
> >>> --
> >>> Brian ONeill
> >>> Lead Architect, Health Market Science (http://healthmarketscience.com)
> >>> mobile:215.588.6024
> >>> blog: http://weblogs.java.net/blog/boneill42/
> >>> blog: http://brianoneill.blogspot.com/
> >>>
> >>
> >
> >
> >
> > --
> > Brian ONeill
> > Lead Architect, Health Market Science (http://healthmarketscience.com)
> > mobile:215.588.6024
> > blog: http://weblogs.java.net/blog/boneill42/
> > blog: http://brianoneill.blogspot.com/
>
>


-- 
Brian ONeill
Lead Architect, Health Market Science (http://healthmarketscience.com)
mobile:215.588.6024
blog: http://weblogs.java.net/blog/boneill42/
blog: http://brianoneill.blogspot.com/

Re: REST API?

Posted by Brian O'Neill <bo...@alumni.brown.edu>.
To give everyone an update...

I was able to take what Gary had and update it to run on trunk.
I like the native integration, as opposed to layering it on top of Hector.
 It's working out well.
I layered in JAX-RS to replace the hand parsing of the url, and the
handlers.
I have reads and writes working through the StorageProxy, but I think I'm
going to raise it up one layer to take advantage of ThriftValidations.
(but still using direct method invocation instead of the thift client)
I added unit tests for the read/write of columns.

I'm going to add a few other operations (add/drop keyspace, add/drop CF).
Then it should be in a state where I can share it.

-brian



On Mon, Oct 10, 2011 at 10:06 PM, Jeremy Hanna
<je...@gmail.com>wrote:

> Brian,
>
> If you end up doing something with the rest api and making it
> available/open source, please post again either here or on the user list.  I
> think others would be interested and may contribute to it.
>
> Cheers,
>
> Jeremy
>
> On Oct 10, 2011, at 8:42 PM, Brian O'Neill wrote:
>
> > Thanks Gary. Perfect.  Checking it out now.
> >
> > Performance isn't much of a concern for us through the REST interface.
>  We
> > are using the Hadoop/PIG integration to do the heavy lifting.  This will
> be
> > mostly for reads and small number of writes.
> >
> > I'll definitely give this a try.  Thanks again.  I'll let you know how it
> > turns out.
> >
> > -brian
> >
> > On Mon, Oct 10, 2011 at 9:35 PM, Gary Dusbabek <gd...@gmail.com>
> wrote:
> >
> >> It turns out that it is pretty easy (or it was a year ago) to replace
> >> the native Cassandra transport with your own.  I wrote about it on my
> >> blog (http://www.onemanclapping.org/2010/09/restful-cassandra.html),
> >> using REST as an example.
> >>
> >>
> >> On Mon, Oct 10, 2011 at 20:12, Brian O'Neill <bo...@alumni.brown.edu>
> >> wrote:
> >>> My team desperately needs a REST API for Cassandra.
> >>>
> >>> I saw the following:
> >>> http://code.google.com/p/restish/
> >>> from
> >>>
> >>
> http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipulation/
> >>>
> >>> But it appears to have little activity and documentation.
> >>>
> >>> That lead me to start work on a contrib/rest module, but before I get
> to
> >> far
> >>> I wanted to ask if there was any effort underway for a REST Server/API.
> >>> If not, I'll continue developing the REST server.  Any preference for a
> >> REST
> >>> stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)
> >>>
> >>> Until I hear back, I'll continue with the JAX-RS / Apache CXF
> >> implementation
> >>> I have cooking.
> >>>
> >>> -brian
> >>>
> >>> --
> >>> Brian ONeill
> >>> Lead Architect, Health Market Science (http://healthmarketscience.com)
> >>> mobile:215.588.6024
> >>> blog: http://weblogs.java.net/blog/boneill42/
> >>> blog: http://brianoneill.blogspot.com/
> >>>
> >>
> >
> >
> >
> > --
> > Brian ONeill
> > Lead Architect, Health Market Science (http://healthmarketscience.com)
> > mobile:215.588.6024
> > blog: http://weblogs.java.net/blog/boneill42/
> > blog: http://brianoneill.blogspot.com/
>
>


-- 
Brian ONeill
Lead Architect, Health Market Science (http://healthmarketscience.com)
mobile:215.588.6024
blog: http://weblogs.java.net/blog/boneill42/
blog: http://brianoneill.blogspot.com/

Re: REST API?

Posted by Jeremy Hanna <je...@gmail.com>.
Brian,

If you end up doing something with the rest api and making it available/open source, please post again either here or on the user list.  I think others would be interested and may contribute to it.

Cheers,

Jeremy

On Oct 10, 2011, at 8:42 PM, Brian O'Neill wrote:

> Thanks Gary. Perfect.  Checking it out now.
> 
> Performance isn't much of a concern for us through the REST interface.  We
> are using the Hadoop/PIG integration to do the heavy lifting.  This will be
> mostly for reads and small number of writes.
> 
> I'll definitely give this a try.  Thanks again.  I'll let you know how it
> turns out.
> 
> -brian
> 
> On Mon, Oct 10, 2011 at 9:35 PM, Gary Dusbabek <gd...@gmail.com> wrote:
> 
>> It turns out that it is pretty easy (or it was a year ago) to replace
>> the native Cassandra transport with your own.  I wrote about it on my
>> blog (http://www.onemanclapping.org/2010/09/restful-cassandra.html),
>> using REST as an example.
>> 
>> 
>> On Mon, Oct 10, 2011 at 20:12, Brian O'Neill <bo...@alumni.brown.edu>
>> wrote:
>>> My team desperately needs a REST API for Cassandra.
>>> 
>>> I saw the following:
>>> http://code.google.com/p/restish/
>>> from
>>> 
>> http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipulation/
>>> 
>>> But it appears to have little activity and documentation.
>>> 
>>> That lead me to start work on a contrib/rest module, but before I get to
>> far
>>> I wanted to ask if there was any effort underway for a REST Server/API.
>>> If not, I'll continue developing the REST server.  Any preference for a
>> REST
>>> stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)
>>> 
>>> Until I hear back, I'll continue with the JAX-RS / Apache CXF
>> implementation
>>> I have cooking.
>>> 
>>> -brian
>>> 
>>> --
>>> Brian ONeill
>>> Lead Architect, Health Market Science (http://healthmarketscience.com)
>>> mobile:215.588.6024
>>> blog: http://weblogs.java.net/blog/boneill42/
>>> blog: http://brianoneill.blogspot.com/
>>> 
>> 
> 
> 
> 
> -- 
> Brian ONeill
> Lead Architect, Health Market Science (http://healthmarketscience.com)
> mobile:215.588.6024
> blog: http://weblogs.java.net/blog/boneill42/
> blog: http://brianoneill.blogspot.com/


Re: REST API?

Posted by Brian O'Neill <bo...@alumni.brown.edu>.
Thanks Gary. Perfect.  Checking it out now.

Performance isn't much of a concern for us through the REST interface.  We
are using the Hadoop/PIG integration to do the heavy lifting.  This will be
mostly for reads and small number of writes.

I'll definitely give this a try.  Thanks again.  I'll let you know how it
turns out.

-brian

On Mon, Oct 10, 2011 at 9:35 PM, Gary Dusbabek <gd...@gmail.com> wrote:

> It turns out that it is pretty easy (or it was a year ago) to replace
> the native Cassandra transport with your own.  I wrote about it on my
> blog (http://www.onemanclapping.org/2010/09/restful-cassandra.html),
> using REST as an example.
>
>
> On Mon, Oct 10, 2011 at 20:12, Brian O'Neill <bo...@alumni.brown.edu>
> wrote:
> > My team desperately needs a REST API for Cassandra.
> >
> > I saw the following:
> > http://code.google.com/p/restish/
> > from
> >
> http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipulation/
> >
> > But it appears to have little activity and documentation.
> >
> > That lead me to start work on a contrib/rest module, but before I get to
> far
> > I wanted to ask if there was any effort underway for a REST Server/API.
> > If not, I'll continue developing the REST server.  Any preference for a
> REST
> > stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)
> >
> > Until I hear back, I'll continue with the JAX-RS / Apache CXF
> implementation
> > I have cooking.
> >
> > -brian
> >
> > --
> > Brian ONeill
> > Lead Architect, Health Market Science (http://healthmarketscience.com)
> > mobile:215.588.6024
> > blog: http://weblogs.java.net/blog/boneill42/
> > blog: http://brianoneill.blogspot.com/
> >
>



-- 
Brian ONeill
Lead Architect, Health Market Science (http://healthmarketscience.com)
mobile:215.588.6024
blog: http://weblogs.java.net/blog/boneill42/
blog: http://brianoneill.blogspot.com/

Re: REST API?

Posted by Gary Dusbabek <gd...@gmail.com>.
It turns out that it is pretty easy (or it was a year ago) to replace
the native Cassandra transport with your own.  I wrote about it on my
blog (http://www.onemanclapping.org/2010/09/restful-cassandra.html),
using REST as an example.


On Mon, Oct 10, 2011 at 20:12, Brian O'Neill <bo...@alumni.brown.edu> wrote:
> My team desperately needs a REST API for Cassandra.
>
> I saw the following:
> http://code.google.com/p/restish/
> from
> http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipulation/
>
> But it appears to have little activity and documentation.
>
> That lead me to start work on a contrib/rest module, but before I get to far
> I wanted to ask if there was any effort underway for a REST Server/API.
> If not, I'll continue developing the REST server.  Any preference for a REST
> stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)
>
> Until I hear back, I'll continue with the JAX-RS / Apache CXF implementation
> I have cooking.
>
> -brian
>
> --
> Brian ONeill
> Lead Architect, Health Market Science (http://healthmarketscience.com)
> mobile:215.588.6024
> blog: http://weblogs.java.net/blog/boneill42/
> blog: http://brianoneill.blogspot.com/
>

RE: REST API?

Posted by declan <de...@bluelinkmarketing.com>.
Please take me OFF this email...thanks

All the Best
Declan
-----Original Message-----
From: Matt Kennedy [mailto:stinkymatt@gmail.com] 
Sent: Tuesday, October 11, 2011 10:09 AM
To: dev@cassandra.apache.org
Subject: Re: REST API?

I have one based on restlet: https://github.com/stinkymatt/Helena

On Mon, Oct 10, 2011 at 9:12 PM, Brian O'Neill <bo...@alumni.brown.edu>
wrote:
> My team desperately needs a REST API for Cassandra.
>
> I saw the following:
> http://code.google.com/p/restish/
> from
>
http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipu
lation/
>
> But it appears to have little activity and documentation.
>
> That lead me to start work on a contrib/rest module, but before I get to
far
> I wanted to ask if there was any effort underway for a REST Server/API.
> If not, I'll continue developing the REST server.  Any preference for a
REST
> stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)
>
> Until I hear back, I'll continue with the JAX-RS / Apache CXF
implementation
> I have cooking.
>
> -brian
>
> --
> Brian ONeill
> Lead Architect, Health Market Science (http://healthmarketscience.com)
> mobile:215.588.6024
> blog: http://weblogs.java.net/blog/boneill42/
> blog: http://brianoneill.blogspot.com/
>


Re: REST API?

Posted by Matt Kennedy <st...@gmail.com>.
I have one based on restlet: https://github.com/stinkymatt/Helena

On Mon, Oct 10, 2011 at 9:12 PM, Brian O'Neill <bo...@alumni.brown.edu> wrote:
> My team desperately needs a REST API for Cassandra.
>
> I saw the following:
> http://code.google.com/p/restish/
> from
> http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipulation/
>
> But it appears to have little activity and documentation.
>
> That lead me to start work on a contrib/rest module, but before I get to far
> I wanted to ask if there was any effort underway for a REST Server/API.
> If not, I'll continue developing the REST server.  Any preference for a REST
> stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)
>
> Until I hear back, I'll continue with the JAX-RS / Apache CXF implementation
> I have cooking.
>
> -brian
>
> --
> Brian ONeill
> Lead Architect, Health Market Science (http://healthmarketscience.com)
> mobile:215.588.6024
> blog: http://weblogs.java.net/blog/boneill42/
> blog: http://brianoneill.blogspot.com/
>

Re: REST API?

Posted by Ed Anuff <ed...@anuff.com>.
For Usergrid, we use Jersey (http://jersey.java.net/), the Sun
implementation of JAX-RS, which makes use of Jackson
(http://wiki.fasterxml.com/JacksonHome) for the JSON marshalling.  I'd
heartily recommend using those if you're going to roll your own REST
implementation in Java.

If you're looking for a very high level REST API, you might want to
look at Usergrid (http://github.com/usergrid/stack).  We're
abstracting away the underlying Cassandra representation to a pretty
high degree, but it might be useful depending on what you're trying to
do.

Ed

On Mon, Oct 10, 2011 at 6:12 PM, Brian O'Neill <bo...@alumni.brown.edu> wrote:
> My team desperately needs a REST API for Cassandra.
>
> I saw the following:
> http://code.google.com/p/restish/
> from
> http://crlog.info/2011/01/29/restish-wrapper-for-hectorcassandra-data-manipulation/
>
> But it appears to have little activity and documentation.
>
> That lead me to start work on a contrib/rest module, but before I get to far
> I wanted to ask if there was any effort underway for a REST Server/API.
> If not, I'll continue developing the REST server.  Any preference for a REST
> stack?  (JAX-RS on Apache-CXF?  Raw Servlets? Netty? etc.)
>
> Until I hear back, I'll continue with the JAX-RS / Apache CXF implementation
> I have cooking.
>
> -brian
>
> --
> Brian ONeill
> Lead Architect, Health Market Science (http://healthmarketscience.com)
> mobile:215.588.6024
> blog: http://weblogs.java.net/blog/boneill42/
> blog: http://brianoneill.blogspot.com/
>