Code Monkey home page Code Monkey logo

blazer's Introduction

Love Go/Rust/C++, distributed systems, blockchain / Web3 tech.

reach me at: [email protected]

blazer's People

Contributors

setraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

blazer's Issues

Handle CRP (connection reset by peer) network error, when spawning lot of threads

Get "https://url/test.pdf": read tcp 192.168.0.113:56940->75.98.168.118:443: read: connection reset by peer
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x646d0a]

goroutine 773 [running]:
github.com/arvpyrna/blazer/network.DownloadSegment(0xc0008eef00, 0x1af, 0xd8d0b8, 0xd9517f)
/home/arv/lab/blazer/network/downloader.go:47 +0x34a
github.com/arvpyrna/blazer/network.ConcurrentDownloader.func1(0xc0005940b0, 0xc0008eef00, 0x1af, 0xd8d0b8, 0xd9517f)
/home/arv/lab/blazer/network/downloader.go:32 +0x75
created by github.com/arvpyrna/blazer/network.ConcurrentDownloader
/home/arv/lab/blazer/network/downloader.go:30 +0x30f

Publish as a homebrew package

For homebrew users like me it would be very cool if you can publish blazer as a package so that we can do

brew install blazer

and have it installed on our systems. Homebrew is majorly used for package management by mac users. It is also available for linux as well. :-)

Improve code quality

  • Apply clean code
  • Add comments for exported functions
  • Restructure the application to comply according to go standards
  • Имена пакетов и функций неидиоматичны (пакет "data", к примеру).

Handling network errors

-Get "https://logic.pdmi.ras.ru/~gravin/storage/Concrete_Mathematics_2e.pdf": dial tcp 83.149.197.121:443: i/o timeout

Handling segment retries

If a segment is not completely downloaded, need to retry that, create a new channel that will run those before merging files, do not merge files if there is not enough segments

More enhancements and bugs list

Todo:

  • show time elapsed
  • print the performance graph as well to see perfromance difference, using different number of threads and
  • show progress
  • also need support for google-drive, dropbox, a simple youtube version too.
  • use interactive terminal to show progress across each thread, so it more cooler
  • upload it to free file sharing service upto some MB, you can build one for yourself and share
    it with others, write in go, or node js and also use it here, a simple service
    the life of the service can be just 1 hour, there you can learn so many interesting things
  • download files after giving username and password(with authentication)
  • export as package too, later somehow
  • show current download speed and ETA (ETA depends on the number of threads, download speed, speed of server)
  • maintain history of downloads, if there is a flag -h = true

Bugs:

  • Handle the case where there is no internet
  • while downloading file if there is interruption and if the downloaded file is incomplete, what will you do,
    you can find out incomplete file download by checking expected bytes to be written and bytes written, and then
    you can try to retry that attempt
  • even if the program crashes, use exception handling and restart the download with same thread count
  • Create a ruby server and try to serve a 10 gb file and try to do the same in go and other servers and
    estimate performance and also node js

Help wanted:

  • unit testing
  • Write a compatable, high speed server to compliment this client
  • Support torrent based
  • GUI maybe in electron or QTCreate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.