Using Polling Duplex Scaled Out

Tomasz Janczuk has posted another example using the HTTP polling duplex channel in Silverlight to build pub-sub style applications. This sample addresses the use of polling in a scaled-out configuration.

The solution employed is to move the server queue of messages from in-memory state to a shared store. The service also has to take more of the polling logic on directly to handle the fragmentation of data across sessions, introducing some additional limitations into the contract of the service.

This solution uses a variation of the WS-MakeConnection protocol to handle the service-level responsibilities of polling. This type of bootstrapping for connection establishment is actually very similar to how we came to the original design of the polling protocol itself. I suspect that if the server-side queue was moved to a remote store, server processes could come and go using the existing connection reestablishment of the protocol to resume both what the client and server were doing. That is also similar to (but much simpler than) the messaging services of BizTalk and what we're doing with long-running workflow services in .Net 4.0. Those two approaches both remote the storage of messages to a durable, commonly-located place apart from the application logic. I'll be interested to see how people take to using polling duplex, particular in solutions that are transparent to the original service.