• 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: generating response in different thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: generating response in different thread


  • Subject: Re: generating response in different thread
  • From: Shehryar Khan <email@hidden>
  • Date: Fri, 26 May 2006 16:06:09 -0700


Christian,

How about having the long response thread generate an http request (curl?) to a direct action in your app to generate a response which it then passes up to the main thread for display.

It ain't pretty but it will work.

-shehryar

On May 25, 2006, at 8:47 AM, Christian Pekeler wrote:

I have a bunch of pages that can take a long time to generate. I'd like to show a WOLongResponsePage in the interim. The typical way of using WOLongResponsePage is to run the business logic or whatever is taking a long time in a different thread (kicked off by WOLongResponsePage.performAction()), and once done, generate the final page with the result of that expensive computation (with WOLongResponsePage.pageForResult(Object)).

Unfortunately, the pages I have to deal with can't be used with this pattern. They're slow because they contain thousands of bindings which each are partly responsible for the slowness. Getting all the values upfront at once would require me to rewrite the pages - something I don't have time for.

So what I'd like to do instead is (simplified):
  WOLongResponsePage.performAction() {
      slowPage.generateResponse();

I think I've figured out how to do WOLongResponsePage.pageForResult (the slow pages are basically display-only). My problem is calling generateResponse() from a new thread. Some bindings on the slow pages are hooked up to the session, and to objects in the session's defaultEditingContext causing all sort of issues that I'm having troubles tracking down. So, has anyone ever done this sort of thing and could give me any advice?


Thanks, Christian

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


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
References: 
 >generating response in different thread (From: Christian Pekeler <email@hidden>)

  • Prev by Date: strange DirectAction problem
  • Next by Date: Re: auto-zip on upload
  • Previous by thread: Re: generating response in different thread
  • Next by thread: Re: generating response in different thread
  • Index(es):
    • Date
    • Thread