P2P Problems Solved

Someone from the P2P team internally saw my blog and set me a list of commands to execute and send back to him to help troubleshoot my problem. One of those commands was “net start pnrpsvc”. Aha! I hadn’t realized that the WinXP Adv. Networking Pack installed any services. Turns out it installs four, including the “Peer Name Resolution Protocol” service (i.e. pnrpsvc). What’s odd is that now that I’ve started it manually once, it seems to autostart on demand now. I can resolve addresses, as well as ping the seed server. GraphChat doesn’t work yet, but I think that’s because the IPv6 firewall only has two ports open by default – PNRP (UDP 3540) and Grouping (TCP 3587). The GraphChat sample uses a dynamically chosen port, which would be blocked.

So now that I’m back on track, I’ve got the PNRP namespace provider API wrapped in Managed C++. I can register, unregister, resolve and enumerate PNRP clouds from managed code. I’ve also got a first pass of the Identity Manager API and a skeleton of the Graphing API done. I’ll post code when I have a managed GraphChat sample working.

More on Function Interception

I got an email from Steve Maine who used JavaScript’s support for function pointers to extend the Page_ClientValidate function. Steve’s version calls the built-in version, but then sets the cursor focus to the first invalid control (assuming there are any). Pretty cool.

However, Steve goes on to talk about how quickly function interception can become unmaintainable. Dealing with the ability to override expected functionality is hard enough in object oriented languages. They call it the “fragile base class problem” for a reason. In JavaScript, you have the potential for the “fragile intercepted method problem”. Granted, my solution is also “intercepting” a method, albeit in a lo-tech, code injection, search-and-replace kind of way. But maintainability needs to be of paramount importance in system design. I don’t want to have to go mucking about in the plumbing primarily because plumbing skills are at a premium (I hear Don is trying to hire them all for his team).