[dokuwiki] Re: more cleanup questions

On Sat, 25 Jun 2005 18:17:54 -0500
Steven Danz <steven-danz@xxxxxxxxx> wrote:

> 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.

You are right - I got carried away while thinking on the cache data. Using a 
namespace structure as in pages and attic is the better way.

> 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):

<snip>
looks good :-)

> >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?

No shouldn't make any trouble. Each process would create their own cachedata if 
none exists and use it for display, both processes then would write this 
cachedata to the same file which would mean one process would overwrite the 
others data. Am I right here? Or could they possibly write both to the same 
file mixing data? Maybe we should add locking into the io_savefile method... As 
you said: another headache. But I never had any trouble with this kind of race 
conditions so I think it's not high level priority.

> 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.

Hmm makes sense. Matthias also opted for more config options... So we add 
cachedir metadir and lockdir (I think locks should stay out of the meta dir).

Andi

Other related posts: