GithubHelp home page GithubHelp logo

Comments (4)

iamqizhao avatar iamqizhao commented on May 18, 2024

I still do not understand why you require an interceptor ... It was deliberate to abandon interceptor in our design.

from grpc-go.

hongchaodeng avatar hongchaodeng commented on May 18, 2024

NP. Let me try to explain better.

In TCP socket, we send bytes:

send(b []byte)

Now that we have protobuf and grpc, we want to send messages instead.

send(msg proto.Message)

The send(msg) API is provided by the framework, and message should be defined by user.

I wonder how can we do it efficiently without letting user define msg/rpc on their own?

from grpc-go.

iamqizhao avatar iamqizhao commented on May 18, 2024

pls tell me how interceptors can help you address this issue?

We typically provide send(b []byte) to users instead of send(proto.Message)
which provides more flexibility and the framework should not care what
users will to transmit.

If you are thinking about the encoding efficiency (e.g., memory alloc and
string copying), I think it is the work of protobuf should take care of.
And I guess it is doable but it does not do because it will introduce
tremendous complexity regarding memory model.

On Mon, May 11, 2015 at 1:55 PM, Hongchao Deng [email protected]
wrote:

NP. Let me try to explain better.

In TCP socket, we send bytes:

send(b []byte)

Now we have protobuf and grpc, we want to send messages instead.

send(msg proto.Message)

The send(msg) API is provided by the framework, and message should be
defined by user.

I wonder how can we do it efficiently without letting user define msg/rpc
on their own?


Reply to this email directly or view it on GitHub
#187 (comment).

from grpc-go.

iamqizhao avatar iamqizhao commented on May 18, 2024

I guess calling Invoke(...) directly can fit your needs?

from grpc-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.