Windows Communication Foundation vocabulary

Source: Internet
Author: User

Windows Communication Foundation vocabulary

The following terminology applies to Windows Communication Foundation (WCF ).

Address)

Address specifies the location where the message is received. The address is specified as a uniform resource identifier (URI. The URI architecture specifies the transmission mechanism used to reach the address, such as HTTP and TCP. The level part of the URI contains a unique position. Its format depends on the transmission mechanism. You can use the endpoint address to create a unique endpoint address for each endpoint in the service, or share an address between endpoints under certain conditions.

Application endpointProgramEndpoint)

An endpoint exposed by an application corresponds to the service agreement implemented by the application.

Behavior (behavior)

Behavior is a factor that controls various runtime features of services, endpoints, specific operations, or clients. Actions are grouped by scope: common actions affect all endpoints globally. Service actions only affect service-related aspects. endpoints only affect attributes related to endpoints, action-level behaviors affect specific operations.

Binding)

The binding defines how the endpoint communicates with the outside world. It is constructed by a group of elements called binding elements, which are "stacked" together to form a communication infrastructure. At least the transmission protocol (such as HTTP or TCP) and the encoding method used (such as text or binary) should be defined for binding ). The binding element can contain the specified details (for example, the message security mechanism used to protect the message or the message mode used by the endpoint.

Binding element)

The binding element represents a specific part of the binding, such as the transfer protocol, encoding method, infrastructure-level protocol (such as WS-reliablemessaging) Implementation, and any other elements of the communication stack.

Channel)

A channel is a concrete implementation of binding elements. Binding indicates configuration, and the channel is associated with the configuration. Therefore, each binding element has an associated channel. Channel stack together to form the specific implementation of binding: Channel stack.

Client application)

Client Applications exchange messages with one or more endpoints. Client Applications can be started by creating an instance of the WCF client and calling the method of the WCF client. Note that a single application can act as either a client or a service.

Coding (CodeWrite)

Through code writing, developers can strictly control all components of services or clients. They can not only check all configurations completed through configuration, you can also rewrite the code as needed. You can write, configure, or combine the two to control the application.

Configuration)

The advantage of configuration is that it allows non-developers (such as network administrators) to directly Set client and service parameters after code writing, without re-compiling. You can use the configuration to set values (such as endpoints), and add endpoints, bindings, and actions to implement further control. You can control the application by configuring, writing code, or combining the two.

Contract)

An agreement is a supporting specification for the specific protocol type to which it belongs. For example, a service agreement is a set of operational specifications. In WCF, the Protocol has a hierarchical structure, which is mirrored in the description object of the system. servicemodel. Description namespace. A service agreement is the largest protocol scope in WCF. Each service operation in a service agreement has an operation agreement, which specifies the messages (including error messages) that can be exchanged for the operation and the direction of the exchange. Each message in an operation has a Message Protocol (the structure specification of the SOAP message envelope), and each Message Protocol has a data protocol, used to specify the data structure contained in the message.

Data contract)

The data type used by the Service must be described in the metadata so that other parties can interact with the service. The description of data types is called data protocols, which can be used in any part of a message (for example, as a parameter or return type ). If the service only uses a simple type, no explicit use of data protocols is required.

Endpoint)

An endpoint is a structure used to send or receive messages (or execute both operations at the same time. An endpoint includes a location (Address) that defines the destination to which a message can be sent, a communication mechanism specification (binding) that describes how a message should be sent ), the definition of a group of messages that can be sent or received (or executed simultaneously) at this location (service agreement, used to describe which messages can be sent ). The WCF Service is made public to the outside world as a collection of endpoints.

Fault contract (incorrect agreement)

You can associate error agreements with service operations to indicate that errors can be returned to the caller. One operation can have zero or more errors associated with it. These errors are soap errors that are modeled as exceptions in the programming model. These exceptions are converted to soap errors and can be sent to the client.

Hosting (host)

The service must be hosted in a process. A host is an application that controls the lifetime of a service. Services can be self-hosted or managed by existing host processes.

Hosting process (host process)

A host process is an application designed to host services. These host processes include Internet Information Service (IIS), Windows activation Service (was), and Windows service. In these host schemes, the host controls the service lifetime. For example, you can use IIS to set virtual directories that contain service assembly and configuration files. When a message is received, IIS starts the service and controls its survival.

Initiating operation)

The operation called as the first operation of the new session. A non-start operation can be called only after at least one start operation has been called.

Instancing Model)

Each service has an instantiation model. There are three instantiation models: "single", "every call", and "every session ". In the "single" model, a single CLR object provides services for all clients. In the "each call" model, a new CLR object is created each time a client call is processed; in the "each session" model, a set of CLR objects are created and an object is used for each independent session. The choice of the instantiation model depends on the application requirements and the expected use mode of the service.

