Jack Diederich wrote:
On Thu, Feb 03, 2005 at 10:09:49PM -0800, Paul Rubin wrote:
aurora <[EMAIL PROTECTED]> writes:
I'm lost. So what do you compares against when you said LAMP is slow?
What is the reference point? Is it just a general observation that
slashdot is slower than we like it to be?
[reordered Paul's email a bit]
If you mean MySQL or SQL database in general is slow, there are truth
in it. The best thing about SQL database is concurrent access,
transactional semantics and versatile querying. Turns out a lot of
application can really live without that. If you can rearchitect the
application using flat files instead of database it can often be a
big bloom.
This is the kind of answer I had in mind.
*ding*ding*ding* The biggest mistake I've made most frequently is using
a database in applications. YAGNI. Using a database at all has it's
own overhead. Using a database badly is deadly. Most sites would
benefit from ripping out the database and doing something simpler.
Refactoring a database on a live system is a giant pain in the ass,
simpler file-based approaches make incremental updates easier.
The Wikipedia example has been thrown around, I haven't looked at the
code either; except for search why would they need a database to
look up an individual WikiWord? Going to the database requires reading
an index when pickle.load(open('words/W/WikiWord')) would seem sufficient.
[...]
I don't mean LAMP is inherently slow, I just mean that a lot of
existing LAMP sites are observably slow.
A lot of these are just implementation. Going the dumb non-DB way won't
prevent you from making bad choices but if a lot of bad choices are made
simply because of the DB (my assertion) dropping the DB would avoid
some bad choices. I think Sourceforge has one table for all project's
bugs & patches. That means a never used project's bugs take up space
in the index and slow down access to the popular projects. Would a
naive file-based implementation have been just as bad? maybe.
If there is interest I'll follow up with some details on my own LAMP
software which does live reports on gigs of data and - you guessed it -
I regret it is database backed. That story also involves why I started
using Python (the prototype was in PHP).
Having said all this, I'd happily campaign for a relational backend to
MoinMoin if it would speed up the execrably slow performance we
currently see on the python.org wiki. I haven't investigated why
response times went up so much, but I have a distinct feeling it's to do
with a new release.
regards
Steve
--
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005 http://www.pycon.org/
Steve Holden http://www.holdenweb.com/
--
http://mail.python.org/mailman/listinfo/python-list