[dancer-users] [Dancer-users] recommended way to return large dynamic data?
Gordon, Assaf
gordon at cshl.edu
Wed Oct 31 14:50:02 GMT 2012
Beautiful!
Now there's just one more thing I'm trying to do: have an automagic way to capture STDOUT and send it asynchronously back to the client (using async_send() ).
This will allow using dancer to send output just like old cgi programs (and also execute external programs to generate big output).
Something like Tie::STDOUT - but it only captures STDOUT inside perl code (no external programs)
Or Capture::Tiny - but it seems to do buffering.
So I'm not a sure how to implement it yet.
-Gordon
On Oct 31, 2012, at 10:34 AM, "sawyer x" <xsawyerx at gmail.com<mailto:xsawyerx at gmail.com>> wrote:
You might be interested in this usage case:
https://gist.github.com/3987355
It allows you to run async code in a fork, wait for it in a condition variable and send it asynchronously to the user.
It's based on Gordon's (ab)use of my insane additions to the send_file() function in Dancer.
s.
_______________________________________________
dancer-users mailing list
dancer-users at dancer.pm<mailto:dancer-users at dancer.pm>
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
More information about the dancer-users
mailing list