Message)

A message is an independent data unit. It may consist of several parts, including the message body and message header.

Message contract)

The Message Protocol describes the Message format. For example, it declares whether the message element should be included in the message header or in the message body, and what level of security should be applied to the elements of the message.

Message Security Mode)

The message security mode ensures security by implementing one or more security specifications. Each message includes the necessary security mechanisms to ensure security during message transmission, and enable the receiver to detect tampering and decrypt the message. In this sense, security information is encapsulated in each message, providing end-to-end security across multiple hops. As security information is a part of a message, you can also include multiple creden。 in the message (these creden。 are called "declarations "). This method also has the advantage that messages can be securely transmitted through any transmission protocol (including multiple transmission protocols between the start point and the target. The disadvantage of this method is that the encryption mechanism used is complicated and the performance is affected.

Metadata)

The metadata of a Service describes the features of a service. external entities need to understand these features to communicate with the service. Servicemodel metadata utility (svcutil.exe) allows you to use metadata to generate a companion configuration for the WCF client and client applications to interact with the service. The metadata published by the service includes the XML schema document (data protocol used to define the service) and the WSDL document (used to describe the service method ). After metadata is enabled, WCF can automatically generate service metadata by checking the service and its endpoints. To publish service metadata, you must enable the metadata behavior explicitly.

Operation contract)

The operation protocol defines parameters and returns the type of the operation. When creating an interface that defines a service agreement, you can apply the T: system. servicemodel. operationcontractattribute attribute to each method definition contained in the agreement to represent an operation agreement. You can model an operation to use a single message as a parameter and return a single message, or use a group of types as parameters and return a type. In the latter case, the system determines the format of the message to be exchanged for this operation.

Security)

Security in WCF includes confidentiality (message encryption to prevent eavesdropping), integrity (methods used to detect message tampering), authentication (methods used to verify servers and clients) and authorization (Resource Access Control ). These functions can be provided by leveraging existing security mechanisms (such as TLS over HTTP, also known as https) or by implementing one or more of the various WS-* security specifications.

Self-hosted service)

The self-hosting service is a service that runs in a process application created by a developer. Developers can control the service lifetime, set the service attributes, open the Service (this sets the service to the listening mode), and disable the service.

Service)

A service is a constructor that exposes one or more endpoints. Each of these endpoints exposes one or more service operations.

Service Contract)

The service agreement links multiple related operations to form a single function unit. Protocols can define service-level settings, such as service namespaces, corresponding callback protocols, and other such settings. In most cases, the Protocol definition method uses the selectedProgramming LanguageCreate an interface and apply the T: system. servicemodel. servicecontractattribute attribute to this interface. By implementing this interface, you can generate actual service code.

Service Operation)

Service operations are defined in the Service Code and are used to implement certain operations. This operation is made public to the client as a method on the WCF client. This method may return a value and may use an optional number of parameters, or does not use any parameters and does not return any response. For example, an operation that implements "hello" can be used as a notification for the existence of the client, and can start a series of operations.

System-provided bindings (binding provided by the system)

WCF contains bindings provided by many systems. These bindings are a set of binding elements optimized for specific solutions. For example, T: system. servicemodel. wshttpbinding is specially designed to interact with services that implement various ws * specifications. By providing only the options that can be correctly applied to a specific scheme, these bindings can save time. If one of the bindings does not meet your requirements, you can also create your own custom bindings.

Terminating operation)

The operation called as the last message of an existing session. By default, after the session associated with the service is closed, WCF recycles the service object and its context.

Transport security mode (Transmission Security Mode)

One of the following modes can be used to ensure security: transmission mode, message security mode, and transmission mode using message creden. Transport security mode specifies that the transport layer mechanism (such as https) provides confidentiality, integrity, and authentication. When using a transmission protocol like https, this mode has excellent performance and is easy to understand because it is very popular on the Internet. The disadvantage is that this security is applied to each hop in the communication path, which makes the communication vulnerable to man-in-the-middle attacks.

Transport with message credential security mode (transport security mode using message creden)

This mode uses the transport layer to provide message confidentiality, authentication, and integrity. Each message can contain multiple creden。 (declarations) required by the message receiver ).

WCF Client)

The WCF client is constructed by a client application and can expose service operations as methods (using the selected. NET Framework programming language, such as Visual Basic or Visual C #). Any application can host the WCF client, including the application that hosts the service. Therefore, you can create a service for a WCF client that contains other services. You can use servicemodel metadata utility (svcutil.exe) and direct it to the running metadata publishing service to automatically generate a WCF client.

WS -*

A group of increasing Web Service (WS) specifications (such as WS-Security and WS-reliablemessaging) implemented in WCF.

Copyright (c) 2007 Microsoft Corporation. All rights reserved.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.