On Wed, Oct 21, 2009 at 7:49 AM, Stefan Richter <[email protected]> wrote:
>
> The response is in this case not received by the Flex client until the
> PDF conversion is complete, resulting in a delay on the client before
> the upload is marked as completed.

Right, because even if you could get CF to send the stuff you're
outputting (you could probably use cfflush, but that might not work in
this case anyway), Flex isn't going to do anything about it until the
full response from the server is done.

> How could I change this so that the response is sent first, and then
> the conversion kicked into life? The Flex client can later check the
> conversion status itself by polling the database.

This is what we do.... I've got a reporting app written in Flex and CF
where a user runs a search then has an opportunity to generate a CSV
or Excel file.  So when Flex sends the request, the first thing I do
is estimate the time it will take based on then umber of rows, and if
it's going to be more than 10 seconds or so, I "queue" the result and
return a response to Flex....

I have a scheduled process that runs every minute to check the queue,
and it fires off an event gateway to handle the file generation, and
the flex app checks every 15 seconds for a "completed" file drop ...
we have a relatively small userbase so the constant checking (from the
time the request is generated to the time it is completed) doesn't
drag on our server.

this queuing process also allows us to limit report production to "one
at a time"

Rick

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327427
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to