From: Efraim F. <efr...@gm...> - 2012-01-09 07:05:34
|
Hi, On 01/09/2012 01:40 AM, RAHUL AADITYA wrote: > Is there anything like BackProcess in Exist-xquery? i.e., If i m > clicking on a button to search datas using xquery and after receiving > the datas, customer will be looking on the displayed datas. > > Meanwhile i want Exist to perform some back process. Let me explain, > while the customer is busy at looking datas i want to use xquery and > get ready the next records. So that when the customer click on the > next button the datas need to be displayed faster. > > Is this is possible? if there is any related article available to this > please direct me towards it. Need your assistance as early as possible. There may be other ways to do it, but I can immediately think of 2: (1) the util:eval-async() function to start evaluating the next xquery at the beginning or end of executing the previous one (2) a job queue that runs through the scheduler module every few seconds and polls for the next request; and if any requests are enqueued, run them (I implemented something like this to use for background caching some processing: https://github.com/opensiddur/opensiddur/blob/master/code/apps/jobs/modules/jobs.xqm ). You'll presumably have to implement some way to block if the processing is incomplete by the time the user presses next. -- --- Efraim Feinstein Lead Developer Open Siddur Project http://opensiddur.net http://wiki.jewishliturgy.org |