Giter Club home page Giter Club logo

Comments (8)

ignasi35 avatar ignasi35 commented on June 4, 2024 1

After digging a bit more on the topic, I've found a discussion hinting the grpc-java client can support circuit breaking via Interceptors (the discussion links to a PoC in Kotlin using resilience4J).

Using Interceptors is more convenient than my suggestion above because it sets up the circuit breaker per gRCP client automatically (instead of having to wrap every call on the client).

from akka-grpc.

He-Pin avatar He-Pin commented on June 4, 2024 1

Hey, any updates on this?

Pr is welcome๐Ÿ˜ƒ๐Ÿ˜ƒ๐Ÿ˜ƒ

from akka-grpc.

ignasi35 avatar ignasi35 commented on June 4, 2024

Some mental notes:

A gRPC client has a Channel instance connecting the client to a single remote host and that Channel is shared across several calls.

Lagom's CircuitBreakingServiceLocator offers a different circuit breaker instance for each call on a remote service. Different approaches could be: (1) per remote service or (2) per remote instance. Maybe akka-grpc could consider supporting all 3 alternatives in the future.

Akka provides general purpose circuit breakers so users can manually setup circuit breaking around their GrpcService calls if they want to.

Lagom provides a general purpose circuit breaker panel and also promotes ServiceLocator implementors to extend CircuitBreakingServiceLocator which keeps circuit breaking a bit hidden but still exposed to users via Settings. CircuitBreakingServiceLocator looks up a service instance and then runs userland code wrapped on a circuit breaker.

from akka-grpc.

yahor-filipchyk avatar yahor-filipchyk commented on June 4, 2024

gRPC project has this approved proposal for retries that includes retry throttling. I think it'd be nice if akka-grpc client could use the configuration and semantics written in the proposal, opening the door for future full support of gPRC standard, including service config discovery via the DNS or other service discovery mechanisms.

from akka-grpc.

raboof avatar raboof commented on June 4, 2024

I agree this is an area where the Akka gRPC client can be improved! We should definitely look at the linked proposal, but also remember to look for the best ways to translate this into Akka ecosystem concepts (such as akka-discovery and eventually akka-http)

from akka-grpc.

ignasi35 avatar ignasi35 commented on June 4, 2024

The implementation based on an Interceptor (in #1118) is not competing with the proposal but an alternative available in simpler deployments (where not DNS or similar config delivery mechanisms exist).

from akka-grpc.

ignasi35 avatar ignasi35 commented on June 4, 2024

Hmm, maybe another possible approach would be to wrap the method invocations in the generated code?

The generated code fora client has access to, for example, the GrpcClientSettings.

from akka-grpc.

exp0nge avatar exp0nge commented on June 4, 2024

Hey, any updates on this?

from akka-grpc.

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.