avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AVRO-258) Higher-level language for authoring schemata
Date Fri, 18 Dec 2009 19:45:18 GMT

    [ https://issues.apache.org/jira/browse/AVRO-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792611#action_12792611
] 

Doug Cutting commented on AVRO-258:
-----------------------------------

First, I don't think we want to make such a tool a part of the spec: we don't expect there
to be more than a single implementation of it, do we?  Given that, we should implement it
such a way that it's available to the widest variety of platforms: Perl or Python might thus
be preferable to Java.

Support for comments and includes would we wonderful to have.

Another approach, rather than trying to make the syntax more Java-like, implementing a full
parser, is to just remove the most annoying things from JSON.  A good pre-processor that supports
includes, comments and made quotes optional would make things vastly more readable and functional.
 Beyond that, it starts to become lisp-versus-algol, unresolvable and a tremendous time sink.

If we wanted to get fancy, we could try to do more complex JSON transformations, like transform
"foo bar {}" (no comma) into "{type: foo, name: bar, ...}", and "a; b; c;" into [a, b, c],
etc.

{type: record, name: Foo, fields: [{name: f, type string}], java-class: FooImpl}
{type: enum, name: Bar, symbols: [X, Y, Z]}

become

record Foo { fields: string f {}; java-class: FooImpl}
enum Bar { symbols: X; Y; Z; }

A json-preprocessor approach lets us more easily support default values, metadata, etc, and
makes the transition to JSON easier for folks, since developers will see JSON-format schemas
too.  My first choice would probably be to simply support comments, includes and make quotes
optional.  That would gives us great bang for very little buck.  But I may not be able to
convince anyone else of this...

> Higher-level language for authoring schemata
> --------------------------------------------
>
>                 Key: AVRO-258
>                 URL: https://issues.apache.org/jira/browse/AVRO-258
>             Project: Avro
>          Issue Type: New Feature
>          Components: spec
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>
> Early users of Avro have noted that authoring schemas and especially protocols in JSON
feels unnatural. This JIRA is to work on a higher-level language that feels more like defining
interfaces and classes in Java/C/etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message