Closed VenkateshSrini closed 5 years ago
Hi
I'm not familiar with WCF's transaction support. Are you using this? https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/servicemodel-transaction-attributes
gRPC uses HTTP/2 for the underlying transport. If a call is still in progress then you could cancel a call, which would send a cancellation request to the server that you could listen to. However in gRPC there isn't an equivalent for sending a commit message.
So what is the guidance for migrating such distributed transaction (WS atomic transaction) with gRpc. I'm talking something like https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-create-a-transactional-service. You can about WS-AT here
I don't know of an equivalent to WS atomic transaction in gRPC.
There's nothing built in (and likely will never be). Using sagas might help here https://microservices.io/patterns/data/saga.html
None of the gRPC implementations has transaction support. Transactions are a higher level concept than gRPC. Also, gRPC is meant to be general-purpose RPC framework and transactions are a pretty specific concept. You could probably implement a library that uses gRPC and adds transaction support on top of it, but it's probably never going to be part of gRPC itself.
Hi, Thanks for all your comments. Is there any such library that you can point me to. I want that to be in .NET core preferably .NET core 2.1 or later
@VenkateshSrini check this out https://github.com/googleapis/googleapis/blob/master/google/ads/googleads/v4/services/google_ads_service.proto#L207
Hi All,
I see many thoughts that say that gRpc could be a replacement for WCF services. With cloud computing in place I like the idea. But we started migrating on project, we are struck in place where we will have to handle transaction. In gRpc is there a way we can create a transaction context and attach it to each service call, and then, when we will have to rollback, we just say commit or roll back from transaction context ? I'm asking two phase commit with client being the transaction coordinator. That would remove any broker or middleware for this purpose