Hello again,

Anyone done threading or async notifications with Pylons?

I've got an app I'm working on and one feature is that you can upload a
file and it passes the file to other servers via FTP or SFTP. I'd like
to implement a list that shows you the upload progress.

The best way to do it, I think, would be to have a thread be created to
do the uploading for each server. Have the upload routine call some
notification function for progress, and have that information be passed
back out to the page via some kind of JSON over XmlHttpRequest or
something.

A less excellent, but potentially easier way to implement it, would be
to create a separate thread for each server and have it do the upload
all in one batch and then write success or failure messages into the
database. Have the page poll the database every N seconds to figure out
what the current status is. I like this less, but I think I could
probably implement that with the knowledge I have now.

A really lame way would be to fork a separate task to do all of the
uploads and write the success or failure messages into the database.

What would you guys do? How would you approach this problem?

Thanks,

-- 
Daniel Lyons
http://www.storytotell.org -- Tell It!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to