WCF distributed development step by step for win (10)

Source: Internet
Author: User
Tags call back file upload

Request answering (request-reply), one-way operation (one-way), callback operation (call back)

In addition to supporting classic request response (request-reply) mode, WCF provides an operational invocation pattern, how they differ, and how we use these operations to invoke patterns in development. This article in this section will be introduced in detail today. WCF distributed development steps to Win (10): Request answering (request-reply), one-way operation (one-way), callback operation (call back). This article structure: "1" request answering (request-reply), "2" one-way operation (one-way) , "3" callback operation (call back), "4" Sample Code Analysis, "5" summary. Finally upload the sample code for this article.

In addition to supporting classic request/Answer mode surprises, WCF also provides support for one-way operations, bidirectional callback modes of operation, as well as streaming operations (the latter is similar to the optimized transport mechanism provided by WSE3.0, which I have explained in this article WSE3.0 Building Web Services Security (4): MTOM message transfer optimization and file upload, download). Today we'll look at the concepts, differences, implementation mechanisms, and how to implement them in code, and the details to be noted at the end of this article.

"1" Request answering (request-reply):

The request response mode is the default operating mode. This is similar to the classic C/s programming, the client sends a request, blocks the client process, and the server returns the result of the operation. Request response mode and binding correspondence:

In addition to netpeertcpbinding and netmsmqbinding bindings, all bindings support request-reply operations.

"2" one-way operation (one-way):

"2.1" Concept:

In simple terms, the one-way operation does not return a value, the client simply calls, regardless of the result. One-way operation once the client makes a request, WCF generates a request and does not return any messages to the client. A one-way operation differs from an asynchronous operation, although a one-way operation blocks the client only at the instant of the call, but if multiple one-way invocations are issued, WCF puts the request call into the queue and executes at some point. The number of queue store calls is limited, and once the number of calls that are made exceeds the set value of the queue store call, a blocking behavior occurs because the call cannot be placed in the queue. When the queue's request is out, the blocking call is placed in the queue and the client is unblocked. binding protocols and one-way request mode relationships:

differs from the request response mode. All WCF-bound communication protocols support one-way operations.

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.