modperl-excellent_question_about_version_management_in_db_backed_websites

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



To: "mod_perl Mailing List" <modperl@apache.org>
From: "Jonathan M. Hollin" <netmaster@digital-word.com>
Subject: CVS
Date: Thu, 15 Nov 2001 14:31:57 -0000

Hi people,

I am currently developing a content management system under mod_perl, with
data stored in an RDBMS (MySQL at present, but Oracle on the production
server).

I would like to add version control to published documents (read pages) and
wondered if anyone has any experience of this who would be willing to offer
me some advice.  I have a CVS server and am curious as to whether there is
some way this can used (bearing in mind that I want to manage DB data, not
files).  I would like to be able to rollback to any previous version (if
possible), and would also like to document the different versions
themselves.

I'm thinking that I could maybe commit the database files to CVS and then
use a module to communicate with the CVS server (Apache-CVS, VCP, VCS-CVS,
etc).  Is this possible?  Has anyone ever tried anything like this?

I have searched CPAN and used Google to search the web and Usenet but have
so far drawn a blank.

I suspect that I will not be able to use CVS in this manner and that
therefore I am going to have to "roll my own".  If this does turn out to be
case - can anyone lend me any guidance as to how I work out what's changed
in a record (between versions)?  Then I can just store the changes in a DB
as required.

Jonathan M. Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypug.pm.org/

===

To: "Jonathan M. Hollin" <netmaster@digital-word.com>
From: "Ken Y. Clark" <kclark@logsoft.com>
Subject: Re: CVS
Date: Thu, 15 Nov 2001 09:42:58 -0500 (EST)

On Thu, 15 Nov 2001, Jonathan M. Hollin wrote:

> Date: Thu, 15 Nov 2001 14:31:57 -0000
> From: Jonathan M. Hollin <netmaster@digital-word.com>
> To: mod_perl Mailing List <modperl@apache.org>
> Subject: CVS
>
> Hi people,
>
> I am currently developing a content management system under mod_perl, with
> data stored in an RDBMS (MySQL at present, but Oracle on the production
> server).
>
> I would like to add version control to published documents (read pages) and
> wondered if anyone has any experience of this who would be willing to offer
> me some advice.  I have a CVS server and am curious as to whether there is
> some way this can used (bearing in mind that I want to manage DB data, not
> files).  I would like to be able to rollback to any previous version (if
> possible), and would also like to document the different versions
> themselves.
>
> I'm thinking that I could maybe commit the database files to CVS and then
> use a module to communicate with the CVS server (Apache-CVS, VCP, VCS-CVS,
> etc).  Is this possible?  Has anyone ever tried anything like this?
>
> I have searched CPAN and used Google to search the web and Usenet but have
> so far drawn a blank.
>
> I suspect that I will not be able to use CVS in this manner and that
> therefore I am going to have to "roll my own".  If this does turn out to be
> case - can anyone lend me any guidance as to how I work out what's changed
> in a record (between versions)?  Then I can just store the changes in a DB
> as required.
>
> Jonathan M. Hollin - WYPUG Co-ordinator
> West Yorkshire Perl User Group
> http://wypug.pm.org/
>

Jonathan,

I worked on a system earlier this year that had a need for revision
control of files.  I decided to use RCS and the Rcs.pm Perl module.
The Rcs.pm module actually had several flaws which I tried to
communicate to the author, but I never heard from him.  However, with
my fixes, I found using RCS to be perfectly adequate for my needs.  I
interacted with a database, as well (MySQL), but only to store the
file's location and some meta-data on the file.  I really enjoyed
using RCS, allowing it to handle the manipulation of the files.
Personally, I didn't feel I could roll anything better than RCS,
though you may feel different about replicating CVS's functionality.

===
To: <netmaster@digital-word.com>
From: "Francesco Pasqualini"
<f.pasqualini@cpsinformatica.it>
Subject: Re: CVS
Date: Thu, 15 Nov 2001 15:53:00 +0100

it seems that also webdav will have versioning features

www.webdav.org

Francesco

===
To: "'Ken Y. Clark'" <kclark@logsoft.com>
From: "Sheth, Niraj " <niraj_sheth@groton.pfizer.com>
Subject: RE: CVS
Date: Thu, 15 Nov 2001 10:05:29 -0500

Ken,

I am using Rcs.pm in production.
Could you give me more details about the flaws you have found and if
possible could you post the patch(or code change)?

Thanks,
-Niraj

===

To: "Sheth, Niraj " <niraj_sheth@groton.pfizer.com>
From: "Ken Y. Clark" <kclark@logsoft.com>
Subject: RE: CVS
Date: Thu, 15 Nov 2001 10:54:55 -0500 (EST)

On Thu, 15 Nov 2001, Sheth, Niraj  wrote:

> Date: Thu, 15 Nov 2001 10:05:29 -0500
> From: "Sheth, Niraj " <niraj_sheth@groton.pfizer.com>
> To: 'Ken Y. Clark' <kclark@logsoft.com>
> Cc: mod_perl Mailing List <modperl@apache.org>
> Subject: RE: CVS
>
> Ken,
>
> I am using Rcs.pm in production.
> Could you give me more details about the flaws you have found and if
> possible could you post the patch(or code change)?
>
> Thanks,
> -Niraj

Niraj,

Well, I seem to have misplaced my version of the module.  I found
something old, but it doesn't look quite right.  The biggest thing I
can remember is that I couldn't get the original to work well under
mod_perl because errors were reported via Carp::croak.  I changed all
those to "die" statements which I then caught with my calling module.
I'm continuing to search for what I believe is a more reliable copy of
what I used.  If I find anything, I'll try writing Craig Freter again.
I believe previous e-mails to him bounced or went unanswered, but that
was several months and a couple projects ago, so I don't quite
remember everything too clearly.

===
To: "Jonathan M. Hollin" <netmaster@digital-word.com>
From: Nick Tonkin <nick@rlnt.net>
Subject: [OT] Re: CVS
Date: Thu, 15 Nov 2001 08:11:56 -0800 (PST)

I assume you are not expecting much to change in the database, and that
you are therefore mostly doing selects, so why not continue to use
MySQL? If you do, you can use MySQL's Update Log to take snapshots of the
database whenever you want (and store them somewhere with date-appropriate
names) and use them for "versioning".

Rolling back to an earlier "version" of your data is as simple as creating
a new DB from your table defs, then "mysqlbinlog log-file | mysql new-db"

See http://www.mysql.com/doc/B/i/Binary_log.html for more info.

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu