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

ASF GitHub Bot commented on GEODE-3213:
---------------------------------------

Github user kohlmu-pivotal commented on a diff in the pull request:

    https://github.com/apache/geode/pull/646#discussion_r128567505
  
    --- Diff: 
geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/utilities/ProtobufResponseUtilities.java
 ---
    @@ -67,30 +68,27 @@
        *        {@link ProtobufUtilities}
        * @return A response indicating the passed value was found for a 
incoming GetRequest
        */
    -  public static ClientProtocol.Response 
createGetResponse(BasicTypes.EncodedValue resultValue) {
    -    RegionAPI.GetResponse getResponse =
    -        RegionAPI.GetResponse.newBuilder().setResult(resultValue).build();
    -    return 
ClientProtocol.Response.newBuilder().setGetResponse(getResponse).build();
    +  public static Success<RegionAPI.GetResponse> createGetResult(
    +      BasicTypes.EncodedValue resultValue) {
    +    return new 
Success<>(RegionAPI.GetResponse.newBuilder().setResult(resultValue).build());
    --- End diff --
    
    could we replace these types of calls with inline `Success.of(EncodedValue)`


> Refactor Protobuf Serialization Implemenation
> ---------------------------------------------
>
>                 Key: GEODE-3213
>                 URL: https://issues.apache.org/jira/browse/GEODE-3213
>             Project: Geode
>          Issue Type: Improvement
>          Components: client/server, serialization
>            Reporter: Udo Kohlmeyer
>
> In the Protobuf serialization implementation, there are some refactorings we 
> want to make:
> * OperationHandlers take OperationRequest and OperationResponse message, not 
> the parent Request/Response Object
> * A generic flow needs to be implemented that all OperationHandlers follow. 
> No bespoke flows for any OperationHandlers... way too much maintenance
> * Use Functional semantics to configure the functionality to extract 
> OperationRequest from Request (per OperationHandler)
> * Use Functional semantics to configure the functionality to populate 
> OperationResponse in the relevant Response
> * Have generic Error Handling framework to populate "known" errors and error 
> codes



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to