Hi,

bruno desthuilliers a écrit :
Rakotomandimby Mihamina wrote:

Hello,
I am looking for any detailled explanation about what is a proxy and
what is a repository.


A proxy (in french : procuration) is an object that (more or less
transparently) manage access to another object. Google for the design
pattern of the same name.

The french for repository is "référentiel". If you've worked with SVN
(and I think you did), you know what's a repositiry is !-)

But I guess you're looking for something more specific, so I'll try and
explain - if I can... (please anyone correct me if I say something wrong):

In CPS, the document objects you're working with in the workspaces and
sections are not the objects themselves, but proxy pointing to the real
object in the repository[1]  - to be more exact, pointing to a specific
"revision" of the real object, which allows to manage multiple versions
of a same document.

When you create a document in a workspace, you in fact create a proxy in
the workspace and a first revision of the real object in the repository.
When you (first) publish in a section, you in fact create a new proxy
object in the section, pointing to the same revision. This revision is
then "freezed" (marked as read-only...), a new revision is created, and
the proxy in the workspace now point to this new revision.

Yep, I think you totally understood it.
I guess you can, somehow, make a parallelism with C pointers, for those who know this language.
There's one incorrect detail though.
(Some vocabulary explanation: when I say "proxy", I mean object in the hierarchy, and when I say "document", I mean object stored in flat in the repository) When you publish a document in a section, you have two proxies pointing to the same document in the repository. This document is then marked as "frozen": next time "someone" (e.g, a proxy) will try to modify it, a new revision will be created (copying the existing one), and proxies will then point to different documents: the "modiying" one (proxy in workspace) will point to the new revision, and the other one (published proxy, not being modified) will still point to the old one. This was just to point out that no duplication is done while documents do not need to be made different. This is visible looking at the document version: documents in repository are also identified thanks to their version/revision number.

[1] aka 'portal_repositorie'. It's a BTree Folder that can holds very
large collections of objects without too much performances hits - in
fact, this is the same datastructure that most RDBMS uses...

HTH (and I haven't say too much stupidities).
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to