Sep 11 2007

Bandwidth Estimation using Clink - hang fix

Part of my masters project work involves using network measurement tools to garner information about a path to a website. One useful type of tool that I don’t believe is used that often is a bandwidth estimation tool. These type of tools employ one of a variety of methods to estimate the available bandwidth between each TTL hop along a given router path to a host. To learn more about these tools, including clink, I recommend reading “Creating a Bandwidth Estimation Testbed Summer 2001 Status Report.”
One of these tools, Clink, was written by Allen Downey and has made significant improvements to Van Jaconbson’s similar tool, pathchar. Unfortunately, I noticed a problem where clink seemed to hang on certain hosts. I don’t believe I am alone in reporting this problem. In, “Measuring Bandwidth between PlanetLab Nodes” (PDF Link) as published in the proceedings of PAM 2005 – Passive & Active Measurement Workshop, the researchers noticed that clink would hang on PlanetLab’s machines and attributed the hang to a possible Linux kernel version problem. It is possible the kernel is the case, but I ran into another situation where clink would experience what looked like a program hang and might explain their hang as well.

When clink experiences a timeout on a probe to a TTL hop, it simply retries the probe again. Of course, if the router has been setup to not respond to UDP packets as many routers in todays internet are now setup to do, clink will endlessly try probing the router with no success. To the end user, this looks like a hang, but a tcpdump will confirm clink is still firing off the same UDP packet probe over and over. When clink was written in 1998-99, many routers were configured to (nicely) respond to a probe, but this is not the case any more.

Because I found clink’s bandwidth estimation using the even-odd technique even-odd technique, as described in the SIGCOMM paper, to be the best available, I rewrote part of the code to fix the infinite loop bug caused by router timeouts. I introduced two new program arguments. The first is a maximum probe retry value and the second being a maximum probe failures per TTL hop. Therefore, you could retry a probe of a specific size against a specific TTL hop multiple times using the first argument before declaring the probe a failure. Then, if the number of probe failures on a specific TTL hop exceed the second argument, the TTL hop is simply indicated as failed and is skipped. Clink then goes on to measure the rest of the hops.

I am not publishing the code patches yet as I am still testing it, but if you are interested in taking a peak at it, please comment and I’ll email you a copy.


Jun 13 2007

Top 5 Ways to Develop LSL Scripts for Second Life

So you have registered with Second Life and read some tutorials on Linden Scripting (I recommend the “Tutorial” and “Kan-ed: Using Linden Script Language” to start with). Now, you need to get the tools of the trade to get your LSL code going! There is a lengthy list of possible LSL editors, but here are my top choices.

5. Notepad

Trusted and proven reliable, many a great Second Life script has been jotted down or at least temporarily saved in this application. Second Life scripts are saved in objects which reside on Linden Lab’s servers - so when the internet connection goes away, so does your development. Having your scripts backed up in a text file is highly recommended in case the object gets deleted, is lost, or floats away!

4. Second Life Editor

It’s built in and there’s no extra downloads required. Simply go to a sandbox, right click on the region, select “Create”, and put an Object in. Then, go into the object’s contents and add a script. The built in compiler can be somewhat slow for large scripts, but doing these steps is inevitable for creating objects in Second Life. The obvious downside is when you have a large script that needs lots of testing, these steps become very time consuming. On the plus side, the code is kept safely on SL’s servers and by using groups you can allow multiple people to work on the code. However, there is no revision control or undo - so beware!

3. lslint

When used alone, this handy tool is one of the quickest ways of checking if an LSL script is syntactically correct. It simply checks variables and functions for validity and can even warn you if defined variables are not being used in the script. However, this program is console based only and therefore is quite limited in ease of use. On the plus side, it is incredibly tiny, allows you to work offline, and integrates quite nicely into other tools, such as Eclipse, with no modification. Of course, you will ultimately have to copy your LSL code into the Second Life Editor for testing and integration.

2. Byronstar-SL - Eclipse LSL Plugin

Eclipse is just a beautiful IDE tool and having an LSL plugin is quite a nice addition. Not only can you work on LSL scripts, but with additional Eclipse plugins, you can synchronize your Trac wiki, upload your scripts to an SVN using Subclipse, and develop Java, PHP, C++, <your favorite code here> too all in one nice package. The downsides are Eclipse isn’t for the light of heart - it is a professional tool for developers and the learning curve is the steepest among all the tools. It can be integrated with lslint to give very detailed errors in the code. The downside is it still doesn’t allow you to test code at all beyond syntax errors. However, if you plan on working on a team of cross-platform LSL developers and need a nice IDE that integrates well with a central code version repository, Eclipse is a great solution.

