On Fri, Jun 18, 2010 at 2:12 PM, Eric Evans <eev...@rackspace.com> wrote:
> On Fri, 2010-06-18 at 11:00 -0700, Paul Brown wrote:
>> At the risk of asking about religion (but with no interest in hearing
>> about it), why Avro instead of something like plain-old-JSON over
>> HTTP?
>
> At the risk of having this thread veer off on a very long tangent...
>
> In a nutshell, we need a way of processing requests and responses over
> the network with typed data. You could of course put something together
> to do this using JSON and HTTP, but not without reimplementing another
> framework like Avro or Thrift (both of which can do JSON encoding, and
> both of which have an HTTP transport).

Not that I wanted to criticize choices, but do they actually allow use
of JSON as encoding?
Avro does use JSON for specifying schemas, but I wasn't aware of being
able to use it for encoding data.
Likewise with Thrift.

I think there's also important question of whether schemas/formatting
choice for payload should follow that of framing.
Avro/Thrift/PB seem reasonable for framing, use by protocol itself;
but for open payload it might make sense to allow different pluggable
formats.
Mostly because Avro/Thrift/PB are schema-bound formats which is not an
optimal choice for many use cases (but are fine for many others)
It is of course possible to just use byte[]/String as payload, handle
encoding and decoding on client end, and maybe that's how it should
be, for cases where strict schema doesn't work for use cases.

-+ Tatu +-

Reply via email to