|
|
|
|
![]() ![]() |
Jun 21 2006, 03:31 PM
Post
#1
|
|
|
Premium Member Group: [HOSTED] Posts: 410 Joined: 16-February 06 From: Kolkata, India Member No.: 11,322 myCENTs:82.69 |
Annoyed by the frequent power failures and voltage fluctuations, resulting in Bad Shutdowns, I made my own Download Manager in VB .NET. The download manager uses 4 simultaneous connections to download the file. The 4 parts are static and their range does not change throughout the operation. Before beginning the download, the size of the content is retrieved and a file of the same size, filled with the Hex value '00' is created. As the download begins, another file is created, which stores the current marker for each of the 4 connections, thus allowing the download process to be resumed. When resuming, the markers are shifted 10KB back each, to minimize the chances of data corruption due to power failures.
I have tried this process for files of around 10 MB size and tested by forcing bad shutdowns and it works (the file not getting corrupted). But, when I tried the same for a ~450 MB stuff, it got corrupted during download (which I only came to know, after the operation finished and tried running the file). I am sure it must have happened because of the power failures, which kept recurring. I even had Write Behind Caching disabled on the HDDs to make sure that the data was physically written. Inspite of all the safety measures, the file got corrupted. I want to resolve this problem for the future downloads, but I need to know what exactly happens during such an event (power failure, I mean). Here are some other details which might help :- > File Opened in Binary Mode after the '00' filled file was created and closed thereby resolving the problem of having the size of the download file modified. > Log File Maintained which contains all the locations of resume operations. I would appreciate any suggestion in resolving the issue. |
|
|
|
Jun 22 2006, 12:08 AM
Post
#2
|
|
|
Premium Member Group: [HOSTED] Posts: 410 Joined: 16-February 06 From: Kolkata, India Member No.: 11,322 myCENTs:82.69 |
I managed to fix the corrupt file, by resuming downloads from 50 KB back markers. I guess this should do it for the problem.
|
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 22nd November 2008 - 11:40 PM |