Archive for January, 2009

h1

Silverlight 2.0 and WCF Duplex Service

January 20, 2009

Today I was doing a POC on Silverlight 2.0 and WCF Duplex Services. It seems to be a great alternative to using sockets because of the cleaner and easier programming model. It also has almost the same advantage as socket programming because under the head it uses a sort of ‘smart polling’ where the client sends a request to the server checking for any new events/messages that need to be passed back to the Silverlight client, the connection and hangs around until there is something to send back to the client and does so when the server queues any messages. The max time this connection can stay open before timing out is 90 seconds, at which point another ‘half pole’ if you will happens. Pretty good trade off I must say. There is only one problem with this current solution and that is there is no visual studio support to add service references via the GUI so basically you not only have to generate the proxy client code yourself but you even need to do all the serialization and de-serialization manually! Very tedious, I will be researching for any alternatives in the next few days.

Advertisements