[Date Prev][Date Next] [Chronological] [Thread] [Top]

chainedOperations (Was: dontUseCopy : (was: ldap/include ldap.h))

> BTW, I recently added client side support for the dontUseCopy
> control.  Haven't yet figured out the best way to handle this
> in slapd(8).  Though it might be possible to do this all
> in the frontend, with overlays and such, I think it might
> have be handled by backends.  They would return a referral
> when the target object was a shadow/cache copy.  A
> chaining overlay could then catch and chain it.

Just to write it down somewhere; a better design doc may follow (when I've
time for the doc and the coding.. :)

My idea is to design chainedOps this way:

- a extop handler that:
  - gets the extop
  - decodes the ContinuationReference
  - updates the ContinuationReference as appropriate
  - if present, applies those controls that require some extra
    intervention (proxyAuthz, for instance, doesn't)
  - if local, either:
    - calls the related pre-frontend op (do_modify(), do_*()), or
    - decodes the operation itself and calls the fe_op_*(),
    so that to slapd it appears as a regular operation,
    but it's performed internally (these are really implementation
    details, I'll try to avoid as much as possible code duplication,
    if this does not requre too extensive and little general
    modifications to mainstream code;
  - if remote, the updated ContinuationReference is propagated (*).

- an overlay ("distproc") whose design is essentially based
  on the "chain" overlay, which transforms any operation to be chained
  into a chainedOperation; this requires to augment back-ldap
  with a generic extop handler, while the rest (e.g. connection
  pooling, identity assertion and so) is used as is because
  it only affects the chaining extop (i.e. how the extop is propagated
  to the non-local DSA) and not the chained op.


(*) It's yet to be designed how to handle a chainedOperation request that
results to be non-local; that is, if the "distproc" overlay is stacked on
a database, and the information on the non-locality of the request is
determined globally by the extop handler, how to connect the extop handler
to the overlay?  Maybe those cases should simply result in no chaining,
and returning Chained Response instead; otherwise (this would be my
preferred solution) the "distproc" should be global, it should be able to
handle a Chained Response returned by the chainedOperations extop handler,
and turn it into another chainedOperation to the non-local DSA.  It sounds
a bit involved, but this should minimize code duplication and
modifications to the mainstream code.

Pierangelo Masarati

Ing. Pierangelo Masarati
Responsabile Open Solution

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it