How does trigger.io handle bandwidth throttling, timeout, and retries in file upload requests?

StackOverflow https://stackoverflow.com/questions/14370386

Domanda

I've built a few native iPhone applications that required uploading large/hirez image files to a remote server. I've found that on 3g networks a request can get blocked/dropped if it uses too much bandwidth in a certain amount of time. I believe that to be about 1mb/min

reference: Max payload size for http request and response, iphone

How is this being handled in trigger.io's API call: request.ajax(options)?

Along the same lines, I've run into trouble with connections retrying multiple times after failure. By default is there any connection retry going on behind the scenes?... or will the error callback fire on first connection failure?

Also! Is there a way to set the timeout of the request from the client side?

È stato utile?

Soluzione

Currently, we don't offer any bandwidth throttling in the request module. The HTTP library we are using doesn't support it (note that the ASIHTTPRequest wrapper is no longer maintained, so we can't use that, unfortunately...).

If we find an alternative HTTP library which does support what we need and throttling, then we'd certainly consider switching to use it!

FWIW, we've not had any customers report problems with app store rejection due to bandwidth throttling (or lack of it).

Any connection or HTTP errors will result in the error callback being called - you have control over whatever retry logic you want.

For timeouts, see http://docs.trigger.io/en/v1.4/modules/request.html#ajax - timeout is a support parameter in the options hash.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top