Weitere ähnliche Inhalte Ähnlich wie Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue (20) Kürzlich hochgeladen (20) Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue1. Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue By Sam Hennessy – Zend Professional Services Consultant 4. Blog Example Post comment Save in the DB Rebuild RSS feeds Send email notifications Display “Thank You” message 5. Blog Example Post comment Save in the DB Rebuild RSS feeds Send email notifications Display thank you message Queue Tasks Job Queue 6. Architectural Overview PHP + Job Queue Extension TCP or Unix Socket Job Queue Damon Persistent Storage (SQLite) HTTP Request Executing Server 11. Passing Parameters (example) $params = array( 'cart' => array( 'items' => array( array( 'id' => 324 , 'qty' => 1 , 'price' => 19.95 ), array( 'id' => 75 , 'qty' => 2 , 'price' => 14.95 , 'size' => 'XL' ) ), 'total' => 49.85 , 'coupon' => null , 'giftwrap' => true ), 'user' => $user ); $queue -> createHttpJob ( 'http://backend/jobs/checkout.php' , $params ); 17. Job HTTP Request POST /job.php HTTP/1.0 Host: localhost Content-Type: text/json Content-Length: 34 Connection: close Accept: */* USER_AGENT: Zend Server Job Queue/4.1 Cookie: SESS273df6b85bb9a37ced781f806219fc6a=7k6atppt8akccooobs26htsim7; ZDEDebuggerPresent=php,phtml,php3 {"var1":15,"nested":["a","b","c"]} 18. Job HTTP Response HTTP/1.1 200 OK Date: Thu, 10 Sep 2009 17:29:20 GMT Server: Apache/2.2.9 (Debian) PHP/5.2.10 X-Powered-By: PHP/5.2.10 ZendServer/4.0 Set-Cookie: ZDEDebuggerPresent=php,phtml,php3; path=/ X-Job-Queue-Status: 1 Something is wrong! Vary: Accept-Encoding Content-Length: 152 Connection: close Content-Type: text/html array(2) { ["var1"]=> int(15) ["nested"]=> array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" } }