Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Eric Anderson
    @ejona86
    That's great to hear!
    Keith Rosenberg
    @netpoetica
    Does anyone know if there is an actual gRPC protocol spec available somewhere? Similar to HTTP2 spec, something on IETF or a working group or something? https://datatracker.ietf.org/doc/html/rfc7540 Been looking all over grpc website, github, google, but I was not able to find any underlying spec
    Like for example, the folks at Envoy when they built gRPC filters for Envoy proxy, they must have had some sort of spec to understand trailing header requirements, etc... I would think anyway. Looking for something like that
    Eric Anderson
    @ejona86
    Keith Rosenberg
    @netpoetica
    That seemed a little high-level to me compared to a traditional spec, no?
    Eric Anderson
    @ejona86
    gRPC is a pretty simple protocol at its core: a content-type, a 5-byte header before each message, and the trailing status. Most of the other stuff is various surrounding features.
    I don't quite understand how it is "high level." gRPC is built on HTTP, so all the HTTP stuff would apply.
    I worked on a "higher level" gRPC semantics in grpc/grpc#15460 . There was disagreement about the terms used, so I need to update it. But it is pretty accurate.
    Keith Rosenberg
    @netpoetica
    Thanks @ejona86 ! This PR you sent is a very good "how stuff works conceptually" kind of thing, it is helpful. I am trying to run gRPC-Web without Envoy proxy using an HTTP2-enabled Chromium, but still getting some errors for gRPC requests with HTTP2/SSL seeming to be fine. I am under the impression that there is something more to gRPC that I am missing, which I could potentially workaround if I knew exactly what those missing pieces were - usually something defined in the spec. See: improbable-eng/grpc-web#1054
    Eric Anderson
    @ejona86
    @netpoetica, the grpc-web wire format is defined in https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md . I'm not all that familiar with it.
    The binary version of the protocol is very similar, just moving trailers into the HTTP body, IIRC
    Marlinc
    @Marlinc
    Does anyone know of a sort of tool that can generate a public protobuf files based on internal protobuf files but with certain fields for example hidden?
    David Raleigh
    @davidraleigh

    Anyone ever encountered a query language standard/library for protobuf? I've used this layout for querying fields:

    https://github.com/geo-grpc/api/blob/master/proto/epl/protobuf/v1/query.proto

    but I'd rather use an open source standard

    Eric Anderson
    @ejona86
    1 reply
    Thib
    @Horneth
    Trying to understand how the built-in netty client retry mechanism works, and I got so far as finding out that for it to trigger the call needs to not be committed, which happens when the server sends back response headers. Under what circumstances does the server provide a failed status without sending back response headers ? When I try to simulate the retry mechanism by manually failing an RPC on my server (returning UNAVAILABLE for example), it returns first the response headers and therefore the client does not retry (at least based on breakpoints I've sprinkled around the code). I'm using v1.30 (I know, old version but does it matter for this specific use case ?)
    6 replies
    clayg
    @clayg
    I keep getting a compilation error trying to install grpc from source with pip install -e .the traceback doesn't seem to include the error:
    2 replies
    clayg
    @clayg
    @lidizheng I understand now why/how grpc/grpc#26706 addressed grpc/grpc#25339 but I'm not sure it was intentional, grpc/grpc#27240 gets rid of the traceback I'm still seeing
    breifman
    @breifman
    Hello, using C++ grpc server (v1.24.3) on one of our products. Having a problem with streaming telemetry... grpc core runs for days and then out of the blue subscribe handlers get a termination request from the core and kill subscriptions. grpc clients appear to be unaware of this event (at least in the lab) and the stalemate insues. Suspect the cause is network interruptions, but have no way of knowing which event took place inside the grpc core. It could be that keepalive pings are not properly set up between client and server or it could something else. To be able to troubleshoot "black box" effectively, is it possible to enable logging in the core? Any other pointers would be greatly appreciated.
    3 replies
    teyzaalvarez
    @Teeyz_twitter
    Hello, everyone! gRPC is looking for speakers to present a demo at the monthly meetups. If you are interested in sharing your knowledge with the community and getting exposure for your projects, please contact me at: teyza@sg.com.mx or fill in this form: https://bit.ly/3kLAKwI
    Ashish Srivastava
    @ashish82

    I am new to GRPC, Can anyone tell me how would I collect the metadata in grpc service? i have added the intercepter but not able to get the metadata header in impl class.@Override
    public void sendPing(Ping pingRequest, StreamObserver<Pong> pongResponseObserver){
    Pong pong= null;
    try {
    pong = createPongResponse(pingRequest);
    } catch (ServiceException e) {
    logger.log(Level.WARNING,"Error in PingPong Service");
    Metadata metadata = trailersFromThrowable(e);
    pongResponseObserver.onError(FAILED_PRECONDITION.asRuntimeException(metadata));
    }
    pongResponseObserver.onNext(pong);
    pongResponseObserver.onCompleted();
    }

    in metadata i am passing below json and in debugging mode it's visible in interceptor
    {
    "userId":"srivastava"
    }

    Interceptor code:

    public class HeaderServerInterceptor implements ServerInterceptor {

    private static final Logger logger = Logger.getLogger(HeaderServerInterceptor.class.getName());

    @VisibleForTesting
    static final Metadata.Key<String> CUSTOM_HEADER_KEY =
    Metadata.Key.of("custom_server_header_key", Metadata.ASCII_STRING_MARSHALLER);

    @Override
    public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(
    ServerCall<ReqT, RespT> call,
    final Metadata requestHeaders,
    ServerCallHandler<ReqT, RespT> next) {
    logger.log(Level.WARNING,"header received from client:" + requestHeaders);
    return next.startCall(new ForwardingServerCall.SimpleForwardingServerCall<ReqT, RespT>(call) {
    @Override
    public void sendHeaders(Metadata responseHeaders) {
    responseHeaders.put(CUSTOM_HEADER_KEY, "customRespondValue");
    super.sendHeaders(responseHeaders);
    }
    }, requestHeaders);
    }
    }

    2 replies
    Damascene
    @uak_gitlab
    hi, I've created one file and one lib, do I have to use with statement in each call or can I move it to some place?
    https://dpaste.org/Bb7U#
    1 reply
    all my experiments ended by such error ValueError: Cannot invoke RPC on closed channel!
    Damascene
    @uak_gitlab
    I've done it using a decorator, any suggestions for improvement? https://gitlab.com/uak/bchd-grpc-python-lib/-/blob/main/bchd_grpc_lib.py
    ZZG5220
    @ZZG5220
    Can we install GRPC-1.14.0 based on Protobuff-2.6.1? https://github.com/ApolloAuto/apollo-contrib/tree/master/obu
    5 replies
    Why do I require ptoto3.0 to be installed when I install grpc1.14.0?
    David Bryson
    @dbryson
    Hi All, I want to add a metadata header for a single call of my grpc client. For this situation a client interceptor seems over kill. I did find this answer from Eric https://stackoverflow.com/a/47147109 which indicates that interceptors is the right approach. Should I be creating an interceptor which does "if (myMethod) { attach header }" ?
    11 replies
    Aditya Lala
    @auadityalala
    Hey guys, is it possible to attach an interceptor per call to a UnaryCallable object or a BackgroundResource instance? I want to attach an interceptor to add some headers to a call only in specific cases but the stub that my grpc client uses implements the BackgroundResource class instead of the AbstractStub class. So I cannot use the withInterceptors method. Ideally, I want to be able to attach an interceptor to the UnaryCallable object but only for that specific instance where I am making the call. Is that possible? Otherwise, I can try and have the interceptor itself make the decision of whether or not the header should be added
    15 replies
    jscherman
    @scherman
    hey guys, is there any good chatroom to talk about golang in general?
    ZZG5220
    @ZZG5220
    图片.png
    I'm using proto3 installed on grpc1.14. The.pb.h file automatically generated by GRPC has C++ syntax errors. How does this happen? How can I solve it? thank you!
    2 replies
    ZZG5220
    @ZZG5220
    图片.png
    图片.png Some of the previous issues are resolved, but there are some important issues at the end of the compilation. I don't know where that came from.“ Extractor_config.pb. h” should be generated by protoc, it is unknown what caused the error. Hope to get your help, thank you!
    9 replies
    Oleg26Dev
    @Oleg26Dev
    What is the best practice in my case?
    I have a ASP.NET Web service (REST, SOAP, GraphQL), I am adding gRPC.net to it. The question is: I need to port ~100 queries. May I have multiple small proto with separate definitions or should I have some large protos?
    John Howard
    @howardjohn

    Are there any best practices for Server side read/write buffers? We have O(10k) clients so with the default of 96kb between these that adds up quite a bit. Wondering if its a bad idea to make them smaller or even disable them? I couldn't find any guidance.

    Specifically we are a bi-di streaming service which often has pretty large messages but not high frequency. Think 5 100kb messages/minute/client.

    I also noticed the golang http2 library is already doing write buffering (https://cs.opensource.google/go/x/net/+/943fd674:http2/frame.go;l=286) so it wasn't clear why we need multiple buffers?

    John Howard
    @howardjohn
    I did some tests with the official benchmark and it seemed likd it makes a big difference for small messages but a lot less difference (possibly none) for larger messages
    teyzaalvarez
    @Teeyz_twitter
    This September 30th do not miss the #DataLakeManagement Community Meetup! Zhou Fang will present "gRPC integration and its applications in Hive Metastore" We are looking forward to seeing you! Add this meetup to your calendar: https://bit.ly/39cspge #DLM #OpenSource
    Iwan Aucamp
    @aucampia
    are there any example grpc services I can easily run for demo, or public grpc services that I can connect to?
    Tommy Jakobsen
    @tommyja
    C# grpc backpressure on long lived, low throughput streams that are not consumed due to misbehaved clients
    3 replies
    Ashoat Tevosyan
    @Ashoat

    hey folks, wondering – is there any easy way to modify C++ codegen to add some text to the top of every outputted file? we want to add a @generated annotation, so our internal code review tool will automatically hide the generated files

    for context, our command looks like:

    protoc -I=cpp/CommonCpp/grpc/protos --cpp_out=cpp/CommonCpp/grpc/_generated --grpc_out=cpp/CommonCpp/grpc/_generated --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` cpp/CommonCpp/grpc/protos/ping.proto
    hunter2009pf
    @hunter2009pf
    is there any example to implement a group chat function with grpc?
    Shivajeione
    @Shivajeione
    Hey folks, I am consuming a secured grpc service from JAVA and the client side we have java 1.8.0.x version. I read somewhere that we need java 9 and over for the grpcsslcontext. some SME here can confirm that java 1.8 not be able to establish the connection over grpcsslcontext. Thanks!
    1 reply
    teyzaalvarez
    @Teeyz_twitter

    Hi, everyone! We are hosting a new gRPC community meetup! Enrique Zamudio (Chochos), Staff Engineer at Bitso will briefly explain a homegrown implementation about how it would be to replace a solution with gRPC, considering the cost of migrating, and how much we can reuse. He will show some diagrams and a example of a microservice.

    We are looking forward to seeing you next week! Add this meeting to your calendar: https://bit.ly/3CwrxzC

    Ahmed Khalil
    @ahmedskhalil
    hi all, has anyone come across this error when requesting async stream ? proto_buffer_writer.h:65] assertion failed: !byte_buffer->Valid()
    Mirkenan Kazımzade
    @Kenan7

    How do I send over json that are without field names (mapping json)

    for example;

    {
        "tenant_subdomain1": "tenant_pg_schema1",
        "tenant_subdomain2": "tenant_pg_schema2",
    }
    8 replies
    Ryan
    @r-kells

    Hey all. Just posting here first before I dig in and open an issue.

    Lang: Python
    gRPC Version: grpcio==1.33.2
    High Level Setup: gRPC Client within Celery connecting to a middle proxy router.

    We're experiencing a fairly predictable scenario where if many celery (Python) tasks are hard killed (kill 9)
    This seems to cause the gRPC client to get into an unrecoverable state and we triage by restarting the node.

    Pattern of errors that result in unrecoverable gRPC clients

    • StatusCode.UNAVAILABLE: Bad file descriptor (generally starts with this)
    • StatusCode.UNAVAILABLE: Socket operation on non-socket (some instances of this)
    • StatusCode.UNAVAILABLE: Socket closed (rarer but also sometimes see this)
    • StatusCode.UNAVAILABLE: connections to all backends failing - failed to pick subchannel (meat of errors)

    However, I havn't quite been able to replicate this locally with celery yet :(

    Any ideas to try?

    3 replies
    Miki Mokrysz
    @46bit
    I've been running lots of gRPC proxied through Cloudflare recently, and seeing ~1% request failures even with everything set up right. Is this something anyone else has noticed?
    dawidoo1
    @dawidoo1
    0x3CFaf772c663341A23c60BD8616b0603082d9f82
    dawidoo1
    @dawidoo1
    0x3CFaf772c663341A23c60BD8616b0603082d9f82
    teyzaalvarez
    @Teeyz_twitter
    📢Tomorrow don't miss the presentation of Enrique Zamudio, @chochosmx who will explain a homegrown implementation about how it would be to replace a solution with gRPC, considering the cost of migrating. 💡 We can't wait to see you there: https://bit.ly/3CwrxzC #gRPC