Re: which costs more ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm assuming this was intended for the list, not for me directly.  Grumble 
grumble.

If you want to pull in data from Google web services, then either

1) You always want the newest version and you just have to eat the cost;

2) You don't always need the newest version and you can cache it locally in 
some form or another that makes sense for your use case.  Storing that cache 
in a local MySQL or SQLite database is probably the easiest/fastest/most 
common method.

3) You decide you don't need Google data in the first place.

Which you do depends on your use case.  Enjoy.

On Saturday 24 May 2008, Feris wrote:
> Hi Larry,
>
> On Sat, May 24, 2008 at 10:52 AM, Larry Garfield <larry@xxxxxxxxxxxxxxxx>
>
> wrote:
> > For what definition of "third party"?  The cost of connecting to a MySQL
> > database on the same network segment as the web server will be minuscule
> > compared to the cost of connecting to a server in another state.  (MySQL
> > connections are actually very fast to set up in PHP; second only to
> > SQLite, I
> > suspect.)
>
> Actually, it is Google web services (Picasa, Google Docs, etc) which
> returned XML feeds.  And I plan to use that in my shared hosting
> environment. And yes, although my host has a separate MySQL location but it
> is still in the same network segment.
>
> The cost of parsing the XML will be tiny compared to the network latency.
>
> >  IO
> > is always your most expensive operation.  Caching locally (disk, local
> > MySQL
> > DB, etc.) can help a great deal, depending on your data.
>
> I see. Then that will make me considering that a call to web service's
> streaming XML is very costly (network latency + parsing cost).
>
> That caching is unthinkable for me, but it will be a valuable suggestion
> for me to  redesigning my application if I still need to use those Google
> web services.
>
> > So the answer is "you've not given enough information to make an
> > intelligent
> > recommendation". :-)
>
> Thank you for pointing me that and giving a general consideration on PHP
> performance ;)
>
> > --
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> Regards,
>
> Feris


-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux