简体   繁体   中英

Download Progress Bar

I am writing some web software that will download files from the internet. Now I will be setting up a backend job queue that will read a database to see if there are any new files to download. Then it will download whatever needs to be downloaded and somehow communicate the progress to the user of the website.

To show the progress I was thinking of having the download script write data to memecached or redis so that an ajax script on the website can read the cache entry and update the progress bar so the user can see how much has been downloaded and how much is left, ect...

So this all seems manageable, it's actually no problem for me to create this type of application. But I was wondering if there is any software i should take a look at before continuing. For example, for task queue management i was looking at http://celeryproject.org/ . Is there a PHP equivalent?

For the frontend ajax I was just going to read the cache entry using jquery and a php script and update the html. Do you think node.js is worth using in this case? I mean the user might have 10 simultaneous downloads each having their own progress bar.

Any suggestions would be appreciated.

Thanks

You might consider using websockets to push the progress information from the server script directly to the client side rather than go thru the redis or memcached middleman. In that case node.js might be helpful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM