I wonder if there is a best practice available to solve the following
problem:
I want to initiate several background tasks that tars a huge file set
200GB+. This takes a while and I would like to move this processing in a
thread, triggered from a submission handler. The thread/s will run for
several hours and they should report a progress that another Element
should render.
My "naive" approach would be:
Start the thread from the submission handler and write something to
disk/database to store the state. The Element that renders the state of
the threads reads the states from the disk and renders the progress.
Drawbacks: loosing the thread handle, synchronization problems.
Is there something to make it better/more stable/ more rife ?
Ciao
Matthias
Participants give you an application-wide thread that you can easily
access from a single repository. For there rest, there are other
advantages, like exposing results and waiting for objects from other
participants to create a kind of automating dependency management, but
I don't think this would benefit you.
I don't think I'd use participants for your use case.
HTH,
Geert
On 29 May 2009, at 16:48, Matthias Barmeier wrote:
>
> Hi Geert,
>
> I need a dispatcher thread that collects packaging orders and than
> starts for everey order a packing thread.
> The Queue/Processing skeleton is already implemented. Though, I
> think I
> will give a try for the participant or do you think that this
> have some disadvantages that your approach does not have ?
--