WCF Architecture

Posted on October 20 2009 by Sachin Jain

Following is the diagram for WCF architecture

wcf-architecture

1. Contracts – It contains information about what service does and type  of information it will make available.
a) Data – A data contract includes the data that will be exchanged by the service. The service and the client do not need to agree on the types, but they do need to agree on the data contract. This includes parameters and return types.
b) Message – A message contract provides additional control over that of a data contract, It basically relateds to the formatting of SOAP mesage and let you to customize it.
c) Service – It tells where the service is located , what protocols they are communicating with. A service contract is what informs the clients and the rest of the outside world what the endpoint has to offer and communicate.
d) Policy and Binding – Policy and binding contracts specify important information such as security,protocol, and other information.
2. Service Runtime -The Service Runtime layer is the layer that  specifies and manages the behaviors of the service that occur during service operation. Following are the list of behaviours :-
a) Throttling Behavior: The Throttling behavior determines the number of processed messages.
b) Error Behavior: The Error behavior specifies what action will be taken if an error occurs during service runtime.
c) Metadata Behavior: The Metadata behavior controls whether or not metadata is exposed to the outside world.
d) Instance Behavior: The Instance behavior drives how many instances of the service will be available to process messages.
e) Message Inspection: Message Inspection gives the service the ability to inspect all or parts of a message.
f) Transaction Behavior: The Transaction behavior enables transacted operations. That is, if a process fails during the service runtime it has the ability to rollback the transaction.
g) Dispatch Behavior: The Dispatch Behavior service determines how the message is to be handled and processed.
h) Concurrency Behavior: The Concurrency behavior determines how each service, or instance of the service, handles threading. This behavior helps control how many threads can access a given instance of a service.
i) Parameter Filtering: Parameter Filtering filters the message headers and executes preset actions based on the filter of the message headers.
3. Messaging – The Messaging layer defines what formats and data exchange patterns can be used during service communication. Following are the list of channels and components.
a) WS Security Channel: The WS Security channel implements the WS-Security specification,which enables message security.
b) WS Reliable Messaging Channel: Guaranteed message delivery is provided by the WS Reliable Messaging channel.
c) Encoders: Encoders let you pick from a number of encodings for the message.
d) HTTP Channel: The HTTP channel tells the service that message delivery will take place via the HTTP protocol.
e) TCP Channel: The TCP channel tells the service that message delivery will take place via the TCP protocol.
f) Transaction Flow Channel: The Transaction Flow channel governs transacted message patterns.
g) NamedPipe Channel: The NamedPipe channel enables inter-process communication i.e with in an machine.
h) MSMQ Channel: for communicating with  with MSMQ, this is the channel that enables that.
4. Activation and Hosting – Now Services can be hosted with in context of other application and with in a application itself.The various options available to host WCF services are :
a) Windows Activation Service ( WAS)
b) Window Service hosting
c) Self hosted – which means that the service runs as a standalone application and controls its own lifetime
d) IIS

1. Contracts – It contains information about what service does and type  of information it will make available.

a) Data – A data contract includes the data that will be exchanged by the service. The service and the client do not need to agree on the types, but they do need to agree on the data contract. This includes parameters and return types.

b) Message – A message contract provides additional control over that of a data contract, It basically relateds to the formatting of SOAP mesage and let you to customize it.

c) Service – It tells where the service is located , what protocols they are communicating with. A service contract is what informs the clients and the rest of the outside world what the endpoint has to offer and communicate.

d) Policy and Binding – Policy and binding contracts specify important information such as security,protocol, and other information.

2. Service Runtime -The Service Runtime layer is the layer that  specifies and manages the behaviors of the service that occur during service operation. Following are the list of behaviours :-

a) Throttling Behavior: The Throttling behavior determines the number of processed messages.

b) Error Behavior: The Error behavior specifies what action will be taken if an error occurs during service runtime.

c) Metadata Behavior: The Metadata behavior controls whether or not metadata is exposed to the outside world.

d) Instance Behavior: The Instance behavior drives how many instances of the service will be available to process messages.

e) Message Inspection: Message Inspection gives the service the ability to inspect all or parts of a message.

f) Transaction Behavior: The Transaction behavior enables transacted operations. That is, if a process fails during the service runtime it has the ability to rollback the transaction.

g) Dispatch Behavior: The Dispatch Behavior service determines how the message is to be handled and processed.

h) Concurrency Behavior: The Concurrency behavior determines how each service, or instance of the service, handles threading. This behavior helps control how many threads can access a given instance of a service.

i) Parameter Filtering: Parameter Filtering filters the message headers and executes preset actions based on the filter of the message headers.

3. Messaging – The Messaging layer defines what formats and data exchange patterns can be used during service communication. Following are the list of channels and components.

a) WS Security Channel: The WS Security channel implements the WS-Security specification,which enables message security.

b) WS Reliable Messaging Channel: Guaranteed message delivery is provided by the WS Reliable Messaging channel.

c) Encoders: Encoders let you pick from a number of encodings for the message.

d) HTTP Channel: The HTTP channel tells the service that message delivery will take place via the HTTP protocol.

e) TCP Channel: The TCP channel tells the service that message delivery will take place via the TCP protocol.

f) Transaction Flow Channel: The Transaction Flow channel governs transacted message patterns.

g) NamedPipe Channel: The NamedPipe channel enables inter-process communication i.e with in an machine.

h) MSMQ Channel: for communicating with  with MSMQ, this is the channel that enables that.

4. Activation and Hosting – Now Services can be hosted with in context of other application and with in a application itself.The various options available to host WCF services are :

a) Windows Activation Service ( WAS)

b) Window Service hosting

c) Self hosted – which means that the service runs as a standalone application and controls its own lifetime

d) IIS

VN:F [1.9.0_1079]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.0_1079]
Rating: 0 (from 0 votes)
WCF Architecture, 5.0 out of 5 based on 1 rating

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Powered by Sachin Jain

Powered by Olark