Re: ring streaming efficiency

2014-04-23 Thread James Reeves
Signed S3 URLs do expire, but you can set the expiry date far in the future, or you could generate the URLs on the fly and add them to a temporary redirect. My understanding is that you can also upload to S3 using temporary URLs, but I haven't tried it. In any case, I'd advise implementing it wit

Re: ring streaming efficiency

2014-04-22 Thread Andrew Chambers
I need access control for the static files. The alternative is signed s3 urls which expire. Uploads still require streaming through ring however as i cant generate signed upload urls with the parameters that I need. On Wednesday, April 23, 2014 3:27:09 PM UTC+12, James Reeves wrote: > > Java inp

Re: ring streaming efficiency

2014-04-22 Thread James Reeves
Java input streams are blocking, rather than asynchronous, so yes it would use a thread per stream. In theory an asynchronous solution would be more efficient, and there are adapters, like http-kit, that support this optimisation. However, in practice, Java can handle many threads in a single pro

ring streaming efficiency

2014-04-22 Thread Andrew Chambers
When you set the body of a ring response to a java input stream and return it, is this still a thread per stream? or does it use some sort of java event loop for efficiency? I'm worried that a traffic download/upload server in ring wouldn't handle many concurrent large file uploads and downloads