After reading a good article at Dimebrain called â€˜Managing Social Data in Silverlight: do you push or pullâ€™, it inspired me to work through the two articles on Silverlight/WCF Duplex Polling:
This topic describes how to create a duplex Windows Communication Foundation (WCF) service that can communicate with a Silverlight client. A duplex service maintains a callback channel to the Silverlight client, which allows the service to make calls to the client at any given time. Duplex services have numerous applications including, for example, a chat server for instant messaging or a monitoring service that sends notifications to the client.
In duplex messaging, both service and client expose service contracts, which specify the operations that each of them exposes. In this example, we use the following pair of service contracts.
The procedure outlined here describes how to construct a Silverlight 2 client that sends an order to a duplex service and that is called back by that service twice, first when the service starts to process the order, and second when the order is completed.
Building a Silverlight duplex client involves a significant number of asynchronous calls, where callback methods are defined. The structure used for these asynchronous calls is standard. In the following procedure, some callbacks are omitted for clarity. The full source code, which contains all necessary methods, is available at the end of the procedure.
These two articles go hand in hand.