O'Reilly logo

Programming WCF Services by Juval Lowy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

One-Way Operations

There are cases when an operation has no returned values, and the client does not care about the success or failure of the invocation. To support this sort of fire-and-forget invocation, WCF offers one-way operations. Once the client issues the call, WCF generates a request message, but no correlated reply message will ever return to the client. As a result, one-way operations cannot return values, and any exception thrown on the service side will not make its way to the client. Ideally, once the client calls a one-way method, it should be blocked only for the briefest moment it takes to dispatch the call. However, in reality, one-way calls do not equate asynchronous calls. When one-way calls reach the service, they may not be dispatched all at once, and may be queued up on the service side to be dispatched one at a time, all according to the service’s configured concurrency mode behavior. (Chapter 8 will discuss concurrency management and one-way calls in depth.) How many messages (be it one-way operations or request-reply ones) the service is willing to queue up is a product of the configured channel and reliability mode. If the number of queued messages has exceeded the queue’s capacity then the client will block, even when issuing a one-way call. However, once the call is queued (which is usually the case), the client is unblocked and can continue executing, while the service processes the operation in the background. All the WCF bindings support one-way ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required