You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "John Roesler (Jira)" <ji...@apache.org> on 2020/05/14 17:27:00 UTC

[jira] [Commented] (KAFKA-9993) Think about inheritance in the protocol generation framework

    [ https://issues.apache.org/jira/browse/KAFKA-9993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17107487#comment-17107487 ] 

John Roesler commented on KAFKA-9993:
-------------------------------------

Thanks for the idea, Boyang. Can you clarify whether the problem is boilerplate code inside the auto generated class, or boilerplate code that we have to write when using the generated classes?

> Think about inheritance in the protocol generation framework
> ------------------------------------------------------------
>
>                 Key: KAFKA-9993
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9993
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Boyang Chen
>            Priority: Major
>
> We have seen that there are a lot of common fields inside the request/response templates that could be extracted as a super class for auto generated classes. For example most response contains a top level error code. Currently to build a service receiving multiple RPCs, the code template produces a lot of redundant error code extraction logic which is far from ideal. 
> What we want to discuss is whether to enable the general inheritance mechanism in this framework, what's the trade-off and complexity increase, and if there is any workaround just to make less boiler templates.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)