Hi Pamb, Do we have any update on this?
On Thursday, June 30, 2016 at 3:34:24 PM UTC+5, 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 grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/12936ea3-cfa2-4b20-bf66-8949a1b3b3c9o%40googlegroups.com.