Pages

Thursday, 5 July 2012

WCF Architecture

Windows Communication Foundation Architecture

The following figure illustrates the major layers of WCF Architecture :



WCF Components

The major components of WCF are :
  • Contracts
  • Service Runtime
  • Messaging
  • Activation and hosting

Contracts
Specifies what a service can do(Exposes methods and their attributes).
  • Service Contract
  • Data Contract
  • Message Contract
  • Policy and binding  
Service Runtime
Specifies the service behaviors occurs during actual operation(run time).
  • Throttling
  • Error
  • Metadata
  • Instance
  • Message Inspection
  • Transaction
  • Concurrency
  • Parameter Filtering
  • Dispach
Messaging
Specifies the message flow at run time(customize message contracts, message security/authentication, processing the contents of message).

  • WS-Security Channel
  • WS-Reliable Messaging Channel
  • Encoder
  • Http Channel
  • Tcp Channel
  • Transaction Flow Channel
  • NammedPipe Channel
  • MSMQ Channel
Activation and Hosting
Specifies how services can be hosted/executed, so client applications can consume the service.
  • Windows Activation Service/IIS
  • Windows Service
  • Self Hosting
  • EXE 

Next Topic : Endpoints: Address, Binding and Contract

Thursday, 28 June 2012

Getting Started - SOA & WCF

Welcome to the world of Service Oriented Architecture (SOA)


Service Oriented Architecture (SOA) is a network-centric, loosely coupled and interoperable architectural approach that supports integration of business functionalities (services). This is a set of principles, protocols and methodologies for designing and developing applications in the form of interoperable services. These services are well-defined business logic build as reusable components. SOA is not just Architecture of services but includes policies, practices, methodologies and framework by which we can publish and consume services efficiently.


SOA enables us to create loosely coupled service based business processes as a single unit exposed to consumer yet the implementation is isolated. This architecture enables programmers to add and modify functionality quickly without affecting the existing processes. 

Service design principles:
  • Service discoverability
  • Loose coupling
  • Service abstraction
  • Service encapsulation
  • Service reusability
  • Service granularity
  • Service statelessness
  • Service autonomy


The following figure illustrates how services work. A service consumer at the left side creates a connection and sends a service request message (calls a service method) to a service provider at the right side. The service provider process the request and returns a response message (output of service method) to the service consumer and connection is closed. The request and subsequent response messages are defined in a way that is understandable to both the service consumer and provider.




Windows Communication Foundation is a framework (supported by .Net 2.0 and above) designed using SOA principles for building robust service oriented applications.

Evolution Of Windows Communication Foundation

The industry acceptance of Web services including standard protocols for application-to-application communication has changed software development and given birth to Service Oriented Architecture. Windows Communication foundation (WCF) is microsoft initiative, offers development of connected applications through a new service-oriented programming model. WCF supports unified distributed application development, interoperability and direct support to service orientation.

WCF programming model enables us to create reliable, secure and transaction enabled services able to communicate across all execution boundaries. A client application can consume services in the same application domain, across application domains or across processes.

Benefits of WCF over Web services:

  1. WCF can be hosted in IIS, windows activation service, Self-hosting, Windows service.
  2. It has support for multiple protocols like HTTP, TCP, Named pipes, MSMQ, Pear to Pear.
  3. It supports session, transaction, security and concurrency.
  4. It supports three types of message exchange : One way, request reply and duplex. 

Next Topic : WCF Architecture