Opened 16 years ago

#44 new enhancement

build support for membranes

Reported by: Brian Warner Owned by:
Priority: major Milestone: undecided
Component: unknown Version: 0.2.4
Keywords: Cc:

Description

The sealer/unsealer code should also be usable to make it easy to create Membranes (which are like a revokable forwarder, but every reference you pass through it is also wrapped in a revokable forwarder, so that the users of the interface don't have to refrain from passing their own references).

Something with an API like:

 wrapfunc = RevocableForwarder()
 d = tub.makeMembrane(orig, wrapfunc)
 # then later..
 wrapfunc.revoke()

I'm thinking that wrapfunc will be called for each Referenceable or RemoteReference? (ooh, interesting to think about the difference there..) that passes through, and it is expected to return a new reference for each one. RovocableForwarder.__call__ would provide this.

This would also provide for things like:

 wrapfunc = LoggingForwarder(logfunc)
 wrapfunc = ArgumentAddingForwarder(owner="bob")

makeMembrane would be implemented with a special serialize/unserialize pair, in which the unslicer table uses the wrapper function to handle my-reference sequences.

Change History (0)

Note: See TracTickets for help on using tickets.