Re: Multi-User Text-Editing
| From: | Michal Migurski | Date: | Mon, 06 Sep 2004 22:56:06 +0000 |
| Subject: | Re: Multi-User Text-Editing | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195999@lists.php.net to get a copy of this message | ||
> > You've just described a wiki - one example of a wiki that is written in
> > PHP and MySQL is http://tavi.sourceforge.net. The code is
> > a little
> > spaghetti-like, but you should be able to look through the database schema
> > to understand how they implement the multi-user text editing, and how to
> > handle the related problems of locking and revision control.
>
> Wow, confusing code - but i think i got the idea. Just one thing: After
> reading the code, it seems to me that every time someone makes a change
> to a record, a new row is inserted into the DB with the full text of the
> edited record - not just the changes. I saw that there was an automatic
> expiration function, but still, wouldn't it be a drag for the server?
Yeah, that's what happens.
I think it's only a problem if you're storing truly stupendous amounts of
text, and then it's just a storage problem - drives are cheap.
If anything, storing the changes only would probably be a bigger processor
load, since viewing any one page would mean having to reconstruct the
content from all previous versions. This way, the overhead of a diff is
only incurred when you want to view changes to a file between two given
versions.
I think the rationale behind CVS storing just diffs is that it has
branches and merges, while wiki text generally does not. Also (conjecture)
it may be a historical legacy of RCS, from a time when storage was not
quite so cheap.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html