Wednesday, 12 September 2007

Silverlight: Updating a connected client without polling

I'm currently at Mix UK in London.

Yesterday at the Keynote at company called dot net solutions, demonstrated their Silverlight Scrumwall application, which was pretty cool.

The interesting part of the demo, was that they used asynchronous web services, and blocked the thread at the web service, in order to send updates to the client (without polling). In a world of sockets in Silverlight this sort of code is unnecessary but since we don't have socket support at the moment, it is a cool workaround.

They claimed to be the first to do it in Silverlight, so on that basis I will claim to be the second.

I can't give you an online demo as my server doesn't support 3.5 (2000) and targeting 1.0 is a hassle from vs2008, or if you want you can download the source.

I would suggest you point 3 browser windows on your own machine when you run the demo, click the "connect client" button for all 3 browsers, and then click the "Perform Calculation" button.

I will look into getting this hosted somewhere else.


Ray Booysen said...


Glad you enjoyed the demo. I was one of the developers on the team that wrote that app. Let me know if you want some more info regarding it or anything else.


chrishayuk said...

Thanks Ray,

Anymore insights would be great.

I think there is some cool stuff that can be done (using such techniques), obviously when we have socket support it will be even better.

So any more info would be greatly appreciated.

Ray Booysen said...

You're exactly right. To get around the need to poll, we had to have the web service block on any requests from the browser and only return when something was available.

Once sockets come, we can obviously have a real push mechanism in place.

The web service itself is really simple and the c# threading ebook available here: is an absolute gem and something every developer should read

Anonymous said...

Hi Ray, I saw your demo at Mix and would love to know more.