Skip to content

HusseinElguindi/mtd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mtd

Golang multithreaded/concurrent downloader. Work in progress, any contribution or feedback is appreciated!

Installation

go get github.com/husseinelguindi/mtd

Features/To-Do

  • Concurrent chunked download through Goroutines
  • HTTP/HTTPS download support
  • Offset write to file
  • Synchronized writing to file (never write 2 things at once)
  • Go module/library interface
  • Multiple downloads in a single instance
  • Pause/resume support
  • Command line interface
    • Args
    • Console input

Design Choices

Synchronized Writing

A writer Goroutine that only writes one chunk at a time, this was done for a number of a simple reason:

  • Seeking to a location in a file, physically moves the write head of a hard drive, which slows the writing to a file.
  • This means that writing chunks, that are near each other, would yield better performance, avoiding the hard drive seek delay.
  • This also means that using a bigger chunk/buffer size is beneficial to write speeds (less system calls, as well).

About

Go multithreaded downloader.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages