Power Failure Event Handling In Download Manager

free web hosting
Free Web Hosting > Computers & Tech > Programming

Power Failure Event Handling In Download Manager

turbopowerdmaxsteel
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.

 

 

 


Reply

turbopowerdmaxsteel
I managed to fix the corrupt file, by resuming downloads from 50 KB back markers. I guess this should do it for the problem.

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. power failure handling .net - 381.17 hr back. (1)
Similar Topics

Keywords : power, failure, event, handling, download, manager

  1. Need Help To Write Code To Upload/download (FTP)
    Sending server data... (3)


      Looking for power, failure, event, handling, download, manager

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for power, failure, event, handling, download, manager
advertisement




Power Failure Event Handling In Download Manager



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE