(on Tuesday, 22 July 2008, 03:41 PM -0400):
> 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.
You can actually take my approach now. Simply extend
Zend_XmlRpc_Server_Request_Http and add in the functionality; the XmlRpc
server allows you to pass in the request object either via setRequest()
or by passing it to handle().
I'll use your issue to track progress on a 'caching' version of the
request object for a future ZF release. :)
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论