Home > WCF > WCF # 10 – WCF channel shapes and communication patterns (Message exchange patterns)

WCF # 10 – WCF channel shapes and communication patterns (Message exchange patterns)

Hi Geek,

In our last post Channels , we see how messages are exchange in WCF using channels ,

In this post we will see the types of message exchange patterns in WCF .

WCF supports three distinct message-exchange patterns:

1) One Way

2) Duplex

3) Request Reply

1) One Way Communication Pattern

image

a) In the one-way communication pattern, messages are sent in only one direction, from the client to the server.

b) One-way communication is common when the sender does not need an informational response back right away;the sender just needs an acknowledgement that the message was sent.

c) After the message is sent, that is the end of the communication exchange

2) Duplex communication pattern

image

a) Duplex communication uses two one-way channel shapes combined into a third interface called IDuplexChannel.

b) The advantage of duplex communication over one-way or request-reply is that messages can be sent from either the client or the server.

c) Example

An example of duplex communication is an event notification system. A server will send events to a client that receives events. The client provides an endpoint on which the server can send messages to the client. The server will then use this endpoint to send messages to the client

3) Request Reply communication pattern

image

a) Request-reply communication is a special form of two-way communication where there is exactly one reply for each request, and it is always initiated by the client.

b) After the client sends a request, it must wait for a response before it can send another request.

c) Example  A common use of request-reply communication is an HTTP request from a browser

The browser makes an HTTP request to the server, such as GET or POST, the server processes that request, and then a reply is sent back.WCF handles request-reply communication using the IRequestChannel and IReplyChannel.

In coming posts we will go in depth with each message exchange pattern.

Thanks.

Advertisements
Categories: WCF
  1. May 2, 2014 at 5:02 am

    After looking into a number of the articles on your web
    site, I seriously like your technique of writing a blog. I bookmarked it to my bookmark site list and
    will be checking back soon. Please check out my web site as well and let me know your opinion.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: