hoccer / scrum

General software management
0 stars 0 forks source link

investigate Up/Download process #94

Closed JacobZ closed 10 years ago

JacobZ commented 10 years ago

missbehavior: Once the sender chose its attachment and pressed the send button, the receiver displays the attachment in Download state. But the sender is not uploading it yet. First comes the encryption then the upload. Encryption can take a while for large files. On receiver side it looks like nothing happens and the download is stuck. When the sender finally uploaded the attachment, the reciever is still stuck and does not download. Pause and Continue starts the download finally.

JacobZ commented 10 years ago
JacobZ commented 10 years ago

Downloads

Currently the Android Client does this:

  1. Uploader tells Server he wants to upload something
  2. Server generates Up/Download URLs and notifies Uploader and Receiver (Downloader)
  3. Uploader encrypts the attachment and stores it on the Clients Filesystem (this may take a while depending on the filesize)
  4. Downloader tries immediatly to download the attachment \ it tries 5 times to download with no delay between the download attempts itself

Since the Uploader is busy with encrypting, nothing will be uploaded till this is done. In the same time the downloader does not find anything to download. After 5 retries it gives up and need to be started manually again. This is mostly an issue with large files since encrypting an image is pretty fast (depends on the device)

Uploads

Most of the time uploads working pretty well. There is one issue when uploading the same file twice at the same time. Filecache uses the same File instance on its Filesystem which means that different Connections are trying to write to this file.