• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to manage long running tasks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to manage long running tasks


  • Subject: Re: How to manage long running tasks
  • From: Kieran Kelleher <email@hidden>
  • Date: Mon, 5 Dec 2005 19:16:16 -0500

You can just spin off a regular old java thread and it can have a life of its own. Just make a runnable class for the task and initialize a class instance with its own manual lock/unlock editing context and set in it its own local instances of whatever EO's it needs and let it off. You can even create it's own EOF stack so that it use. Of course all the java thread stuff such as daemon or not, interrupt handling and memory management should be considered.

IIRC, the ERMailer app (in Project Wonder) would be an example to look at for long running task processing EO's and nothing to do with sessions or R-R loop.

Regards,

-Kieran
________________________________________________________________
Blog: http://webobjects.webhop.org/



On Dec 5, 2005, at 11:33 AM, Stefan Pantke wrote:


Am 05.12.2005 um 12:25 schrieb Helge Staedtler:

I think I have put together what you might need a time ago. have a look at
www.wocode.com there you will find code and tutorial explaining
LongResponses by example.


http://wocode.com/cgi-bin/WebObjects/WOCode.woa/wa/ShareCodeItem? itemId=291

This way your Session-timeout does not matter, because the page gets
refreshed all the time as long as the response generates results.

Thx, Helge, really nice hint. Just learning, where to find the important things in WOrld ;-)

Currently, I'd like to spawn somehow a long running requests and keep
the spawned thread keep running, as long as there is something to do -
even if the user logs off. I suppose the refresh-technique is a special
case here. Thus the user thread might probably not be the best idea.
Let's see.


it off in an extra-Thread seems reasonable, but what do you mean
with "Currently, keeping these objects in a DB store seems to be
reasonable."? Images or as you said "real-world big image media files" in
the DB? Sounds like a really bad idea to me.

Yes, you are right, I'd like to put the resulting image somewhere on disk and keep its full path in the DB while switching the job's state from kRunning to kReady - or something like that.

By object, I meant the job description object.

Cheers,

Stefan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: How to manage long running tasks
      • From: email@hidden
References: 
 >Re: How to manage long running tasks (From: Helge Staedtler <email@hidden>)
 >Re: How to manage long running tasks (From: Stefan Pantke <email@hidden>)

  • Prev by Date: MEETING: Chicago - CAWUG December 6th
  • Next by Date: Re: Where to set display group bindings i java-file
  • Previous by thread: Re: How to manage long running tasks
  • Next by thread: Re: How to manage long running tasks
  • Index(es):
    • Date
    • Thread