Author: mkhl Date: 2006-06-24 14:10:46 +0000 (Sat, 24 Jun 2006) New Revision: 16492
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16492 Log: Reflection on denoting the relation between a local and remote (i.e. mapped) record. Improvement of request pseudo-code. Martin Modified: branches/SOC/mkhl/map.txt Changeset: Modified: branches/SOC/mkhl/map.txt =================================================================== --- branches/SOC/mkhl/map.txt 2006-06-24 12:33:45 UTC (rev 16491) +++ branches/SOC/mkhl/map.txt 2006-06-24 14:10:46 UTC (rev 16492) @@ -35,13 +35,9 @@ *** Internal attribute "isMapped" The local part of each mapped record includes an internal attribute -"isMapped", the value of which might denote the DN of the remote part. -It is not present in the local part of a record that is not -mapped. (Or maybe it is but with a distinguished/empty value). +"isMapped", the value of which is irrelevant. It is not present in +the local part of a record that is not mapped. -The attribute is not visible from the outside(?) and cannot be -modified directly. - *** Local != Fallback Each attribute must either be mapped or ignored; the local part should be reserved for ignored data and not serve as fallback storage for @@ -76,6 +72,39 @@ of the map instance. +** Alternatives to local "isMapped" + +*** Local "isMappedTo" +Instead of setting a local attribute to just denote whether a record +is mapped or not, the attribute could contain the DN of the remote +part if the records data. When looking for the attribute, its +contents could be extracted and instantly reused to access remote +data. + +*** Remote "isMappedFrom" +Instead of the local part pointing to the remote part, the latter +could be assigned an attribute containing the DN of the local part of +the data. Finding the remote part of a record with a local DN would +then consist of searching for a record that claims to be mapped from +that local DN. + +*** More GUIDs +Use GUIDs instead of DNs to identify related records. + +*** Another "masterGUID=%" RDN +The idea from local_password could be reused. This would also save us +from mapping DNs back and forth all over the place. + + +** Problems with these alternatives +The obvious problem is the use of a local/remote schema which might +prevent our use of arbitrary internal attributes for mapped data. +Another is mapping the directory structure in the remote backend, +which the third alternative would prevent. +We would also need to be in samdb to get to use GUIDs for all I +understand. + + ** Mappings *** Abstractly @@ -124,14 +153,14 @@ ** Requests *** Delete -look for "isMapped" on local self -if set: - delete remote DN -delete local DN +look for remote record +if found: + delete remote record +delete local record *** Rename -look for "isMapped" on local self -if set: +look for remote record +if found: rename remote record rename local record @@ -152,14 +181,25 @@ otherwise: add local record w/o "isMapped" +This doesn't make sense: we're trying to *add* the remote record, so +we can't possibly query it before adding it! +Our only choices are to either find out immediately which mappings +cannot be performed due to missing context data or to split the remote +message into an immediate and a postponed part, the immediate one +being run *right now* and the postponed, well, postponed until after +that; the postponed message would then have to be split up again and +again until either the immediate part is empty (i.e. some data cannot +be added) or the postponed part is empty (i.e. we're done and can go +home now). + *** Modify if no requested changes are remote: just run local request -look for "isMapped" on local self -if not set: - turn request into "add" +look for remote record +if not found: + turn remote request into "add" add remote record (with context) - modify local record with "isMapped" + register relation between local and remote record otherwise: modify remote record (with context) modify local record
