Some WCF Vocabulary

I am taking a class of WCF and WF this week from Matt Milner of PluralSight. This has been a great first day and as I am trying to learn and grok WCF, I thought it would be handy to keep a vocabulary list. Here it is for your reference as well.

Matt is a very professional and effective speaker, BTW. have learned a few trainer items from watching this guy in action. Well done.

Behavior

Particular protocol specific settings that can be made on a particular binding. For example, if we are using an HTTP binding, we may specify behaviors for that HTTP binding such as whether or not the service called should return an XML message for an invoked method. Also, behaviors control service features directly, like threading and instancing.

Channel

Client creates a channel, which can be thought of as a pipe to the service. A channel  allows

Data Contract

This is typically an interface (read, class interface) reflected by the runtime to define the wire messages such that the object structures can be serialized, transported across the wire, and reconstituted on the other side.

End Point

The MS Definition

In my mind, endpoints are like the water nozzles on the outside of my house. Clients communicate with service endpoints to exchange messages with the service. End points have several notable parts.

Address

The location of a particular service endpoint. If the endpoint exists via HTTP, this may be a URL, if it is a TCP/IP-bound endpoint, the address will look more like an IP address.

Binding

This is the model for communication between the client and server. For example, is this SOAP, MSMQ, a binary TCP/IP protocol, etc. Bindings are used to declare encoding of messages on the wire, transport mechanism, and details of how to use the protocol involved with the particular binding. This lets users of a given endpoint understand how to communicate with the endpoint.

Contract

Usually a .Net interface, this is set of rules that dictate the format of messages on the wire.

Meta Data

Data items describing particular attributes of a given service endpoint. These metadata items are available at runtime, thorough MEX, so that endpoints may be self describing to potential clients.

MEX (Meta Data Exchange)

This is an endpoint one can configure for a given Service Host that allows the host to be required for data about the services it is hosting. For example, using MEX, I can ask a given host for all bindings for a particular service I am interested in, and then choose to communicate with the binding of my choice. MEX is a WS-* addition to the WSDL specification of SOAP.

// retrieve the service endpoints using MEX
ServiceEndpointCollection endpoints = MetadataResolver.Resolve(
    typeof(IAuctionService), 
    new EndpointAddress("http://localhost:8080/auction/mex"));

Proxy Class

A class within the client application that wraps the service in a set of strongly typed constructs such that the consuming client is abstracted from the wire level message exchange.

Service Contract

This is the interface boundary of the service being hosted and consumed. The service contract defines what operations may be called on the service, and what data types are needed for each operation. Think of this as WSDL++. Service contract definition is derived from the class being exposed as a service.

Service Host

A WCF class meant to manage the hosting of a particular WCF service. This can be done by me in an application of my own, or it can be done by another managed system that is aware of ServiceHost. An example is IIS. IIS is a managed Service Host because it knows about WCF and implements ServiceHost itself. The ServiceHost manages the lifecycle of the service it is hosting.

ServiceHost.Abort() provides an emergency shutdown.

2 thoughts on “Some WCF Vocabulary

Comments are closed.

Proudly powered by WordPress | Theme: Code Blog by Crimson Themes.