[grpc-io] Is there a tool like Fiddler that works for analyzing GRPC traffic?

2018-02-08 Thread nicholas . dipiazza
I'm just curious I haven't tried it yet or anything but... For Http1.1 traffic it's always been a pretty useful tool to launch Fiddler to analyze http network traffic of a running program. But what about for Http2 with GRPC? We can use Wireshark but it is a so much more low-level than Fiddler,

Re: [grpc-io] Re: How to read grpc command line tool error messages from the responses?

2018-02-08 Thread Dino Wernli
Apologies for the shameless plug, but another option would be to try polyglot from the grpc-ecosystem . Based on the example call made in the thread above, it seems that polyglot has all the requir

[grpc-io] Problem of request validation by hash signature.

2018-02-08 Thread highfly22
Hi, I try to use call credentials to verify the request sanity: In the client, serialize the request to string, sign the string, and send the signature as metadata. In the server, serialize the request to string, sign the string, sign t

Re: [grpc-io] Re: GRPC Server Threading

2018-02-08 Thread Marios-Evaggelos Kogias
Thank you very much for your reply Vijay. So just to make it clear, any thread can call epoll and then do network and application processing. Is there a way you allocate connections per threads or all threads have all connections in their epoll group and connections are protected by locks to avoid

[grpc-io] gRPC to stream binary image data from database: Intended use case or not?

2018-02-08 Thread jorn . baayen
Dear all, We have recently been investigating various RPC technologies that would help us query and transfer data between a database server containing image data, and a client. For HBase, Thrift is typically used for this. But our benchmarks show that the current version of gRPC also performs

[grpc-io] Re: gRPC to stream binary image data from database: Intended use case or not?

2018-02-08 Thread Benjamin Krämer
Hi Jorn, I did some tests with larger amounts myself and it just seems to work fine. Not sure about the plans for future releases. gRPC has a maximum message limit that defaults to 4 MB but that you can adjust (as send limit and receive limit). You may want to have a look at this GitHub issue t

[grpc-io] Re: Problem of request validation by hash signature.

2018-02-08 Thread Benjamin Krämer
I haven't used the python API and don't know if and at what level intercepting is implemented. But it sound's like a better plan to do this based on the transmitted data (client: after serialization, server: bevore deserialization) instead of manually serializing it. Am Donnerstag, 8. Februar 2

Re: [grpc-io] Re: GRPC Server Threading

2018-02-08 Thread 'Vijay Pai' via grpc.io
Hi there, @sreecha actually produced a detailed document on this at https://github.com/grpc/grpc/blob/master/doc/epoll-polling-engine.md . I'd highly recommend it if you're interested in how gRPC C++ core's polling works. Regards, Vijay On Thursday, February 8, 2018 at 2:07:06 AM UTC-8, Mario

[grpc-io] Re: [C++] Standalone example of mixing sync and async methods on a service?

2018-02-08 Thread aajtodd
I too would be interested in a more straightforward example that isn't so tied to the GRPC test framework. Also it would be helpful to understand the threading implications of a C++ service that mixes sync and async methods. My understanding is that a thread pool is provided for sync services b

Re: [grpc-io] Re: USB transport

2018-02-08 Thread Robert Bielik
Mark, as Abhishek mentioned, it is quite useful in cases where a target device (usually embedded) has no networking. Thanks Vijay, I'll have a look at your suggestions. Regards /Robert 2018-02-07 22:31 GMT+01:00 'Vijay Pai' via grpc.io : > As Mark mentioned, it's not on our roadmap, but if you w

[grpc-io] Re: How to build GRPC with third party supplied from system

2018-02-08 Thread 'Nicolas Noble' via grpc.io
So you are in that bad situation where you have a local version of protobuf, but your pkg-config doesn't know about it. Try overriding HAS_PKG_CONFIG to false: make HAS_PKG_CONFIG=false this will force the detection to happen using invocation of the protoc tool instead of relying on pkg-config

Re: [grpc-io] Re: Managing linux devices

2018-02-08 Thread John Pearson
Makes sense, thanks for the explanation. I see tunneling is being worked on: https://github.com/grpc/grpc/issues/14101 Question: When I have 15 clients all connected in a bidirectional stream, how does the Server send a message to a particular client? For example in my case: Server needs to tell a

Re: [grpc-io] Re: Managing linux devices

2018-02-08 Thread 'Carl Mastrangelo' via grpc.io
The client would need to self identify by setting a header when it initiates the RPC. If you are using auth tokens, you could maybe put the identity in the token. When the client makes an RPC, the server decodes the token and associates the stream with the client. Another option (as mentioned i

Re: [grpc-io] Re: Managing linux devices

2018-02-08 Thread John Pearson
I've been checking out the interceptor pattern. Tokens, certificates, metadata make sense to me. I'm confused about "the server decodes the token and associates the stream with the client". Once a client ID info in any way, it's unclear to me how the server associates a stream with a client and the

Re: [grpc-io] Re: Managing linux devices

2018-02-08 Thread 'Carl Mastrangelo' via grpc.io
In go (and I may be mistaken), I believe authentication is pulled out of the headers and put into the Context. When you get the initial metadata on the server side, you can look in the Context for the auth. To issue commands to the particular client, the server would need to maintain a map of cl

Re: [grpc-io] Re: Managing linux devices

2018-02-08 Thread John Pearson
Awesome. Thanks for taking the time to code that up. I plan on trying to implement this today/tomorrow. I will report back. On Thu, Feb 8, 2018 at 3:13 PM, Carl Mastrangelo wrote: > In go (and I may be mistaken), I believe authentication is pulled out of > the headers and put into the Context.

[grpc-io] Re: Is there a tool like Fiddler that works for analyzing GRPC traffic?

2018-02-08 Thread 'Carl Mastrangelo' via grpc.io
Disclaimer: I work on gRPC so my opinion is quite biased. Debugging is difficult from an external program for a few reasons: 1. Traffic is usually encrypted. HTTP/2 forces us to use ciphers that can't easy dump the TLS keys to disk for use with wireshark or other. This is a security feature

[grpc-io] Re: gRPC to stream binary image data from database: Intended use case or not?

2018-02-08 Thread 'Carl Mastrangelo' via grpc.io
Yes, yours is an intended use case. gRPC has some advantages here compared to Websockets that would help you: 1. RPCs can use application level flow control to control how fast data is sent. For example, if you were sending 1GB of data, but the remote side didn't have enough memory to store

[grpc-io] Re: Problem of request validation by hash signature.

2018-02-08 Thread 'Carl Mastrangelo' via grpc.io
To do this, you'll need to wrap the serialized proto. Actually, you don't even need to put the signature in the headers. For example: message Wrapper { bytes signature = 1; bytes message = 2; } >From the client: 1. Serialize your messsage 2. Put this in field 2 3. Sign the messa

Re: [grpc-io] Re: Problem of request validation by hash signature.

2018-02-08 Thread Haiwei Zhou
Thanks for replying. TLS had been adopted, otherwise call credentials cannot be used. A RPC service is designed to handle core logic. A Web service provides UI to proxy user request to the RPC service. Then a request signature should be introduced to verify the real authorization. Using customiz

Re: [grpc-io] Re: Problem of request validation by hash signature.

2018-02-08 Thread 'Carl Mastrangelo' via grpc.io
One thing to realize is that Protobuf is not always going to serialize the message the same way, so you'll need to use raw bytes to wrap the message anyways. I'm surprised that the interceptor is a lot of boiler plate; what language are you using gRPC with? Lastly: gRPC is protobuf agnostic. Yo