Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8884887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:10:26+00:00 2026-06-14T21:10:26+00:00

I need to cache an ftp folder locally in ruby. Right now I’m using

  • 0

I need to cache an ftp folder locally in ruby. Right now I’m using ftp_sync to download the ftp folder but it’s painfully slow, do you guys know any library that can download the folder files in parallel?
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:10:27+00:00Added an answer on June 14, 2026 at 9:10 pm

    The syncftp gem may help you:

    http://rubydoc.info/gems/syncftp/0.0.3/frames

    Ruby has a decent built-in FTP library in case you want to roll your own:

    http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/ftp/rdoc/Net/FTP.html

    To download files in parallel, you can use multiple threads with timeouts:

    Ruby Net::FTP Timeout Threads

    A great way to get parallel work done is Celluloid, the concurrent framework:

    https://github.com/celluloid/celluloid

    All that said, if the download speed is limited to your overall network bandwidth, then none of these approaches will help much.

    To speed up the transfers in this case, be sure you’re only downloading the information that’s changed: new files and changed sections of existing files.

    Segmented downloading can give massive speedups in some cases, such as downloaded big log files where only a small percentage of the file has changed, and the changes are all at the end of the file, and are all appends.

    You can also consider shelling out to the command line. There are many tools that can help you with this. A good general-purpose one is “curl”, which supports simple ranges for FTP files as well, for example you can get the first 100 bytes of a document using FTP like this:

    curl -r 0-99 ftp://www.get.this/README
    

    Are you open to other protocols besides FTP? Take a look at the “rsync” command, which is excellent for download synchronization. The rsync command has many optimizations to transfer just the changed data. For example rsync can sync a remote directory to a local directory like this:

    rsync -auvC me@my.com:/remote/foo/ /local/foo/ 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to cache images locally and was thinking about saving them as SerializableDictionary
I need to cache a large (but variable) number of smallish (1 kilobyte to
I need to cache an xml that I am reading. I'm using C# 4.0.
I am building an iOS app using Rubymotion. I need to cache remote images
I need to cache a php-generated image, but the content of the image (which
I'm using this code to preload all the images I need var cache =
In my DataCache I need to cache an object using two indexes. Say I
I need to cache objects in Java using a proportion of whatever RAM is
I need to cache CakePHP elements. But my elements differ with parameters. myElement takes
I need to cache some application specific data using Symfony 2's caching system so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.