I’ve deployed a project in the staging server and experienced issues regarding the Zend_Rest. I created a simple test service that should return “hello world” on the calling script. The call would take approx. 4secs to finish. It is really slow given the simple task. Any suggestions for optimization?
here’s some code snippets :
// $url is a connetion to a resful controller
$client = new
Zend_Rest_Client($url); $response =
$client->printHelloWorld()->post();
echo
$response->printHelloWorld->response;
Server controller has :
public function getAction() { $server = new Zend_Rest_Server(); $server->setClass('Webservice_User'); $server->handle(); }
After much research, I guess I will not be using zend rest for the application. Zend_Rest examples around the web has an RPC implementation which is really heavy because of the reflection process. I was able to drop it more but decided that webservice is not the right way for the special process that I am doing.