Parallel execution of requests

General discussion forum for the Zend Server

Parallel execution of requests

Postby lionmuzzle on Wed Nov 14, 2012 9:24 am

Hello,

please help me to resolve the problem. Imagin I run this script:

Code: Select all
<?php
if (@$_REQUEST['q'] == 1) {
    echo microtime(true);
    sleep(1);
    exit;
}
?>
<iframe src="?q=1"></iframe>
<iframe src="?q=1"></iframe>
<iframe src="?q=1"></iframe>
<iframe src="?q=1"></iframe>

And I see that iframes are loaded each after another with a delay in 1 second, i.e. the last iframe shows its result in 4 seconds. But I would prefer that requests of the iframes were procecced simultaneously. Is it possible?
lionmuzzle
 
Posts: 4
Joined: Thu Jul 07, 2011 11:57 am

Re: Parallel execution of requests

Postby kentatzend on Wed Nov 14, 2012 11:45 pm

Not really the way you have it written. since you HTMLis executing serially. However, if you used Javascript you could do each frame as a separate callback and those could run in parallel.
User avatar
kentatzend
 
Posts: 1778
Joined: Thu Dec 11, 2008 1:08 pm


Return to Zend Server

Who is online

Users browsing this forum: No registered users and 10 guests