Skip to content

support duplexing pipeline #1

@zavakid

Description

@zavakid

Implement a two-way pipeline to solve request/response-like scenarios.

e.g.

interface RequestOperation {
    Future invoke(Request request, RpcContext ctx)
}

interface ResponseOperation {
    Future onResponse(Request request, Response response, RpcContext ctx)
}


interface RPCHandler extends RequestOperation, ResponseOperation {
}

after apply @AutoPipeline to RPCHandler (we need to add some metadata for auto-pipeline) :

  • invoke method will start from head to tail
  • while onResponse will start from tail to head
  • may be invoke and onResponse operation will in separate interfaces, and some handler can just implement one of the interfaces
  • auto-pipeline will auto detect whether the handler is duplexing or not, and will call or skip the handler adaptively

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions