Welcome to U E T - C S . org Sign in | Join | Help

Osama Abbas

the Answers to Life, the Universe, and Everything
Pipes in .NET !

I always thought IPC through pipes was a UNIX only thing. Infact its one of those things Linux fanboys try to bring up in every Linux vs Windows discussion. Today I was shocked to know that pipes have been in Windows all this time !

I found out on the BCL Team's blog today that they released a wrapper over the Windows Pipes functionality back in the October 'Orcas' CTP !

These classes will be found in the System.IO.Pipes namespace and will provide interprocess comm. using two types of Pipes :

Anonymous Pipes

Anonymous pipes are character-based and are half-duplex.  They cannot communicate over the network and support only a single server instance.  These pipes are most useful for communication between threads or between parent and child processes where the pipe handles can be easily passed when the child process is created.

Named Pipes

Named pipes are far more powerful than anonymous pipes.  They can be duplex, over the network, and can support multiple server instances of a single name, making them ideal for quick-to-build, and easy to connect to, multithreaded servers.  Furthermore, they support message based communication so that a reading process can read varying-length messages precisely as sent by the writing process.  Finally, named pipes support impersonation allowing connecting processes to use their own set of permissions on remote servers.

So then comes the question, in the presence of this new API, how does WCF tie into the equation ? Well according to a comment posted on the blog :

" This is not part of WCF at the moment.  Pipes are a lower level channel the WCF could be built on top of. WCF actually has its own internal pipe implementation that it uses to achieve IPC.  In the future, WCF may switch to using the public pipe implementation that we're now providing. "

The BCL team seems to be doing a GREAT job and the upcoming release of .NET is packed full of amazing goodies. Infact I also found about a new obscure but very useful feature called the "Application Addin framework" that will make development of plugin enabled and extensible applications a LOT easier (will be discussing in detail later).

Posted: Wednesday, March 14, 2007 9:47 PM by osama.abbas
Filed under:

Comments

No Comments

Anonymous comments are disabled