NYCPHP Meetup

NYPHP.org

[nycphp-talk] SOAP caching to file or MySQL?

Hans Z zaunere at gmail.com
Tue Jul 16 10:00:10 EDT 2013


Hi David,

On Sun, Jul 14, 2013 at 6:19 PM, David Roth <davidalanroth at gmail.com> wrote:

> I'm writing an application in PHP which does a SOAP request. But the
> problem is that the request is slow at times. It ca take 5-6 seconds to get
> a SOAP response sometimes. I've considered caching the data and poll to get
> it. But then I wondered what to do with the data once I get it with respect
> to performance concerns. It's it better to write the 20 records to a file
> or a MySQL TABLE?  I considered MySQL cause it would make the programming
> job easier to use it for retrieval, but that's just my personal
> preference. Or does it make any difference? The final result will be
> displayed on a web page and don't want to keep the short-attention span
> user waiting.


Saving/pulling directly to disk will always be faster, but as you say, is
it worth the extra programming complexity?  I'd say it comes down to volume
- if you need to handle millions of these cached files, then concocting
something to save to disk or even memory/memcache could be optimal.  But if
the traffic is low, then in either case there probably won't be much
difference, aside from complexity and bugs :)

H
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20130716/7b77128d/attachment.html>


More information about the talk mailing list