Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming file download while creating? #169

Closed
drewB opened this issue Feb 7, 2013 · 3 comments
Closed

Streaming file download while creating? #169

drewB opened this issue Feb 7, 2013 · 3 comments

Comments

@drewB
Copy link

drewB commented Feb 7, 2013

I am creating a file that can take a while to generate. I was thinking I would background the processing but then it occurred to me that I could do a streaming file download while I create the file. Is it possible to do that using the streamIO feature mentioned in #11?

@randym
Copy link
Owner

randym commented Feb 7, 2013

Hi @drewB

To the best of my limited knowledge, this is not going to be possible. The entire file needs to be serialized and zipped to be a valid OOXML file.

Regardless, it is still going to be chewing up that connection so you are probably better served by spinning off a job (resque et. al.) that generates the report on a worker machine (not your application server) and stores the data on an assets server tuned for concurrent downloads.

Once the report is ready, you can send the end user an email with a download link that lets them download it from that dedicated server.

I think that is really the only scalable way to do large report generation and delivery while protecting the performance of your core application.

@drewB
Copy link
Author

drewB commented Feb 7, 2013

That makes sense. Thanks for your response.

@drewB drewB closed this as completed Feb 7, 2013
@wvengen
Copy link

wvengen commented Sep 19, 2017

If you need this, look at xlsxtream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants