2008年7月22日星期二

Re: [fw-webservices] xmlrpc performance

On Tue, Jul 22, 2008 at 3:18 PM, Matthew Weier O'Phinney
<matthew@zend.com> wrote:
> -- till <klimpong@gmail.com> wrote
> (on Tuesday, 22 July 2008, 02:26 PM -0400):
>> maybe some of you guys run a Zend_XmlRpc_Server based webservice, I
>> was wondering if anyone had any suggestions and/or ideas about
>> enhancing the performance by implementing a cache. I abstracted lots
>> of our internals through it in order to be able to scale out more
>> easily and testing it, I noticed a slight lag every now and then. I
>> don't really know yet if the lag is HTTP or code.
>>
>> I remember playing with APC a long while ago (about a year or so,
>> probably( and it didn't work at all with Zend_XmlRpc_Server. I think
>> part of the reason was that it cached my endpoint but then couldn't
>> distinguish between method 'foo' and 'bar' send to it.
>>
>> Anyway, if anyone has any suggestions or would like to babble away,
>> I'd be all ears. :)
>
> A colleague of mine in a different division at Zend extended
> Zend_XmlRpc_Server_Request to add caching ability. IIRC, he
> created a map of methods that were cacheable, and would introspect the
> request to see if the requested method matched; if so, he could either
> return a cached response, or after the service was complete cache the
> result.
>
> The fun part is that this can actually be done _before_ you instantiate
> the server and attach classes, which can have tremendous performance
> benefits.
>
> This would be some nice functionality to have by default; could you open
> an issue and request it?

Sure can, and sure did:
http://framework.zend.com/issues/browse/ZF-3715

Any ideas in the meantime? ATM I am implementing caches around the
API, so I am caching the results and that seems to work ok. Your
approach is moving it into the "API", I'd favour that.

Till

没有评论: