So I've been playing with WCF lately. It's been rather interesting. Here's the basic scenario:
Need a service (service a) that communicates with a back-end service (service b) with a limited number of communication channels available to service b, and with the need to make asynchronous calls to service a and for service a to queue any pending requests for service b and execute them when it gets the chance.
Enter WCF. Basically, I developed a service contract for both synchronous calls and asynchronous calls and implemented two service hosts, one for each, over a net.tcp binding on an arbitrary port.
The cool thing is that you really can configure the entire communcation channel (endpoint) through the config files.
Things I learned:
1. Use svcconfigeditor--it really helps.
2. Generate your stub class using the svcutil /language:C# assembly /config:app.config
3. Dual Channel over Http is MUCH, MUCH slower versus using a tcp channel (I'm guessing this is soap overhead).
4. If you're getting a server too busy exception, check the service behaviors and ensure that serviceThrottling is set to where you want it.
<serviceThrottling maxConcurrentCalls="160" maxConcurrentSessions="100" />
Anyway, so far, so good. This is great stuff--I didn't have to think much at all about what was happening under the sheets, although there is lots of good information out there about what is going on.