gogen-avro icon indicating copy to clipboard operation
gogen-avro copied to clipboard

avdl vs avsc files and Golang

Open andrewarrow opened this issue 5 years ago • 2 comments

Seems most Golang Avro uses JSON not the avdl format. Looking around I found:

https://github.com/apache/avro/blob/8026c8ffe4ef67ab419dba73910636bf2c1a691c/lang/java/tools/src/main/java/org/apache/avro/tool/IdlToSchemataTool.java

As the java implementation to parse a avdl file. And I see them in javascript (https://github.com/keybase/node-avdl-compiler) and few other languages but not Golang. Not in this package or https://github.com/linkedin/goavro.

If I wanted to have Golang read in avdl files directly, I would have to author that Golang code right? Just wondering if there is some prior art out there before I start that. Thanks!

andrewarrow avatar Jun 17 '19 05:06 andrewarrow

Hey @andrewarrow, AVDL is an Interface Description Language - it's for RPCs and not just serializing data. gogen-avro doesn't currently support any RPC functionality, although I'm not against adding some or all of the AVDL spec:

  • generating records from AVDL syntax is a starting point
  • method stubs for callers
  • a server implementation

But if you want to PR just the first one it's a worthwhile addition, as long as the docs are clear about the limitations.

actgardner avatar Jun 18 '19 02:06 actgardner

makes sense! I see, thank you. I started:

https://github.com/andrewarrow/avdl_to_golang

andrewarrow avatar Jun 18 '19 04:06 andrewarrow