Measure Twice, Code Once

Brad Abrams blogged on the importance of measuring performance before making design changes. “Have you measured it?” is a question I ask customers all the time. Recently, I was meeting with an ISV that had been directed to me regarding improving the performance of their .NET app. They were using .NET Remoting between their web and app tiers. They were using the HTTP channel with the binary data formatter and felt that if they moved to the TCP channel they would improve their performance dramatically. However, making this switch would entail writing a non-trivial amount of “plumbing”. They would need their own service to host the objects instead of just using IIS. They would also need to build custom code to support encryption and authentication on the TCP channel (I know there is democode for doing this floating about – but as an ISV, they would need to support the code as if they had written it which is still non-trival).

It turns out they had not, in fact, measured the impact. And in digging deeper in their architecture, it turned out that they were making multiple calls between their web front end and application tier on each web page request, with the average being about five. While TCP is in fact faster than HTTP, it’s not going to provide the same level of improvement that collapsing those five remote calls into one would be. I explained to them the Remote Facade and Data Transfer Object patterns as a way to dramatically improve the performance of their application while avoiding the need to build/maintain a bunch of plumbing. They liked it and as far as I know, they decided to head in that direction. I’m waiting to hear exactly how much of a performance gain they get.

If you don’t measure, you don’t know where the bottle necks are and you don’t know where to get the greatest impact for the least amount of effort.

WebPart Dev Templates

You can read the help files, now you can hit the ground running when you build WebParts with templates for VS.NET. This has been released before, this one is for the RTM version of SharePoint. Of course, one of the System Requirements for building a web part assembly is “Access to the Microsoft Windows SharePoint Services assembly”, which still hasn’t shipped yet. So no rush on downloading this one.

New version of RTC Client API

And speaking of SDKs, you can view the docs for v1.2 of the RTC Client API and download the SDK. This is an upgrade to the v1.0 of the RTC Client API that ships with WinXP. It’s been upgraded to support Live Communication Server (previously known as RTC Server). Unlike the P2P SDK, the RTC SDK is COM based, which should be easier to wrap in managed code

More Firewall Programming

BTW, if anyone is looking, you can code programmatically control the IPv4 firewall via the ICS/ICF API. And the docs for the IPv6 firewall SDK are online.

Links relevant to P2P

My contact on the P2P team just gave me two more important links for the construction of IPv6 based P2P apps. The first is IP Helper, a library included with XP that “enables the retrieval and modification of network configuration settings for the local computer”. I had never seen that library before, but it’s full of useful methods like GetAdaptersInfo and GetAdaptersAddresses. I want to be able to retrieve the IPv6 address of my NICs directly, so this is the library I need. Anyone out there wrapped it in managed code yet? I was hoping to do this part with WMI, but the IPv6 info doesn’t seem to be exposed via WMI.

The other relevant link is the IPv6 Internet Connection Firewall SDK, which “contains all the software required to configure the IPv6 Internet Connection Firewall”. I assume that means that I can open relevant ports to enable P2P communication. As I wrote yesterday, the issue I’m having with GraphChat is likely related to the IPv6 Firewall configuration. I’d like to include in my P2P managed library the ability to manage the IPv6 Firewall.