Welcome to MSDN Blogs Sign in | Join | Help

Windows Communication Foundation Channel Shapes

The WCF channel model has three built-in archetypes for communication patterns.  These archetypes are the one-way pattern, unmatched two-way pattern, and matched two-way pattern.  Along with the archetypes are five interfaces, called channel shapes, that describe the send and receive methods for each pattern.  There is one interface for the client and server side of each pattern, except for unmatched two-way where the two endpoints have the same behavior.

In the one-way communication pattern, there is a unidirectional stream of messages between the client and server.  One end of the pair will have an IInputChannel for receiving messages and the other end will have an IOutputChannel for sending messages.  In a queueing system, you might have writers that put messages into the queue and a reader that processes messages from the queue.  Such a system would use the one-way pattern to indicate that there's no way to flow messages through the queue in the other direction.

In the unmatched two-way communication pattern, there's essentially a pair of one-way patterns welded together.  Each side has an input and output channel, joined together by an IDuplexChannel, that they can use independently.  Once you've established a bidirectional TCP connection, both sides of the connection can read and write messages at any time.

Finally, in the matched two-way communication pattern, there is still an input and output channel on both sides, but there's a semantic restriction on when messages can be sent.  The client can send requests to the server, through an IRequestChannel, and the server can send a reply back the client, through an IReplyChannel.  The client and server have to maintain this pairing because only one side is expected to talk on the channel at a time.  This is the model that HTTP uses for communication.

We've got some other obligations to take care of this week, but we'll spend next week looking at each of these interfaces in detail.

Next time: Get the Message

Published Tuesday, March 07, 2006 5:00 AM by Nicholas Allen
Filed under: ,

Comments

Tuesday, March 07, 2006 11:57 AM by Nicholas Allen's Indigo Blog

# And Starring IChannel

I've been giving a tour around the WCF channel stack without ever really explaining what channels are. ...
Monday, March 13, 2006 11:49 AM by Олег Михайлик

# WCF — какие бывают каналы [Николас Аллен]

Николас объясняет буквально "на пальцах". Честно говоря, все эти вопросы — кто п
Tuesday, March 14, 2006 11:56 AM by Nicholas Allen's Indigo Blog

# What Goes In... (IInputChannel)

Last week I introduced the different kinds of channel shapes that are available with WCF.  This...
Tuesday, March 28, 2006 9:28 PM by Nicholas Allen's Indigo Blog

# WCF Hello World, Part 1: Building a Client

During the past month, we've taken a tour of the most important parts of the channel model.  We...
Thursday, June 08, 2006 8:23 PM by Nicholas Allen's Indigo Blog

# HTTP Request and Response Messages

I've talked about the request-reply message exchange pattern that HTTP uses, but we've never looked at...
Thursday, June 22, 2006 11:47 AM by Nicholas Allen's Indigo Blog

# Mapping Channels to Shapes

When you build a channel factory or listener, you have to specify a TChannel parameter that describes...
Friday, March 09, 2007 1:04 PM by Nicholas Allen's Indigo Blog

# Channel Shapes

I was looking through the archives the other day and found that the original article on channel shapes

New Comments to this post are disabled
 
Page view tracker