September 11, 2007

Bandwidth Estimation using Clink - hang fix

Filed under: Ideas, Projects, School — Benjamin Chodroff @ 10:56 pm

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.

Taj Mahal, Agra and Red Fort, Delhi

Filed under: Life, Photography, Travel — Benjamin Chodroff @ 9:35 pm

The Taj Mahal certainly deserves its official title as one of the seven wonders. The inlaid marble work is simply exquisite and the overall impressiveness of the building makes one stair in awe. I had a guide show me around and explain the history. Simply writing about the Taj is no way to appreciate it. I am glad I have had the opportunity to see it for myself.

After seeing some shops in Agra, my driver took me to Mathura and Brindavan. These places are off the beaten path for most western tourists as was quite obvious by the stairs I got. Thousands and thousands of Hindu pilgrims visit Mathura as it is the birthplace of Lord Krishna. Myself, a boat rower, and a guide drifted down the river to a temple located on the water. I didn’t quite understand everything that was going on but the site was beautiful. I saw where Krishna is said to have been born and I repeated a prayer that protected my family. They asked for a donation (Rs 10,000!), but were quite understanding when I told them I was only a student and offered Rs 20. Brindavan is a beautiful temple on the way back to Delhi. Hundreds of Hindus were inside singing songs and walking through the beautiful courtyards. Unfortunately, photography was strictly not allowed.

I did wander around Delhi quite a bit. I met Dana and her sister Maya and we toured the Red Fort together. We ran from building to building to avoid the rain and had a great time. After lunch, we purchased sweets, talked in the park, and then went back to Metropolis for drinks. The streets of Paharganj are certainly a curious place.

Sitar Shopping in Delhi

Filed under: Life, Photography, Travel — Benjamin Chodroff @ 9:31 pm

My sole mission for Delhi was to find a sitar for myself. By chance, I ended up in a hotel just down the road from a small music shop “Music Emporium”, owned by Shan Khan. I dropped into his shop the first night I arrived in Delhi and we hit it off immediately. He showed me some fine sitars and I began to learn what to look for when picking a sitar. I spent the next couple of days catching rickshaws all over Delhi looking at all the sitars. Of course, I poked into Rikhi Rham’s shop, the place where the Beatles’ purchased their sitars. I must have visited over 10 shops before realizing that the sitar I wanted was the one at the Music Emporium. The tone quality and craftsmanship just couldn’t be beat.

Shan invited me to hear his brother, Nasir Khan play the sarangi at his house. It was a once in a lifetime concert. The saragi is in some ways like a cello in that it has 4 bass strings which are bowed and it is a fretless instrument. However, the unique part of this Indian instrument is the use of sympathetic string which reverberate making each note sing out. It is a remarkable instrument and Nasir Khan made a performance of a lifetime. Shan recorded a video and I took photographs of the virtuoso as he played. Afterwords, Shan took me on his bike over to his shop where his Gurugi was working on assembling an instrument. Next, we headed over to his shop and we shared lunch - chole bhature, which was fantastic. I watched his shop for a bit (noodling on the violin to bollywood tunes) while he ran some errands. Later that afternoon, we headed over to meet his other brother who watched over the factory where the drums were assembled. Then, a motorcycle tour of Old Delhi where we ultimately ended up at Jama Masjid mosque. He did his prayers while I explored and snapped some shots. I spent the rest of the day noodling on the instruments in the shop until the evening.

June 13, 2007

Top 5 Ways to Develop LSL Scripts for Second Life

Filed under: Ideas, Musings, Projects — Benjamin Chodroff @ 11:03 am

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!

May 5, 2007

Hidden Process Download for Windows (Cyber Cafe)

Filed under: Hacks, Ideas, Musings, Travel — Benjamin Chodroff @ 12:03 am

Suppose you’re in a foreign land and the only internet you have is a cyber cafe that considers 5 kb/sec as “broadband”. Obviously, downloading your 600 MB CD Image file is going to take you longer than a good sitting, so you need a plan. To further complicate the problem, these computers have no cd burner - but you’re lucky enough to have a single USB port and a memory stick.

Tools:

  • wget for Windows - a unix http/ftp download utility ported to windows
  • quiet - a freeware command line tool that spawns a process into the background (does not show up in taskbar - only processes)
  • file splitter
  • computer with Windows 95 or above, usb port, internet
  • a USB memory stick

Once you have all these tools, you’re ready to start.

In my case, I placed all these tools in a single directory in c:\windows called “quiet”. I then created a shortcut on the desktop (right click, new shortcut). For the command line, i set it as:

C:\WINDOWS\Quiet\Quiet.exe C:\WINDOWS\Quiet\wget.exe -c http://www.website.com/DOWNLOADTHIS.ISO

The “-c” argument for wget tells it to continue. This is important in case the computer is restarted, it will resume the download. I then placed the shortcut in the Windows program files startup folder in case the computer is restarted, logged off, etc.
Of course, this trick might not work for you if they really have the computer locked down.

Return back after a few hours, use the file splitter utility to split the downloaded file into chunks to copy onto the memory stick and copy to a laptop. Piece the files back together, and enjoy :)

Simple, but quite handy.

« Newer PostsOlder Posts »
Copyright 2008, Benjamin Chodroff.
Site design by Flique Creative, Cleveland, OH