From: Alan T on
Just wanted to know if I can do this:

1) User click a button on a page
2) It creates a thread
3) The thread will generate a report
4) This process may take up to a couple of minutes. eg. 5 minutes
5) Before the process finish the client exit and close the browser
6) The process will still keep doing its job until the report/file is
generated

Do you think it is possible?

The reason I am think of this way is the user does not need to wait for the
5 minutes keep the browser opening in blank mode.


From: Registered User on
On Tue, 13 Jul 2010 10:36:41 +1000, "Alan T"
<alan_NO_SPAM_pltse(a)yahoo.com.au> wrote:

>Just wanted to know if I can do this:
>
>1) User click a button on a page
>2) It creates a thread
>3) The thread will generate a report
>4) This process may take up to a couple of minutes. eg. 5 minutes
>5) Before the process finish the client exit and close the browser
>6) The process will still keep doing its job until the report/file is
>generated
>
>Do you think it is possible?
>
It is possible to do but what happens to the report after it has been
generated and the client-server connection no longer exists? If the
report gets written to some datastore for later retrieval, you're
adding some unnecessary complexity. Just have the web app hand the
request off to service that writes the generated report to a datastore
which is visible to both the service and web app.

>The reason I am think of this way is the user does not need to wait for the
>5 minutes keep the browser opening in blank mode.
>
If this _has_ to be done in browser in real-time I would consider
using an asynchronous request. Even so 'couple of minutes' will seem
like an eternity to the user.

regards
A.G.
From: Alan T on
>>Just wanted to know if I can do this:
>>
>>1) User click a button on a page
>>2) It creates a thread
>>3) The thread will generate a report
>>4) This process may take up to a couple of minutes. eg. 5 minutes
>>5) Before the process finish the client exit and close the browser
>>6) The process will still keep doing its job until the report/file is
>>generated
>>
>>Do you think it is possible?
>>
> It is possible to do but what happens to the report after it has been
> generated and the client-server connection no longer exists? If the
> report gets written to some datastore for later retrieval, you're
> adding some unnecessary complexity. Just have the web app hand the
> request off to service that writes the generated report to a datastore
> which is visible to both the service and web app.

I just wonder if there is a 'global' thread can be created, does not attach
to any 'session' or user connection.
Can this 'global' thread be created outside the web page (eg. outside
mainpag.cs), such as in GlobalThread.cs?


>>The reason I am think of this way is the user does not need to wait for
>>the
>>5 minutes keep the browser opening in blank mode.
>>
> If this _has_ to be done in browser in real-time I would consider
> using an asynchronous request. Even so 'couple of minutes' will seem
> like an eternity to the user.

Yes, this is another option I am thinking of.
I will create a table storing the report request from the web page, eg. has
table fields:
ReportName
ReportParameters
ClientName
DateRquested

Then write a windows service that continuously scan through this table to
generate the requested report and save to harddisk.




From: Cubaman on
On Jul 13, 2:36 am, "Alan T" <alan_NO_SPAM_pl...(a)yahoo.com.au> wrote:
> Just wanted to know if I can do this:
>
> 1) User click a button on a page
> 2) It creates a thread
> 3) The thread will generate a report
> 4) This process may take up to a couple of minutes. eg. 5 minutes
> 5) Before the process finish the client exit and close the browser
> 6) The process will still keep doing its job until the report/file is
> generated
>
> Do you think it is possible?
>
> The reason I am think of this way is the user does not need to wait for the
> 5 minutes keep the browser opening in blank mode.

I think that you should try Sql Reporting Services. It comes with Sql
2005 for free, and can generate reports in push or pull mode.
http://technet.microsoft.com/en-us/library/cc917530.aspx
Best regards.
From: Alan T on
Hi,

Unlucky, as we are using MySQL as backend.

Also a question in my situation:
- we got 80 reports
- each report have different parameters (filters, may be 4 or 5 filters)
- for my second option (write a Windows service scanning through the table)
- if I store each type of report request in its own table, there will be 80
tables with one master table(the queue) which points to each possible report
table (one of those 80 tables)
- if I use 1 big table as request queue, there will be about 30 fields
storing the parameters (many of the parameter fields will be empty, first
normalisation, but I don't mind this)

"Cubaman" <oscar.acostamontesde(a)googlemail.com> wrote in message
news:12f888e5-3dd0-44a9-a3c7-8f37c40e3528(a)s9g2000yqd.googlegroups.com...
On Jul 13, 2:36 am, "Alan T" <alan_NO_SPAM_pl...(a)yahoo.com.au> wrote:
> Just wanted to know if I can do this:
>
> 1) User click a button on a page
> 2) It creates a thread
> 3) The thread will generate a report
> 4) This process may take up to a couple of minutes. eg. 5 minutes
> 5) Before the process finish the client exit and close the browser
> 6) The process will still keep doing its job until the report/file is
> generated
>
> Do you think it is possible?
>
> The reason I am think of this way is the user does not need to wait for
> the
> 5 minutes keep the browser opening in blank mode.

I think that you should try Sql Reporting Services. It comes with Sql
2005 for free, and can generate reports in push or pull mode.
http://technet.microsoft.com/en-us/library/cc917530.aspx
Best regards.