this is also interesting to me. On Sat, Jun 10, 2017 at 6:09 AM <[email protected]> wrote:
> Hi Pamb, > > Any update about this? I'm looking in the same direction. > > Cheers, > Jorge > > On Thursday, June 30, 2016 at 1:34:24 PM UTC+3, Lasantha wrote: >> >> Hello Carl, >> >> Thanks for the reply. >> >> Actually I was looking for some thing like >> https://github.com/Netflix/Hystrix. However Hystrix is specific to Java >> and it does not support streaming APIs. I want to know whether there is any >> inbuilt mechanism in gRPC to handle this irrespective of the language of >> the client stubs. >> >> Example >> ------------- >> >> Lets say I have two mircro-services deployed separately. TaxService (Go) >> and PricingService (Java), which PricingService depends on TaxService. >> >> service PricingService { >> rpc getPrice (PricingRequest) returns (PricingResponse) {} >> } >> >> message PricingRequest { >> string productId = 1; >> } >> >> message PricingResponse { >> double price = 1; >> double tax = 2; >> } >> >> I will call TaxService to get the tax amount when calculating the price. >> However if TaxService is not available I want a fallback mechanism in the >> client side (ie within PricingService implementation). Basically I should >> be able to set something like a fallback handler in the TaxServiceClient >> stub for the getTax method. >> >> If there are too much fallbacks happening then client will automatically >> break the circuit between PricingService and TaxService for some time to >> prevent escalating failures. >> >> Best Regards >> Pamb >> >> On Wednesday, June 22, 2016 at 10:09:46 PM UTC+5:30, Carl Mastrangelo >> wrote: >>> >>> Not currently, assuming you are talking about running out of memory. >>> Our servers/ services tend to have hard memory limits that are preallocated >>> on start up and are never broken. If a server is running out of memory, >>> the solution is to just spin up more servers. >>> >>> That said, grpc Java tries to avoid memory allocation and usage, so the >>> overhead for the library is pretty small. You can implement your own >>> marshaller using SoftReferences if you would like. There is an advanced >>> example showing how to write your own marshaller here >>> <https://github.com/grpc/grpc-java/blob/d9d4d8b70f68dce0a0ee4e3d93acee82f5153d54/protobuf/src/main/java/io/grpc/protobuf/ProtoUtils.java#L80>. >>> Be warned that this is pretty advanced and you shouldn't use it until you >>> really need to. >>> >>> On Monday, June 20, 2016 at 2:36:53 AM UTC-7, Lasantha wrote: >>>> >>>> Hi, >>>> >>>> Is there any in-build feature in gRPC java client to handle circuit >>>> breaking ? >>>> >>>> Best Regards, >>>> Pamb >>>> >>> -- > You received this message because you are subscribed to the Google Groups " > grpc.io" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/grpc-io. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/8da02fa3-a528-4712-baed-891e6857e57b%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/8da02fa3-a528-4712-baed-891e6857e57b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAD7-yfsOxAi-aAk3wnybuV3346%3DxniWE1_aM6DeDtUUHrAhDcw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
