This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

RPC Service Invocation

Perform direct, secure, service-to-service method calls.

    Introduction

    Invocation Logic

    The following diagram shows the RPC service invocation logic of Capa:

    • Service A is the service invoker, Service B is the service being invoked
    • Service A initiates a service call to Service B through the Capa SDK
    • Capa RPC API is a unified API specification
    • The specific RPC implementation RPC Impl of the Capa RPC API can be found through the SPI mechanism
    • Obtain the return data from Service B and return it to the service invoker Service A

    API Design

    Capa’s API design follows community standards:

    The meanings of specific parameters are as follows:

    ParameterMeaning
    appIdUnique service ID within the same namespace
    methodNameMethod name of the service being invoked
    requestService request to be sent for invocation
    httpExtensionHTTP request method
    metadataMetadata for sending requests (GRPC) or headers (HTTP)
    clazzType of request response
    typeType of request response
    invokeMethodRequestRequest object