Today I completed a webcast as part of a 15 part series - today's subject concurrency, throughput and throttling. I received some questions about callback and Windows client applications that I thought I would elaborate on here. In fact, I went a little overboard and created a bunch of samples that would illustrate the behavior of services and clients when you have a Windows client, a service with a callback contract (thus, two-way communication) and various WCF settings at the client and service that relate to concurrency, multithreading, synchronization with the UI thread, and so on. The following table summarizes various settings at the client, service and callback and the resulting behavior at runtime. Here's the breakdown for each column: Callback Sync Context - refers to the UseSynchronizationContext setting for the CallbackBehaviorAttribute on the client callback object. Callback Concurrency Mode - refers to the ConcurrencyMode setting for the CallbackBehaviorAttribute on the client callback object. Service Operation - Indicates if the service contract operations are one-way or two-way. Callback Operation - Indicates if the callback contract operations are one-way or two-way. Service Concurrency Mode - refers to the ConcurrencyMode setting for the ServiceBehaviorAttribute on the service type. Resulting Behavior - when the corresponding sample is run, what happens? I have also uploaded sample code for each of these scenarios, numbered in order of table row description below.
Read More...