From: Darron F. <da...@fr...> - 2002-02-13 20:56:57
|
I snipped a bit for readability and will try to answer the questions raised. > > > 2. Page caching - so that a local copy of page on the other side of the > > > bookmark can be sucked down and put into the database for safe-keeping. > > > (It's still a little buggy right now but we've got the basics down pat.) > > Wow, you don't know how happy I am to see this. I've bee wanting to get around to this feature > forever. I'm pretty happy with your implementation. Mainly I've only ever been concerned with > getting the text of a single page with this feature (for archiving faqs, technical info, etc), so > making sure images and links work isn't a _big_ concern, but obviously most people are going to > want those things to work as well. The feature has the potential to open a large can of worms... > Do we get/store images? Do we cache on a regular schedule? Do we maintain a cached page version > history? Do we do any recursive digging? All images are downloaded and put into the database - if the same image is used multiple times on a page, only one instance of that graphic is put into the database. It's a one time download - no scheduled update - we saw it as a way to freeze that page in time to make sure you could always get to that content. We had talked about a cached page version history - keep multiple versions of those pages around but hadn't really done anything about it yet. At this time, there isn't a recursive download either - it's just that page and any directly linked images and stylesheets - basically anything with a src="" tag. One thing I forgot to add is that it uses the curl functions in PHP which depend on the curl library being present. You can grab it here: http://curl.haxx.se/ > But mainly, what you've done so far, I'd be happy with as a user. I think a table at the top of > the cached page (a la Google's cache) clearly stating that it's cached, the cache date, and > explaining that the links may not work is needed. That is coming - clearly stating that this is a cached page and that the original is at this url. If you've ever used IE 5 on a Mac you'll notice the similarities to the Scrapbook feature - I've always wanted a network/browser independant version of that. > > > We have some other ideas as well (move to using Pear DB for database > > > abstraction, complete the multiuser portions, export to browser bookmarks, > > > etc.) - but those will come later - we just got slammed with a huge > > project > > > that will take up a huge portion of the next month. > > I don't know what Pear DB is. I need to look into that I guess. We're kind of MySQL-centric. PEAR is basically a bunch of code libraries that are distributed with PHP - it's a way to write DB code without making it MySQL centric. Here's an example PEAR::DB query: $sql = "SELECT something FROM somewhere WHERE table = '1'"; $result = $db->query( $sql ); while ($row = $result->fetchRow()) { // loop through every row returned and do something } With this code - you define your master $db object in a central include file and can change database types by changing a single variable - it's pretty sweet. We're pretty MySQL centric here as well but as long as you're using pretty standard SQL it should work with any PEAR supported DB - Postgres, Oracle, Sybase, MySQL, etc. > I want to see the caching. Mainly I'd like to see the UI for the authenticated apb user; how they > cache a page, etc. Right now, all you have to do to cache a page is flip a radio button when you're editing or adding a bookmark and it will download it all and insert it into the DB. > I think I can safely say that we're interested in adopting both changes, but there are two issues. > The first is mainly UI, and Brandon's in charge of that. The second is how to integrate your > changes into our dev tree. I don't have a lot of experience at collaborative-internet-GPL > programming. Maybe we need to start thinking about CVS/arc/subversion. For now we can just > brute-force it with diff. If you have any thoughts about that, let me know. I'll post the first simple change when I get a chance tonight and after we've merged our changes with your new version of apb and fixed a couple small bugs I'll send over a diff - they shouldn't be too hard to isolate. If you guys want to put up a CVS repository somewhere we're pretty comfortable with that. Do you have one already? |