WCF, POX and Encoders

Link. June 30, 2006. Comments [1]. Posted in: .NET | BizTalk | WCF | WinFX
Nicholas Allen has been writing about some of the changes in the June CTP of WCF (his blog is an excellent resource, by the way), and in entry #2 he talks a bit about some changes made to better support POX style applications in WCF. I'm very happy the WCF team is doing the right thing and fixing this kind of issues to support other application styles other than SOAP at the right level of abstraction in the platform. That's a very, very good think, particularly this early into the product lifetime (I'm assuming we'll get multiple versions of WCF over a number of years).

That said, one thing did get my attention: that the right abstraction level to fix this in was the normal Text Encoder. There are several good blog entries by several Indigettes on the topic of Message Encoders, but I'm not so sure I fully understand exactly how much (or many) responsabilities a Message Encoder has to fulfill in the WinFX architecture. Is there somewhere an explicit list of what those responsabilities are?

Maybe I'm misunderstanding how this goes, but it seems to me like the Message Encoder combines responsabilities for both message on-the-wire representation (i.e. XML, binary and so on), message encoding (in the case of text messages like XML), message assembling (i.e. introducing headers) and a few other things.

Comparisons are never nice, but they are incredibly useful to understand technology. One thing I would love to see is a comparison of the WCF channel and message encoder architecture to the BizTalk messaging architecture. They are definitely very differen beasts serving different purposes, but what I'd really like to get a hold on is how the functionality and extensibility offered by BizTalk pipelines (multi-stage, with clearly defined responsabilities for each stage) relates and compares to how WCF processes incoming messages and generates outgoing messages. I think this becomes even more interesting (and important) with the appearance of the WinFX adapter framework (here's a good introduction) coming in BizTalk Server 2006 R2.



Thursday, July 06, 2006 6:56:14 PM (SA Pacific Standard Time, UTC-05:00)
Fundamentally, the job of a MessageEncoder is fairly simple. It takes in some random bytes (a byte[] or a stream) and surfaces an instance of System.ServiceModel.Channels.Message up to the higher layers of the stack. How that transformation gets accomplished is designed to be opaque to the rest of the system.

We think of encoders as things that freely convert between two equivalent representations of the same fundamental information set. More advanced transformations (e.g. adding/removing headers) are best done above the Encoder as layered channel. Our general rule is that an Encoder changes only the representation of the message, not its information model or contents.
Comments are closed.

Syndicate

About

Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...

tomasrestrepo @ twitter My Flickr photostream My saved links on delicious My Technorati Profile

email: tomas@winterdom.com
msn: tomasr@passport.com

View my profile on LinkedIn

MVP logo

Ads


Categories

Statistics

Total Posts: 1051
This Year: 2
This Month: 2
This Week: 1
Comments: 827

Archive

Other

Copyright © 2002-2008, Tomas Restrepo.

Powered by: newtelligence dasBlog 2.2.8279.16125

Sign In