Re: Rsync and CVS

From: Date: Tue, 06 Mar 2001 21:58:29 +0000
Subject: Re: Rsync and CVS
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-48100@lists.php.net to get a copy of this message
hi, > I was thinking of /manual/usernotes/TOPIC.txt, where TOPIC is the subject in > question. The contents of those files would just be a serialize array, > exactly as would be returned by the DB. My local setup actually does that, > but loading those files requires a semi-backdoor into www.php.net, which I'm > a bit uncomfortable about. i'd suggest to make things simpler - just plain pre-generated html with the notes part. name it after TOPIC and include it in the proper place. the generator script may run as cron job. there is only one problem - to prevent rsync client from getting a semi-generated copy. this can be achieved like: write_content($content,$tmpname); unlink($path.$topic); link($path.$topic,$tmpname); unlink($tmpname); if $path.$topic is being opened by rsync, after the unlink it will continue to read the old version. when closed the os will delete the file. next attempts will result in opening the new version of the file. if rsync tries to open/find the file between unlink/link the client will lack the comments until next update... or better - why not generate html upon comment add and use the html on the main site also? > I know, installing a DB on the mirror and loading it with a dump of the > master is another option, but rsync'd files is just *simpler*. this is ok but it makes mirror administration harder. also pregenerated content will require less cpu power... b.

« previous php.dev (#48100) next »