2004 - May
2004 - April
2004 - March
2004 - February
2004 - January
Does 2004 look like a slow year to you yet? Earlier it was classes, now it is a job. Well at least one significant thing has happened this month and this is the official debut of the 0.1.1.0 series with wip2... although the initial wip0 build was posted in late April.
I was originally thinking about starting the board along with the first 0.1.1.0 series build which I wanted to make public on May 15 but now that I have decided to make a 0.1.1.0 preview build available today, I figured the board should open today as well for a test-drive if anyone is interested.
Ok, my last exam is over so I can go back on MT full-time for a little while. Since the only few items that were left to do in my original alpha3-final announcement do not fit with my alpha4 plans, I have decided to cut those last few corners and release alpha3 as-is with some incremental improvements over wip6 so I can concentrate on alpha4. Some may be upset that I postponed some fixes but I am sure they will forgive me once they get a grip on alpha4-wip1 which should have many substantial improvements and re-design all-around.
Changes from 0.1.0.1-alpha2-final to 0.1.0.1-alpha3-final
- Implement some extra GUI features:
- Check for an existing instance and pop it up if there is one.
- Associating .torrent files with MoonlightTorrent.exe will now add files to the currently running instance when there is one.
- Changed the application dialog creation method from Modal to Create, no more misleading automatic OK/Cancel/Help/Apply buttons. This appears to have fixed resizing issues with Win9x.
- Torrents and Clients lists
- Torrent pages are now independant from the torrent list. Double-click a torrent in the torrent list to automatically open and switch to its page.
- Context menus
- Apply action to whole selection
- Torrent list:
- Cancel (remove torrent after finishing outbound in-flight chunks or 60 seconds, whichever comes first)
- Park (finish downloading currently active pieces)
- Open / Close Torrent tab
- Peer lists:
- Manual Choke/Unchoke
- Remove from list
- Manual Connect
- Close Torrent tab
- Park and Cancel
- Column-sort for Torrents and Peers lists.
- Share column widths and order across all torrent pages
- Fixes:
- Potential access violation after removing a Torrent tab.
- "Cancel Torrent" from peers list did not work due to enumeration members name clash causing incorrect enumeration values.
- Tweaks:
- Removed redundant torrent page tracking code. (Though I will have put something similar back in after I implement list view progress graphs.)
- Core:
- Threaded download piece checker to remove piece hashing from the CCriticalSection code paths since this often causes MP3s to skip and video playback to be jerky.
- Optimized bitfield manipulations to make the core faster. (3.5X as fast bitwise ops, 30X as fast bit counting.)
- Do limited request pre-generation to reduce the number of times the piece selection code needs to run and sort active download pieces from least to most available so pregenerated requests for common pieces get used last.
- Make the core asynchroneous (again) to spread the processing load more evenly in time. (Still somewhat experimental.)
- Fixes:
- Access violation after cancelling a torrent from the file "Open" dialog.
- Opening a non-existing or inaccessible .torrent file should no longer do ugly things.
- Reset piece timers on downloaded pieces queued for delayed hashing.
- Added a sanity-check in multi-file torrent save directory picking to prevent accidental saving under paths like x:\dir\torrent_name\torrent_name.
- Requested chunk lists were not cleared on peer disconnect until the peer timed out, this caused the last few chunks of a torrent to linger unasked for a long time.
- Miscellaneous:
- Store application data in non-random locations.
- Clean-ups:
- Removed some leftovers from the "veryprealpha" days
- Removed redundant computations in download assignment code
- Removed multiple sockets per peer capability (wonder why I ever implemented it like that in the first place)
- Consolidated message elements into structures to reduce the number of buffer manipulations
- Simplified lag correction to make it more correct
Unfortunately for the fans (do I have any?), nothing more than a few WIPs this month.
Almost a month since the last plain-alpha build. Although the alpha version number is double that of the previous one, I do believe alpha2 is far more than twice as stable.
If you want it, you can get it there:
List of significant changes from 0.1.0.1-alpha1 to 0.1.0.1-alpha2:
- Fixes:
- Memory allocation failures that occur when negative amounts of data are requested thanks to the forced FIFO flush added to push requests - see the Tweaks section.
- Quarantined blocks remain indefinitely quarantined, download with failed pieces needed to be restarted to finish them.
- Typo in client deletion clean-up caused pending requests to be "cancelled" instead of being deleted, causing requests to linger and eventually cause a crash when they try to remove themselves from the peer's request queue when they are about to be purged.
- Connections refused by expiring peer records were occasionally being deleted twice, thereby crashing the program.
- Patched a glitch that can cause upload requests to remain alive after their respective peers have been deleted.
- Files were being closed erroneously and agressively, leading to spurious file-related issues.
- Various timing and sequencing glitches that occasionally resulted in accesses to deleted objects.
- Missing auto-delete timer resets causing some objects to 'poof' out of existence while some calls through them are in progress.
- "Middle-of-nowhere" crash-bug - the stack gets corrupted under certain circumstances when data extraction was done to a local (allocated on stack) variable by erroneously overwriting data around the target (stack) address.
- Pointer list related crash-bug - when deleting the current node's object, the 'next' node can be indirectly deleted, in which case the 'next' node no longer exists and a crash occurs in the next iteration.
- When sending requested chunks, the incorrect bandwidth management parameter was used to determine wether or not bandwidth was available.
- Added code to skip HTTP headers from tracker responses before feeding them to my BEncode loader since the loader sometimes gets confused by them.
- Added code to clean up extraneous unchoked clients and keep a maximum of three extras for these rare occasions where the top unchoked clients fail to consume all bandwidth.
- Erroneous variable reference causing weird bandwidth allocation and choking/unchoking patterns.
- Typo in piece 'purge' code (failed hash) causes chunks of that piece to get stuck with 'downloaded' status.
- Tweaks:
- Flush the TX queue when requesting piece chunks to force requests and cancellations out the door regardless of bandwidth constraints so requests and cancellations get sent before they time out.
- Adjust request queue lengths to each peer's apparent upload speed to prevent slow clients from being assigned more requests than they can ever manage to send before they time out.
- Preliminary implementation of scores-based bandwidth allocation and choking.
- Preliminary implementation of timer compensation - the lag on my P120 was killing everything by time outs.
- Round-Robin concurrent file hashing to accelerate multiple torrent download start-up. This appears to also help improve throughput with USB HDDs.
- Optimizations:
- Turned on most compiler and linker optimizations.
- Reduced bandwidth allocation rounds frequency from 10x/s to 1x/s, merged the allocation iteration with the timed maintenance to reduce processing overhead.
A little more than two months after I originally started working on MoonlightTorrent comes the first time I felt like increasing the version number. Since quite a bit of temporary code got rewritten by more permanent implementations and this in turned started to shape up as the first significant rewrite, it felt only right to make it make a difference in the version number.
Factoids:
- If one defined the 'birth' of MT as the first day I started writing code for it, then MT started as a .torrent loader, then MT is a little more than two months old.
- If one defined the 'birth' of MT as the day where it started transferring data, then MT is now a day over a month old.
- If it is defined as the day where transfers started working both ways, then MT is only a little more than three weeks old.
Here are the most relevant changes from 0.1.0.0-alpha1 to 0.1.0.1-alpha1:
- Fixes:
- The final piece is perpetually 'corrupt' when the file size is an exact multiple of the piece size.
- Status: Fixed in alpha2-pre1.
- Bug present since: probably ever since MT became download-capable.
- Chunk requests are occasionally sent out in double, sometimes triple and occasionally even worse - then followed by a matching number of duplicate piece responses if the peer does not do sanity checks on incoming requests.
- Status: Added a sanity check in the request sending code to reject duplicate consecutive requests in alpha2-pre3.
- Spaghetti code because: I wanted to get the basic request handling out of the way to get downloads working.
- This sanity check is a temporary work-around that will not be necessary once the permanent request handling code will be in there.
- Untimely piece timeouts.
- Status: Fixed in alpha2-pre3.
- Untimely since: the day I added code to delay timeout of slow pieces.
- Fixed 'Off-by-One' message length check that caused some messages to be indefinitely delayed in the socket buffer.
- Status: Fixed in 0.1.0.1-alpha1, this bug was probably introduced in 0.1.0.0-alpha2
- Improvements:
- Replaced temporary request manager by the permanent implementation, still needs some fixes and various improvements.
- Request pipelining, still need to figure out why some requests are duplicated and why so many piece messages get junked even
- All version from alpha1 and back are pre-generating requests, which means when peers Unchoke, there may not always be any available matching pieces to be requested from it and the unchoke will go to waste.
- Status: Rewritten to generate requests as necessary in alpha2-pre2.
- Dumb idea since: always until alpha2-pre2.
- Bandwidth repartition for torrents and clients are scaled with the global bandwidth settings in alpha2-pre2.
- Per-client upload limit is 1/8th of total upload speed and 1/4th of the total download speed.
- Per-torrent bandwidth limits are 75% of the total each way.
- Optimizations:
- Eliminated a buffer copy after discovering IOCtl(FIONREAD) which allows me to create RX buffers just the right size instead or receiving in an oversized buffer then copy that to a properly sized one.
- The progress bar shader is now done in two passes to remove most conditional code from the main loop. A second main loop handles the 'special' (active pieces) cases.
- GUI Additions:
- Torrent client lists show what piece/offset is currently being requested from each client.
- Implemented in: alpha2-pre3
- Show unchoke Scores. (They are not used yet but I'm sure you are smart enough to figure out what they are for.)
- Implemented in: alpha2-pre3
- Get it there: MoonlightTorrent v0.1.0.1-alpha1 (2004-01-18, 245KB)
See the MT-0.1.0.1-alpha1 notes since everything relevant was moved there and most extraneous comments are gone.
- Get it there: MoonlightTorrent v0.1.0.0-alpha2-pre2 (241KB)
This might be the last build for a while since all the essential stuff is done and more important things will be on my agenda soon. - Piece resuming on torrent reload is now functionnal - an essential for those 1MB/piece torrents to reduce restart waste.
- Clients are tried up to three times before giving up on contacting them.
- Fixed a bunch of compiler warnings, broke quite a bit of stuff in the process or standardizing on ints, still in the process of assessing what got broken.
- Fixed quarantined pieces never getting un-quarantined - or so I think.
- Multi-torrent saves now auto-create the torrent's top directory using the .torrent name key, veryprealpha5 required that the torrent's top directory be created prior to saving.
- The directory browser now shows the last save directory on initial display.
- Fixed irregular and often very excessive tracker update delays.
- Probably tweaked, fixed (and maybe broke) many other things I forgot to write down.
Now working on alpha1, room cleaning and preparing for winter classes...
- Digital system design - has a reputation of being a major time hog.
- Digital control systems - took it and dropped it last summer because it did not go the way I wanted it to.
- Analog filter design - since it is a 4-credits class (like the digital control one), it will most likely require some work.
- Project profitability analysis - I hate finances, failed it the first time around but it is mandatory. While the calculations themselves are pretty damn basic, there is a seemingly endless amount of them and because they're all related, forgetting one little detail can mean having to re-calculate and re-write pages worth of tables.
- Happy New Year!
Hits since December 5, 2003:

Generated on Fri Mar 11 02:11:01 2005 for MoonlightTorrent(.com) by
1.4.1