|
»
« Return to Thread: Best practice to run threads from processElement
Re: Best practice to run threads from processElement
You can use participants, or regular threads as inner classes. Drone
is using something like that when reindexing through the admin
interface:
http://svn.rifers.org/drone/trunk/src/implementations/com/uwyn/drone/webui/elements/admin/ReindexSearch.java
On 29 May 2009, at 16:24, Matthias Barmeier wrote:
>
> Hi,
>
> OK sounds cool. I will try it over the holidays.
>
> Thanx.
>
> Ciao
> Matthias
>
> Huibert Gill schrieb:
>> Look into to Rife participants and create a simple one.
>> Use it to create, start and monitor you threads from there.
>> Should be pretty easy.
>>
>> Also using the participant, your threads could use callbacks to the
>> participant to report progress.
>>
>> Your element can then safly read teh reported statuses.
>>
>>
>> happy hacking!
>>
>> Huibert Gill
>>
>> 2009/5/29 Matthias Barmeier <matthias.barmeier@...
>> <mailto:matthias.barmeier@...>>
>>
>>
>> Hi out there,
>>
>> 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
>>
>>
>>
>>
>>
>>>
>
> >
--
Geert Bevin
Terracotta - http://www.terracotta.org
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Flytecase Band - http://flytecase.be
Music and words - http://gbevin.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "rife-users" group.
To post to this group, send email to rife-users@...
To unsubscribe from this group, send email to rife-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---
« Return to Thread: Best practice to run threads from processElement
| Free embeddable forum powered by Nabble | Forum Help |
