Saturday 15 November 2008

Silverlight: Are sockets only suitable in intranets?

There was a big push by the community at large for Silverlight Sockets to which Microsoft responded by providing said functionality. However can you really use such a feature in an Internet application?

Sockets allow high performance real time data updates, very useful for messaging / real time feeds etc.

Port Range

The fact is that Silverlight Sockets requires the policy file to be served on port 943 and sockets only work on ports 4502-4534. This means that your customers must have those ports open on their Firewall. In a world of locked down security is this really likely? I think not!

Controlled Customer Base

Therefore I think it's fair to say that you can only really use such functionality either an Intranet environment, or to a small controlled customer base. If your product is a mass market product do you wish to prevent your customers from using your application, especially if it's something they may have no control over (strict IT managers etc).

Simple Mode and Advanced Mode

I guess one option would be to offer two levels of functionality, simple mode (for those without those ports open), and advanced (for those with the ports open) where advanced users can gain the benefit of the extra performance gains on the real time feed.

Other Alternatives

Use of ASMX / WCF Services provides an alternative to sockets, as does the Duplex Polling feature of WCF. Although these technologies are very good and will meet the requirements of most users, they probably do not provide the performance needed for some applications. They could be offered as options in the simple version of the application.

The Future

So whatabout the future? For this space I guess some folks would like to see a wider range of available ports (e.g. ones that may'be already opened on the firewall), another hope could be more performant WCF based solutions.

For just now, I would say think about your market, your users, and the experience you would like to give them and make the best choice from there

No comments: