RE: [PHP] Images in MySQL vs directory/file?

2003-12-10 Thread Brian . Goralczyk
Well, it seems to me that the confusion comes from the fact that we are
comparing apples and oranges. 

The first example is talking about the performance assuming you have 100's
of people requesting the same picture, where as the second example is
talking about the performance assuming you have the same person
re-downloading the same picture.

But I would also like to question the extra layer.  Not that MySQL doesn't
have better caching, that is possible,  but it adds and extra layer to the
process because MySQL still stores the data on the drive.  Also, does the
web server cache images?  If so, then we are ahead of the game even more.  

Just my ramblings on the subject and since I am not an expert at this whole
PHP thing please correct me.

Brian Goralczyk
Verizon Wireless

-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 3:35 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Images in MySQL vs directory/file?


On Wednesday 10 December 2003 02:43 pm, Galen wrote:
> If you store images that are played with a lot on
> the disk, it'll likely be slower than MySQL due to MySQL having better
> caching.

I disagree.
Depending on your setup, when a file based image is downloaded to 
a user's computer, its cached there.
No need to fetch it again, till it expires.
I don't think thats possible via images from a database, but
I may be wrong.  Feel free to correct me...

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

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



RE: [PHP] Comparison PHP to Perl

2004-01-06 Thread Brian . Goralczyk
Maybe I am going to show my own ignorance here, but I think if your looking
for Server side web programming that PHP is much easier to use.  Even some
of the developers here that use perl a lot more than me, will say that web
programming with perl is challenging in comparison.  

My logic is JavaScript + client-side, PHP = server-side, perl =
server(scripts and automatic jobs and such).  Some might disagree.  I know
PHP does command line scripting, but I have never used it for that.  I know
that perl does server side pages, but I just don't care for the level of
effort.

I also prefer these languages because they are OS non-specific.  I have
avoided java.  I am not sure what all the hoopla is about.  I am sure I
could get flamed by java programmers for that statement, but I don't see why
I would want to use it.  

Feel free to fill me in.

Brian Goralczyk
Verizon Wireless

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 06, 2004 11:28 AM
To: Warren Vail; [EMAIL PROTECTED]
Subject: Re: [PHP] Comparison PHP to Perl


--- Warren Vail <[EMAIL PROTECTED]> wrote:
> I am looking for a comparison of features supported by PHP vs those
> supported by Perl.

You'll find it difficult to identify a feature in one language that's not
in the other. And, where features differ, the same solutions can probably
be achieved with either anyway

> My gut tells me PHP is more robust

This will be unpopular to say, but my gut tells me the exact opposite. I
prefer PHP, and I would not hesitate to recommend it for most Web
applications. However, Perl has been around a lot longer; it's simply more
mature and hardened than PHP.

The difference may be negligible (I certainly feel comfortable relying on
PHP), but if you're going to split hairs, I'd have to tip my hat to Perl
in the robust category.

> current management does not want to fight for PHP as a new
> "sanctioned" language (most managers there have never heard of PHP
> and the resident Java zealots have almost established a monopoly).

Java's a different story. :-)

Having to fight in order to adopt a new technology is always a pain, even
when it is an obvious choice. In this case, the choice isn't so obvious
(Perl will satisfy your needs, I'm sure), so your battle will be
difficult.

> The kind of thing I am looking for is SESSION support, I know it's
> supported by PHP, but not sure about Perl. I don't want to have to grow
> my own session manager.

The session mechanism in PHP is very simplistic (on purpose), so it's not
hard to reproduce. In fact, I hope you do more than "session_start() and
go" in PHP, else you are probably vulnerable to a number of session-based
attacks.

Perl has CPAN for those who want to use an existing session mechanism.

> What would I lose by implementing in Perl (other than my mind)?

Probably nothing, but that last statement is important. A business must
rely on its available resources, and if the developers prefer a particular
language, and all else is even for the most part, it's probably best to
let the developers use what they prefer.

As far as Apache integration goes, I don't think we can match mod_perl,
unless more people get interested in apache_hooks.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
 Coming mid-2004
HTTP Developer's Handbook
 http://httphandbook.org/

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

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