What is Windows Communication Foundation?

What we're looking at is at it's basic level a Service Oriented Architecture. It basically allows you to write services for other applications to use.  It combines COM, COM+, and MSMQ, .NET Remoting, ASMX, System.Messaging, and .NET Enterprise Services. The basic concepts of interoperability, performance, transactional support as well as security differ from client application to client application. WCF strives to meet the needs of different client applications.

Basically a WCF client and a WCF service use the WCF which addresses communication challenges between a service and a diverse range of client requirements. Microsoft identifies the following as the most important aspects of WCF:

  • Unification of existing .NET Framework communication technologies.
  • Support for cross-vendor interoperability, including reliability, security, and transactions.
  • Explicit service orientation.

WCF can communicate via Web Services using SOAP or messages like RSS.  The ability to communicate using SOAP enables WCF to communicate with a wide variety of clients which are not necessarily built using WCF. I found it highly interesting to come across WS Specifications which are used to add security features, end-to-end reliability, and transactional support  to the SOAP message.

Microsoft did some performance testing to compare it to .Net relevant technologies. (go.microsoft.com/fwlink/)  With WCF configured using BasicHttpBinding, the throughput performance of WCF was better than ASP.NET Web Services by 19%, 21% and 36% for 1, 10 and 100 objects in a message, respectively. When both operated over HTTPS,  WCF outperformed ASP.NET Web Services by 16%, 18% and 26% for 1, 10 and 100 objects in a message respectively. The results when compared to Web Services Enhancements  was even better.  .Net Enterprise Services and  .Net Remoting showed similar improvements in performance.

Installing WCF won't break pre-existing applications built in any of these .Net technologies. You do have to be aware of some interoperability issues with the WS specficiations. Migrating WSE 3.0 Web Services to WCF

Messaging

WCF is based on message passing communication. Messages of any type can be uniformly represented which means that WCF can utilize a single API across a variety of transport methods.  In WCF terms, a client sends a message and a  server responds to messages. Endpoints are points of contact for both services and clients. They describe in a standard-based way where messages should be sent, how they should be sent, and the messages format. A service might have multiple endpoints for different purposes. A client's endpoint would be compatible with one of the service's endpoints. 

In a larger picture, you can think of a service as a sort of communications center. It would accept calls from cell phones, telephones, and maybe even email.  On the other hand, each of those devices/applications only interact with one endpoint on the communications center.

At the core of any communication is the transport protocol. These can range from HTTP to TCP and those that support MSMQ nodes on a Peer Network. WCF is extensible so you can add more transport mechanisms as needed.

WCF natively supports the following message formats but is also extensible in this respect:

  • Text encoding, an interoperable encoding.
  • Message Transmission Optimization Mechanism (MTOM) encoding, which is an interoperable way for efficiently sending unstructured binary data to and from a service.
  • Binary encoding for efficient transfer.

WCF also supports messaging patterns as pertains to each message format. 

The easiest way for the beginner to think of WCF is to think of it as a large switchboard. Behind the switchboard are different functions that need to be reused by a variety of customers. Each customer might speak a different language and use different devices like a cell phone, a VoiP application, or a telephone. The WCF switchboard has endpoints configured that each of these customers can use to send messages to which the WCF switchboard responds.

For more fundamentals of WCF, I suggest the following article from Microsoft : Fundamental Windows Communication Foundation Concepts

And this is just the beginning...

Print | posted on Monday, December 01, 2008 12:25 PM

Feedback

No comments posted yet.

Your comment:





 
Please add 4 and 1 and type the answer here:

Copyright © Desirea Herrera

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski