[Yanel-development] [yarep] fallback not working

Michael Wechner michael.wechner at wyona.com
Wed Nov 15 23:29:01 CET 2006


Josias Thöny wrote:

>Hi all,
>
>This is a yarep question. Sorry for posting to the yanel list. Is there
>a better place for yarep questions?
>  
>

not yet ;-)

>The fallback mechanism of yarep allows to access files in the repository
>which are not registered in the uid/path map.
>  
>

right

>If you want to read the content for a given path from yarep, and the
>path is not found in the uid/path map, it will assume that path=uid and
>read that path directly from the repository.
>
>There is a problem with this approach:
>- say there is a file /foo.txt in the repository, but it's not
>registered in the path-map.
>- someone reads the path "/foo.txt". it will work.
>- now someone writes to this path. since the map has no uid for this
>path, one will be created, say 1234, and the content will be written to
>the file /1234
>
>This means we now have two different files for the same path in the
>repository, which is bad.
>
>Furthermore, methods like getChildren() or delete() do not work if the
>path is not registered in the map.
>
>I therefore propose to remove the fallback, unless someone has an idea
>how to fix it.
>  
>

I think we should fix it somehow and I hope we are able to ;-)

It also took me quite some time to introduce the fallback because
I also thought that it is "evil", but there is a lot of existing data
for which it would be nice use the Path/Map repo implementation, but at 
the same time one would have to create all map entries. Well, one could 
argue to write an import method

>It probably could be replaced by a special map implementation which
>directly maps paths to uids.
>
such an implementation exist namely the VFileSystemImplementation, but it
had the disadvantage that "/" cannot be translated into for instance 
/index.html

>WDYT? 
>  
>

I would suggest that we implement fallback also for the following cases:

- add
- delete
- getChildren
- ...

but yes, the question is if this is actually going to end ...

WDYT?

Michi

>Josias
>
>
>
>_______________________________________________
>Yanel-development mailing list
>Yanel-development at wyona.com
>http://wyona.com/cgi-bin/mailman/listinfo/yanel-development
>
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner at wyona.com                        michi at apache.org
+41 44 272 91 61




More information about the Yanel-development mailing list