GithubHelp home page GithubHelp logo

Comments (7)

ParkMyCar avatar ParkMyCar commented on May 13, 2024 2

I think this would be pretty interesting to build, if no one else is already working on it, I can try to put up a PR in a bit?

Aside from timeouts, there's also cancelation. Is there a story around this yet in tonic?

from tonic.

Sushisource avatar Sushisource commented on May 13, 2024 2

Huge +1 here. In particular I need support for setting them on the client. Adding them manually appears to not work, since it looks like all the GRPC_RESERVED_HEADERS are silently stripped (which isn't so fun) as mentioned in #516. If there's anything I can do to help @LucioFranco I am happy to do so.

from tonic.

LucioFranco avatar LucioFranco commented on May 13, 2024

Hi Yes, this should be possible by implementing a custom service layer that reads the initial headers and wraps its inner future with a timeout.

from tonic.

LucioFranco avatar LucioFranco commented on May 13, 2024

I think the right method would be to create a version of https://github.com/tower-rs/tower/tree/master/tower/src/timeout that gets the timeout from a header rather than a static value.

from tonic.

Maher4Ever avatar Maher4Ever commented on May 13, 2024

@LucioFranco Hi, is there an update regarding cancellation support in tonic?

from tonic.

LucioFranco avatar LucioFranco commented on May 13, 2024

No updates from my end yet, its easy to support cancellation by dropping the task but we currently do not parse the headers for a timeout automatically.

from tonic.

liufuyang avatar liufuyang commented on May 13, 2024

I feel I need to set deadline or timeout on client as well, otherwise my Rust client cannot talk to our Java gRPC servers as they are build to require having deadline specified.

from tonic.

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.