1. LSL-Editor

What a great application. Not only does it allow you to test your script for syntax errors while offline, it actually emulates Second Life and allows you to *run* your code. This includes llHTTPRequest and many other advanced functions, dialog boxes, and more! It has a very nice GUI interface for editing code complete with highlighting tips and IntelliSense-like functionality. The downsides are that this is a .NET application and if you’re running Linux, you might be out of luck (might run in WINE - not sure). Also, it lacks the integration that Eclipse provides, but honestly, it more than makes up for this loss with its advanced features. You’ll love the ability to both check and test your code.

Know a tool that has revolutionized your Second Life scripting that isn’t mentioned here? Please let me know!


Dec 9 2006

Problems with Hauppauge PVR-500MCE with Windows Media Center Edition 2005

I have spent the better part of this last month wrestling with technical support and a slew of forums trying to get my Hauppauge PVR-500MCE tv tuner to work in Windows Media Center 2005.

At first, the card that I purchased from NewEgg had experienced poor reception quality in the lower chanels (mostly 2-8). I noticed this problem while running the card using MythTV (using ivtv 0.7 and knoppmyth). I assumed this must be a problem with ivtv’s support for the card under linux, and decided to see what I was missing by switching over to Windows MCE 2005. The card was designed for the Windows operating system, so how hard could it be to install it?

Very, very, very hard.

First of all, hauppauge’s support page is very confusing. It provides you with a download for some zip file which contains all the drivers for Media Center - but then they have a whole slew of other drivers and beta drivers and….which one is the correct one? Who knows?!

To make a very long story short, I ended up getting the card to work in Windows XP, but not in Windows Media Center. I was able to run the TV in WinTV 2000 and the lower number channels were *still* very fuzzy and would sometimes even go into black and white. Horrible. In Windows Media Center, I was unable to event tune into the channels.

I had Hauppauge replace the card. They commented, “This card [the PVR-500MCE] would be great if it ever worked.” Apparently, I am not the only one who has experienced problems with this card. Simply google the card and be amazed at how many people have problems with it.

After two weeks, I received my brand spanking new Hauppauge PVR-500MCE card in the mail. I popped in the card and got it to work in WinTV2005, but Media Center reported:

“the tuner hardware is either malfunctioning or not installed. please ensure that both the tuner hardware and a valid tuner hardware driver are installed.”

I played it safe - I reinstalled Windows XP Media Center 2005, including rollup2. Still, the same problem. I took out all the PCI cards from the computer except the card, and changed the cards position. Still, the same error.

Now, this is clearly a Windows XP Media Center problem - because the card works beautifully in WinTV 2000. However, I blame both Hauppauge and Microsoft for such a horrible experience. I am going back to Linux (SUSE + MythTV), but I am not happy.


Oct 30 2006

Toasted Pumpkin Seeds

After stealing two pumpkins from the Halloween at the Farm (which was a bust due to inclement weather), Meredith, Axel, and I sliced and diced until we had created two masterpieces and a heaping pile of pumpkin guts. Axel carved a sailboat into his pumpkin and Meredith and I created a smiley emoticon pumpkin. There are pictures of the final products in my gallery. Only at Case…

There are three options presented with pumpkin guts. You could throw them away and you would be very lame. If you are seeking mischief on a neighbor’s garden or simply enjoy growing yearly copious quantities of pumpkins for the rest of eternity, you could plant the seeds. However, the best option is the tastiest. Eat them.

I followed the Joy of Cooking’s directions and baked the seeds (which Meredith and I separated from the guts by washing them in a strainer) for an hour and a half at 250 degrees. Before baking, I coated them with a little kosher salt. I just found some more exotic pumpkin seed recipes that I would be interested in trying next year.


Sep 28 2006

Stolen Bike - Radio Alarm Bike Lock

My bike got stolen. It happened sometime between 10:30pm last night and 11:00 am this morning. I filed an incident report with Campus Security, but that bike is gone. I should have used a better lock. A pair of bolt cutters could have gone through that lock in a matter of minutes, if not seconds.

The thief might have won the battle, but he won’t necessarily win the war.

I want to build a Radio Alarm Bike lock and lock up a decoy bike. This is a simple device that could be built using a cheap-o cable bike lock, a radioshack plastic enclosure box, and an FM broadcast circuit. When the bike lock is cut, it would activate the weak FM distress signal. I would have a radio tuned to this FM frequency in my room and amplified. I could then go out and beat the @#$% out of the thief with a large blunt object. Or, this could activate a security camera, call security, etc.

Unfortunately, I have no funds for this project. It would probably cost me $50. Any donors or interested parties?