Download presentation
Presentation is loading. Please wait.
Published byMiina Hakola Modified over 6 years ago
1
WCF (Indigo): Under the Hood of the Channel Layer
9/18/2018 4:37 AM WCF (Indigo): Under the Hood of the Channel Layer Steve Swartz COM416 Architect Microsoft Corporation ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
2
From the Outside Client Service Message Address Binding Contract A B C
9/18/2018 4:37 AM From the Outside Client Service A B C Bv Bv Bv A B C Message A B C Bv Address Binding Contract (Where) (How) (What) ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
3
From the Inside Service A B C Bv A B C Bv 9/18/2018 4:37 AM
©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
4
Positioning This Talk This Talk Other Talks
9/18/2018 4:37 AM Positioning This Talk This Talk How Does the Channel Layer Work? Why Do You Care? Other Talks How Does the ServiceModel Work? COM417: Thursday, 10:00am How Do You Build XML Messaging Apps? COM326: Thursday, 5:15pm How Do You Build Channels? COM424: Thursday, 3:45pm How Do You Hook Channels Into WebHost? COM413: Friday, 1:00pm ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
5
Big Ideas Bindings: How You Use The Channel Layer
9/18/2018 4:37 AM Big Ideas Bindings: How You Use The Channel Layer Bindings Are Easy & Extensible Channels: How Messages Are Exchanged Channels have Shape, Capabilities, Stacks Factories: How Channels Are Created ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
6
The Talk-In-A-Slide Binding Binding Factory CreateChannel<T>()
9/18/2018 4:37 AM The Talk-In-A-Slide Binding Binding Factory CreateChannel<T>() Channel Factory Listener Listener Channel Factory Listener Channel Factory Listener AcceptChannel() Channel Channel Send() Message Receive() ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
7
Agenda: Message Binding Binding Factory CreateChannel<T>()
Listener Listener Channel Factory Listener Channel Factory Listener AcceptChannel() Channel Channel Send() Message Receive() ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
8
Message: The Basics CLR Representation of SOAP Infoset
9/18/2018 4:37 AM Message: The Basics CLR Representation of SOAP Infoset Supports SOAP 1.1 / SOAP 1.2 Encoding-Agnostic Stream-Oriented public abstract class Message : IDisposable { public abstract MessageHeaders Headers { get; } public abstract MessageProperties Properties { get; } public abstract MessageVersion Version { get; } public T GetBody<T>() { } static public Message CreateMessage(...) { } public void WriteMessage(XmlWriter writer) { } } ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
9
Message: Constructors
9/18/2018 4:37 AM Message: Constructors Select Action Select Message Version Select Formatter Body as Object, XMLReader Special Support for Faults, Replies ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
10
Agenda: Bindings Binding Binding Factory CreateChannel<T>()
9/18/2018 4:37 AM Agenda: Bindings Binding Binding Factory CreateChannel<T>() Channel Factory Listener Listener Channel Factory Listener Channel Factory Listener AcceptChannel() Channel Channel Send() Message Receive() ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
11
Bindings: What Are They?
9/18/2018 4:37 AM Bindings: What Are They? Client Service A B C C B A Message A B C Address Binding Contract (Where) (How) (What) ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
12
Bindings: Out of the Box
9/18/2018 4:37 AM Bindings: Out of the Box Protocols Security Session Transactions Duplex Streaming BasicHttpBinding BP 1.1 T WsHttpBinding WS T | S X WsDualHttpBinding NetTcpBinding .NET O NetNamedPipesBinding NetProfileMsmqBinding T = Transport Security | S = WS-Security | O = One-Way Only ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
13
Bindings: Scenarios Shipping Channels Future Channels Custom Channels
9/18/2018 4:37 AM Bindings: Scenarios Shipping Channels Change defaults Change options Change set of channels used Future Channels Change versions, functionality Preserve app code Custom Channels Binding benefits for any channel ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
14
9/18/2018 4:37 AM Binding: Object Model public abstract class Binding : IDefaultCommunicationTimeouts { protected Binding() { } public abstract string Scheme { get; set{} } public TimeSpan OpenTimeout { get; set{} } public TimeSpan SendTimeout { get; set{} } public TimeSpan ReceiveTimeout { get; set{} } public TimeSpan CloseTimeout { get; set{} } public virtual IChannelFactory<TChannel> BuildChannelFactory<TChannel>(BindingParameterCollection p) {} public virtual IChannelListener<TChannel> BuildChannelListener<TChannel>(BindingParameterCollection p) {} } ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
15
Bindings: Build Your Own
9/18/2018 4:37 AM Bindings: Build Your Own Subclass Binding An (Internal) Binding Element Collection Completely Defines Binding, Channel Stack A Constructor Loads and Initializes B.E. Collection A Public API Simplifies Working With B.E. Collection ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
16
Binding: Binding Elements
9/18/2018 4:37 AM Binding: Binding Elements public abstract class BindingElement { protected BindingElement() { } public virtual IChannelFactory<TChannel> BuildChannelFactory<TChannel>(ChannelBuildContext context) {} public virtual IChannelListener<TChannel> BuildChannelListener<TChannel>(ChannelBuildContext context) {} } public class ChannelBuildContext public ChannelBuildContext() {} public BindingElementCollection UnhandledBindingElements { get; } public BindingParameterCollection BindingParameters { get; } public IChannelFactory<TChan> BuildInnerChannelFactory<TChan>() {} public IChannelListener<TChan> BuildInnerChannelListener<TChan>(){} BindingElement RemoveNextElement(){} ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
17
Bindings: Building Factories
9/18/2018 4:37 AM Bindings: Building Factories Call “Build()” on First Binding Element It Builds Its Factory It Optionally Consumes Binding Elements It Optionally Consumes Binding Parameters It Calls “BuildInner()” on BuildContext It Wires Inner Factory to Itself It Returns ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
18
Agenda: Factories Binding Binding Factory CreateChannel<T>()
9/18/2018 4:37 AM Agenda: Factories Binding Binding Factory CreateChannel<T>() Channel Factory Listener Listener Channel Factory Listener Channel Factory Listener AcceptChannel() Channel Channel Send() Message Receive() ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
19
Factories: In Perspective
9/18/2018 4:37 AM Factories: In Perspective Apps use Channels Factories Create Channels Factories Share Resources Per Process Per Machine Channel Factory Process Manager Machine Manager ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
20
ICommunicationObject
9/18/2018 4:37 AM ICommunicationObject Implemented by all channels, factories public interface ICommunicationObject : IDisposable { // Created, Opening, Opened, Closing, Closed, Faulted CommunicationState State { get; } event EventHandler Closed; event EventHandler Closing; event EventHandler Faulted; event EventHandler Opened; event EventHandler Opening; // Async Calls Available, Too void Open(); void Close(); void Abort(); } ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
21
IChannelManager Implemented by all channels, factories
9/18/2018 4:37 AM IChannelManager Implemented by all channels, factories public interface IChannelManager : ICommunicationObject { MessageVersion MessageVersion { get; } string Scheme { get; } ReadOnlyCollection<IChannel> GetChannels(); T GetProperty<T>() where T : class; } ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
22
Factories: The Client Clients Initiate Connections
9/18/2018 4:37 AM Factories: The Client Clients Initiate Connections One contract, one binding, many addresses Async methods available public interface IChannelFactory<TChannel> : IChannelFactory { TChannel CreateChannel(string address); TChannel CreateChannel(Uri address); TChannel CreateChannel(EndpointAddress to); } public interface IChannelFactory : IChannelManager { } ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
23
Factories: The Service
9/18/2018 4:37 AM Factories: The Service Services Passively Wait For Connectinons One address, one binding, many contracts Async methods available public interface IChannelListener<TChannel> : IChannelListener { void SetUri( /* … */ ); bool WaitForChannel(TimeSpan timeout); TChannel AcceptChannel(); TChannel AcceptChannel(TimeSpan timeout); } public interface IChannelListener : IChannelManager { } ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
24
Agenda: Channels Binding Binding Factory CreateChannel<T>()
9/18/2018 4:37 AM Agenda: Channels Binding Binding Factory CreateChannel<T>() Channel Factory Listener Listener Channel Factory Listener Channel Factory Listener AcceptChannel() Channel Channel Send() Message Receive() ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
25
Channels: Three Shapes
9/18/2018 4:37 AM Channels: Three Shapes public interface IOutputChannel : IChannel { void Send(Message message); } public interface IInputChannel : IChannel { Message Receive(); public interface IDuplexChannel : IInputChannel, IOutputChannel { } public interface IRequestChannel : IChannel { Message Request(Message message); public interface IReplyChannel : IChannel { IRequestContext ReceiveRequest(); public interface IRequestContext : IDisposable { Message RequestMessage { get; } void Reply(Message message); ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
26
Channels: Sessions public interface ISession { string Id { get; } }
9/18/2018 4:37 AM Channels: Sessions public interface ISession { string Id { get; } } public interface ISessionChannel<SessionType> where SessionType : ISession SessionType Session { get; } public interface IInputSession : ISession public interface IInputSessionChannel : IInputChannel, ISessionChannel<IInputSession> ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
27
Channel Families: Transports
©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
28
Channel Families: Encoders
©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
29
Channel Families: Dual
Dual Channel Channel ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
30
Channel Families: Protocols
Protocol Channel EP EP Protocol Channel Transport Channel Transport Channel M M M Message M ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
31
In Summary Bindings: How You Use The Channel Layer
9/18/2018 4:37 AM In Summary Bindings: How You Use The Channel Layer Bindings Are Easy & Also Extensible Channels: How Messages Are Exchanged Channels have Shape, Capabilities, Stacks Factories: How Channels Are Created ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
32
Community Resources At PDC After PDC For more information, go see
9/18/2018 4:37 AM Community Resources At PDC For more information, go see Service Model Internals: COM417, Thursday, 10:00am XML Messaging: COM326, Thursday, 5:15pm Building Channels: COM424, Thursday, 3:45pm WebHost Integration: COM413, Friday, 1:00pm Ask The Experts table: WCF Internals I’ll be at COM Track lounge: Thu 3:30-6:30pm, Fri 8:30-11am After PDC If you miss some of these sessions, watch the DVD! MSDN dev center The WCF newsgroup Channel 9 tag ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
33
© 2005 Microsoft Corporation. All rights reserved.
9/18/2018 4:37 AM © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.