You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Ran Tavory <ra...@gmail.com> on 2010/05/03 11:16:47 UTC

RPC for java/python with rest support, HTML monitoring and goodies

Hi, I just posted this question on stackoverflow, I'd appreciate your
answer...

http://stackoverflow.com/questions/2757040/rpc-for-java-python-with-rest-support-html-monitoring-and-goodies

RPC for java/python with rest support, HTML monitoring and
goodies<http://questions/2757040/rpc-for-java-python-with-rest-support-html-monitoring-and-goodies>

 Here's my set of requirements: I'm looking for an RPC framework such as
thrift, avro, protobuf (when adding services to it) which supports:

   1. Easy and intuitive IDL. No serial numbers, no manual versioning,
   simple... avro is a good example for this.
   2. Works with Java and Python
   3. Supports both fast binary prorocol, as well as HTTP based restful
   style. I'd like to be able to use it for both backend-to-backend
   communication (java-java or python-java) as well as frontend-to-backend
   communication (javascript to java).
   4. The rest support needs to include &param=value input as get/post
   requests (configurable per request) and output in three possible formats:
   json, jsonp, XML.
   5. Compact, fast, backward compatible, easy to upgrade etc...
   6. Provides some nice monitoring interfaces such as: JMX, web page status
   reports (e.g. packets in, packets out, error rate etc)
   7. Ops friendly... no need to take the whole site down to release new
   versions

... other goodies are welcome...

Is there something out there?
So far I've looked at thrift and avro and they are both nice in some ways,
but don't check all my list.

Thanks

Re: RPC for java/python with rest support, HTML monitoring and goodies

Posted by Ran Tavory <ra...@gmail.com>.
ok, thanks Doug, I was hoping to get everything out of the box, but that's
close enough I guess...

On Mon, May 3, 2010 at 8:20 PM, Doug Cutting <cu...@apache.org> wrote:

> Ran Tavory wrote:
>
>> Here's my set of requirements:
>>
>
> It seems to me that Avro satisfies most of these.  I'll comment below.
>
>    1. Easy and intuitive IDL. No serial numbers, no manual versioning,
>>
>>      simple... avro is a good example for this.
>>   2. Works with Java and Python
>>
>
> Check.
>
>    3. Supports both fast binary prorocol, as well as HTTP based restful
>>
>>      style. I'd like to be able to use it for both backend-to-backend
>>      communication (java-java or python-java) as well as
>>      frontend-to-backend communication (javascript to java).
>>   4. The rest support needs to include &param=value input as get/post
>>
>>      requests (configurable per request) and output in three possible
>>      formats: json, jsonp, XML.
>>
>
> Avro does not currently support url-encoded query-string parameters.  A
> Java servlet that does this could be added without too much difficulty.
>  Alternately, one might develop an Avro library in Javascript that could
> make binary requests.
>
> One could also easily define an XML-encoding for Avro data.  However
> implementing it and maintaining in all languages might be difficult.  So I
> prefer to consider anything other than the binary encoding as optional for
> implementations.  Thus applications should generally use the binary encoding
> to ensure the greatest intercompatibility.
>
> A JSON-encoding of Avro data is specified that could perhaps also be used
> to implement a jsonp-style approach.
>
>    5. Compact, fast, backward compatible, easy to upgrade etc...
>>
>
> Check.
>
>    6. Provides some nice monitoring interfaces such as: JMX, web page
>>
>>      status reports (e.g. packets in, packets out, error rate etc)
>>
>
> Avro Java has a statistics plugin.  This could be enhanced if there were
> particular values you require.
>
>
> http://hadoop.apache.org/avro/docs/current/api/java/org/apache/avro/ipc/stats/package-summary.html
>
>    7. Ops friendly... no need to take the whole site down to release new
>>
>>      versions
>>
>> ... other goodies are welcome...
>>
>> Is there something out there?
>> So far I've looked at thrift and avro and they are both nice in some ways,
>> but don't check all my list.
>>
>
> Doug
>
>

Re: RPC for java/python with rest support, HTML monitoring and goodies

Posted by Doug Cutting <cu...@apache.org>.
Ran Tavory wrote:
> Here's my set of requirements:

It seems to me that Avro satisfies most of these.  I'll comment below.

>    1. Easy and intuitive IDL. No serial numbers, no manual versioning,
>       simple... avro is a good example for this.
>    2. Works with Java and Python

Check.

>    3. Supports both fast binary prorocol, as well as HTTP based restful
>       style. I'd like to be able to use it for both backend-to-backend
>       communication (java-java or python-java) as well as
>       frontend-to-backend communication (javascript to java).
>    4. The rest support needs to include &param=value input as get/post
>       requests (configurable per request) and output in three possible
>       formats: json, jsonp, XML.

Avro does not currently support url-encoded query-string parameters.  A 
Java servlet that does this could be added without too much difficulty. 
  Alternately, one might develop an Avro library in Javascript that 
could make binary requests.

One could also easily define an XML-encoding for Avro data.  However 
implementing it and maintaining in all languages might be difficult.  So 
I prefer to consider anything other than the binary encoding as optional 
for implementations.  Thus applications should generally use the binary 
encoding to ensure the greatest intercompatibility.

A JSON-encoding of Avro data is specified that could perhaps also be 
used to implement a jsonp-style approach.

>    5. Compact, fast, backward compatible, easy to upgrade etc...

Check.

>    6. Provides some nice monitoring interfaces such as: JMX, web page
>       status reports (e.g. packets in, packets out, error rate etc)

Avro Java has a statistics plugin.  This could be enhanced if there were 
particular values you require.

http://hadoop.apache.org/avro/docs/current/api/java/org/apache/avro/ipc/stats/package-summary.html

>    7. Ops friendly... no need to take the whole site down to release new
>       versions
> 
> ... other goodies are welcome...
> 
> Is there something out there?
> So far I've looked at thrift and avro and they are both nice in some 
> ways, but don't check all my list.

Doug