[dokuwiki] Re: more cleanup questions

Andreas Gohr wrote:

On Sat, 25 Jun 2005 20:01:35 +0200
Matthias Grimm <matthiasgrimm@xxxxxxxxxxxxxxxxxxxxx> wrote:


Should locks be in cache or at the same level as attic, media, and
data?  When I see a 'cache' directory, in theory, I would think that
a user should be able to 'rm -rf cache/*' and  not effect the
operation of the system, other then causing it to rebuild/repopulate
the cache. Locks don't quite fit in that category since deleting
them could cause data to be lost since removing the locks could
allow multiple people to write the same file at the same time.


You are right of course. Even if these lockfiles should exist just for a second.

Locks are looking to be another headache worthy of a new thread :-)



This is a very important point, because I somtimes deleted the cache
directory during development. This should not disturb a running
DokuWiki in any way except to slow it a bit down due to rebuilding the
cache. So I suggest following extension:


data/
|-- var/
|   |-- mlists/
|   |-- _htcookiesalt  ???
|   `-- locks/


Should we really add another level here? How about this:

data/
|-- meta/
|   |-- 0/
|   |   `0363bfeef96b11ea3115e0d9b5a281d9.mlist
|   |-- 1/
|   |...
|   |-- e/
|   `-- f/
|   `-- _htcookiesalt
|-- locks/


If we add similar metadata later it could go into the same dir using a different extension.

Hang on, are we talking about cache files or the notify lists? I was expecting that file names/directory structure for notify lists (the .mlist files) would follow the same structure as the wiki pages, similar to the way the attic works. I'm not sure I see how using MD5 sums based on the path to the wiki page (if that is the proposal) would be easier/more efficient, and I would think it would be much harder to manually administer/debug if you were trying to figure out which mlist file went with which wiki page just looking at the files. Putting the mlists in a 'meta' area sounds great and puts in the groundwork for other meta data in the future.

I'm getting slightly confused in the proposed data structure, are the wiki pages in data/data, isn't that data/pages in the default configuration today? If I'm understanding this, the attic, pages, and meta areas would all have the same structure. I'm going to attempt to add more details to the example structure for discussion (my ASCII art might not be up to snuff):

data/
|-- _htcookiesalt
|-- attic/
| `-- namespace1/
| `-- namespace2/
| | `-- page2.1119323324.txt.gz
| `-- start.1119321451.txt.gz
|-- cache/
| |-- xhtml/
| | |-- 0
| | | |-- 0003d7511306eaf1dc502cd132b93e9e
| | | `-- 00334945f87e0b2079b3a328385f2c7b
| | |-- 1
| | |-- 2
| | |-- 3
| | ...
| | |-- e
| | |-- d
| | `-- f
| |-- instructions/
| |-- media/
| `-- purgefile
|-- changes.log
|-- locks/
|-- media/
|-- meta/
| |-- namespace1/
| | `-- namespace2/
| | `-- page2.mlist
| `-- start.mlist
`-- pages/
|-- namespace1/
| |-- namespace2/
| | |-- page2.txt
| | `-- start.txt
| `-- start.txt
`-- start.txt


I'm hoping I didn't clutter that up too bad.


What about the config file? Should we merge the currently three config options datadir, olddir and mediadir into one option pointing to the data directory and assume a hardcoded name structure within? Or should cachedir and metadir options be added? I would opt for the first one.

Could there be trouble from more than one system (thinking running this from a load balanced web farm again, or from a multi-threaded Apache server) creating cache files at the same time with the same name? Trying to come with a reason for why a user may need to define the cache location separate from where the data lives. The rest of the information, attic, pages, meta and media, since they all 'go together' it would seem that they could all live under the same area and therefore a single configuration option. The cache, since its not as persistent as the rest of the information, could/should go somewhere else. Thinking in terms of what would need to be backed up when trying to archive the entire site.


I'm not sure about _htcookiesalt. May I delete this directory and the
users wouldn't recognize it or will this break all existing
connections?


All users would be logged of and would need to relogin - it's better to move it out of the cache dir.

Andi


-- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: