[
https://issues.apache.org/jira/browse/AVRO-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004467#comment-13004467
]
Gilles Gaillard commented on AVRO-777:
--------------------------------------
The attached file contains a patch and implements partial support for RPC with
Avro-C based on r1063596 and relies on the patch previously submitted in
AVRO-767.
It enables generation of C code based on the avdl definition and Velocity
templates. This is implemented using ant tasks:
- an 'idl' task to generate code - see the provided classes IdlTask.java and
CHelper.java
- common-ipc-avro.xml is an example of how to use this ant task together with
the ProtocolTask and SchemaTask
- velocity templates:
- c_macro.vm, c_protocol_body.vm, c_protocol_header.vm: support for C code
generation
- java_enum.vm: support for the 'partial' RPC (see below)
RPC support is partial, as the AVRO protocol is only partially implemented:
- handshake is not implemented, assuming that both sides have the same version.
- metadata not included in the message
- message discriminant is an int instead of the name of the message
(this explains why we generate a java enum for the messages).
- only oneway messages are supported
The patch for the C code contains a generic reader and writer.
All basics types are supported except fixed, array, map, float and double.
The rpc part is managed in rpc.c.
> Avro-C: support for RPC
> -----------------------
>
> Key: AVRO-777
> URL: https://issues.apache.org/jira/browse/AVRO-777
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.4.1
> Reporter: Gilles Gaillard
> Fix For: 1.5.1
>
> Attachments: AVRO-777-rpc-c.zip
>
>
> Provide support for RPC with Avro-C
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira