Re: PEAR_RemoteCache.php - cached XMLrpc

From: Date: Sat, 01 Jun 2002 21:05:33 +0000
Subject: Re: PEAR_RemoteCache.php - cached XMLrpc
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6702@lists.php.net to get a copy of this message
On Sat, 2002-06-01 at 11:02, Alan Knowles wrote: > Attached (hopefully) is a Class for Cached retrieval of the package data > (although it could do other stuff).. > > Logical overview: > > PEAR server creates a cache of 'Package.listAll' as > /xmlrpc/Package.listAll.xml every time a package is released. > > The User uses the installer to do a > pear remote-list > > 1. it does a http HEAD command to access the HEADER details for that file. > 2. it compares the modification time (from the http headers) with the > cached file (if it exists). > if they are current file is newer it does a full get request on the HTTP > file. > downloads it to {php_dir}/.registry/Package.listAll.xml > > 3. it loads the data from the cache -> and proccess it the same way that > Remote used to... > > -------------------------- > This stuff could be merged with PEAR_Remote / PEAR_Common - as it is > basically a cut and paste with a few mods.. > > call : rename calllCached ? > _fetchHead/_fetchBody .. > > add a _downloadCallback to Remote > > modify _downloadHttp in PEAR_Common to use $this->_requestType = "GET" | > "HEAD" > and return headers array on a HEAD call... > > split call_epi into call_epi and decode_epi > > --------------------------- > The eventual outcome of this is that it may be possible to extend the > installer to do 'channels' - > pear channel-add phpbb http://www.phpbb.com > pear install phpbb > pear channel-add php-gtk http://gtk.php.net > pear build php-gtk > ......... > the only infrastructure required by those channels would be > 1. create a directory for xmlrpc > 2. create and update a package.listAll.xml file > 3. create the location tag or similar for the 'packaged' version of > their application... > > anyway thats a bit later :) I've been playing with this idea too, but didn't come up with any good uses that could not be done in simpler ways yet, so I didn't bother. :-) What you're suggesting looks useful though, it lets you "bind" package names to separate servers. Even though I think that even php-gtk should release tarballs through pear.php.net, this functionality may have big potential later. - Stig

« previous php.pear.dev (#6702) next »