Saturday, November 27, 2010

IT adventures at home

At home I have a reasonably complicated network 11 devices in total that need to connect to our network. Our network consists of 3 routers and 1 wifi access point (not the primary gateway like most home setups).

There are a total of 7 devices on the hard line and the remaining 4 exist purely on wirelsss.

Once a network gets this large some level of network management is required. In our network setup each zone exists in it's own IP range (still on the same subnet) and wireless is served in it's own subnet entirely.

The 3 routers have divided duty as:


The gateway is the most powerful of the 3 routers it's duty is to take care of QoS and firewall duties. As well as run the DHCP.

the internode is the linking point that distributes traffic it primarily operates as a switch and access point joining the wireless network to the primary network. It exclusively handles wireless traffic and isolates it from the network.

The downlink connects to the home server. The downlink also performs additional QoS functions as it is connected to the home server. The server is often throttled during peak times when other clients need to utilize more bandwidth.

With all this network management I was horrified when some random Chinese programs some family members installed just took down the entire network by using every last drop of upload bandwidth.

I recently discovered 2 offenders on my network PPStream and UUSee both are chinese P2P streaming programs and both analyse how much bandwidth you have in the upload channel and attempt to use up all of it. Unfortunately on modern routers with QoS still can't set a static maximum upload per host rule. Or more ideally the rule will be written as:

Allow burst traffic for up to 5 min (upload unrestricted). Then:
Throttle any additional upload from that host until their upload is less than 50% of the allotted cap.

Essentially a host would have to be transmitting past a set rate say more than 70% of your total upload capacity for a full 5 min before the throttle kicks in and it fixes the situation. Normal browsing wouldn't trigger this gaming wouldn't trigger this as most games don't have very high upload demands unless your the server. VoIP should get through just fine. And P2P software that allows the user to set limits would also work just fine. But those Chinese streaming software are particularly nasty and there's very little you can do to limit their rates.

Failing to communicate effectively to less technical users that they were essentially making our network unusable I resorted to a software solution. "NetLimiter 3 Lite" is employed currently on a trial basis to see if it can resolve the situation. Net limiter is unique in that it allows you to throttle on the client and on a per software basis. The offending pieces of software are now given a reasonable amount of bandwidth to work properly and so far the network seems to have recovered.

I'd recommend giving it a shot if your the network admin and you have control over client machine administration.

Friday, November 12, 2010

Javadoc Rant

Javadoc is this wonderful invention. It allows a programmer put a comment into their code above the methods they are writing in order to generate automatic API documentation. But it’s simplicity is also a curse often times Javadoc descriptions are absolutely awful.

And in some cases Javadoc descriptions which are suppose to contain how and why you would use something serve to only remind a programmer what the method name was called. For example in the GXT API for google web toolkit extra widgets we have this excerpt:


public TreeStyle getStyle()

Returns the tree style.
the tree style


Hmm… I think most programmers can guess the that from reading the method. But what is a style? In particular what is a TreeStyle? What does it define?

Almost all JavaDocs I’ve come across so far suffer from lack of information. If any JavaDoc users out there are listening. The reason many programmers flock to languages like C# is the documentation is gold. Javadoc is a great technology but if it is to compete Javadoc writers need to not only state what the method does but also mention why you may want to use it.

In addition almost every MSDN documentation I’ve seen to date gives at least one example of the method in practical use so the programmer has no doubt as to how to use that API. Ask yourself when’s the last time you saw a useful example inside a Javadoc?

Technology is great Javadoc is incredibly easy to generate, but the ease of use leads to very poor documentation. Most JavaDocs are an afterthought and it’s highly disappointing.