Regarding multithreading

Post Reply
gaurav.shetti
Posts: 119
Joined: Fri Feb 27, 2009 9:09 am

Regarding multithreading

Post by gaurav.shetti »

Okay i have a general question. Can we do multithreading from front end in vortex .
ed say i have a page abc in vortex and pqr in vortex. say the user calls the page abc from front end. But somehow can i execute pqr in the back without affecting abc, to increase performance. Is that possible in vortex. Because currently what i understand is things are getting processed sequentially.

Thank you
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Regarding multithreading

Post by John »

It would help to be a little more clear about what you want, however you can use <exec bkgnd> to execute in the background, or fetch parallel to run several at a time.
John Turnbull
Thunderstone Software
gaurav.shetti
Posts: 119
Joined: Fri Feb 27, 2009 9:09 am

Regarding multithreading

Post by gaurav.shetti »

Well i wanted this functionality ... Say I am searching for the query "test" on page abc. I am searching for "test" on this page under the category say A. Let us assume there are 5 categories in total which the user can search for, but currently he has searched for A. Now when the user enters the query "test" and selects A, the abc vortex page is refreshed , Now at this moment off time I want the page abc to call another page pqr wherein i have other processing being done (i.e the records for other catgories are fetched and are store in a temp table). I want ABC to call PQR but I dont want ABC to wait for PQR to finish its processing. Is there any command defined in vortex which can help me to achieve this
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Regarding multithreading

Post by John »

Yes, the <exec bkgnd> is what you would want, e.g.

<strfmt "query=%U" $query><$qvar=$ret>
<strfmt "%s/pqr.txt" $sourcepath><$scriptarg=$ret>
<exec bkgnd "/path/to/texis" $qvar $scriptarg></exec>

will run a vortex command in the background without
delaying the user.
John Turnbull
Thunderstone Software
gaurav.shetti
Posts: 119
Joined: Fri Feb 27, 2009 9:09 am

Regarding multithreading

Post by gaurav.shetti »

<script language=vortex>
<uses scconfig scfetchfile sc_common_functions oraclesql>
<EXPORT $query QUERY USEROK>
<a name=main>
<config>
Processing ABC
calling the other file
<$query = gaurav>
<strfmt "query=%U" $query><$qvar=$ret>
qvar : $ret
<exec bkgnd "/usr/local/morph3/bin" $qvar "/data/pub/scriptroot/scSrch/webinator/pqr"></exec>
</a>
</script>


note that sourcepath returned me this :
/data/pub/scriptroot/scSrch/./webinator/testing
gaurav.shetti
Posts: 119
Joined: Fri Feb 27, 2009 9:09 am

Regarding multithreading

Post by gaurav.shetti »

is this right ?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Regarding multithreading

Post by mark »

You left "texis" out of the exec.

<exec bkgnd "/usr/local/morph3/bin/texis" ...
Post Reply