Geochat for Silverlight is a browser-to-browser geo-collaboration sample. Graphics drawn in browser’s map can be immediately pushed to all other browsers on the internet. The web application uses Microsoft’s implementation of Comet, a model using long lived HTTP requests to simulate server to client communication without the overhead of polling.
Geochat is implemented in two parts.
- Server-side
A Windows Communication Foundation (WCF) duplex service is created to maintain a connection to Silverlight clients. The geochat implementation acts as broker between Silverlight clients by forwarding messages to individual (or all) clients.
http://msdn.microsoft.com/en-us/library/cc645027(VS.95).aspx - Client-side
The Silverlight client is using PollingDuplexHttpBinding to maintain a connection with the server using AJAX polling. The polling occurs every five seconds.
http://msdn.microsoft.com/en-us/library/cc645028(VS.95).aspx
Click here to experiment with a live sample. Complete source code for this app is available here.
No comments:
Post a Comment