Showing posts with label WCF. Show all posts
Showing posts with label WCF. Show all posts

Friday, January 17, 2020

gRPC, a WCF Sibling?

I came across this term "gRPC " when talking to a CTO from UK. I heard of RPC but not "gRPC", so i did a quick search on Google and found out that it works similarly to Microsoft WCF, just that it supports different programming languages ranging from C++, C#, Ruby, Python, etc and it's developed by Google. WCF supports only .NET languages. To find out more here's a link https://stackoverflow.com/questions/35694273/whats-the-difference-between-grpc-and-wcf

One more thing that i would like to mention about WCF is, there's a community in the.NET Foundation that has started the effort to create an open source WCF (Currently WCF Client in development, but not the WCF core itself) targeting for .NET Core programming model. However it's still at a very infant stage and probably not ready for production use out of the box, unless user development team is willing to take on the extra effort to customize the codes and fix any new issues discovered.

The link to the WCF .NET Foundation https://www.dotnetfoundation.org/blog/2015/05/20/wcf-is-open-source

In ASP.NET Core, Visual Studio uses the Protobuf compiler to compile the proto code into C# code.
gRPC Web UI - https://github.com/uw-labs/bloomrpc which ease the testing for the gRPC service contract.

Sunday, October 20, 2019

Tip: Web API vs WCF - High Level

Location Concern
Within the company Network and .NET based clients : Use WCF with TCP binding (Fast communication than HTTP)
Outside the company Network, and use diverse technologies like PHP, Python, web UI etc: Use Web API with REST

Security Concern
WCF support WS- standard and SOAP protocal.
Web API is tighly coupled with http, so can only use http releated security measures.

Network languages
WCF support multiple protocols like SOAP, TCP, HTTP, HTTPS, Named Pipe, MSMQ,
Web API supports only http, https

Architecture
WCF can be used to build SOA compliance services due to the nature that it's able to support different protocols.
Web API is mainly used for front end integration, e.g. Web UI because of http protocol.


Message Format
WCF supports more message formats than web api, e.g. binary message formats
Web api supports text based message format e.g. JSON, XML

Speed
WCF offers faster speed than web api when the service and client sits in the same server. We can use tcp protocol to achieve fast message transfer.