Ad-hoc serialization comity

From Erights

(Difference between revisions)
Jump to: navigation, search
(mention withExits, improved wordings)
(add SerMap description)
Line 19: Line 19:
Returns an object which, when passed over a CapTP reference, is passed like <var>referent</var> except that its exit table is augmented with the entries in <var>map</var>.
Returns an object which, when passed over a CapTP reference, is passed like <var>referent</var> except that its exit table is augmented with the entries in <var>map</var>.
-
(Explanation of SerMap to follow)
+
A SerMap is an object with four fields:
 +
* <var>exits</var> :[[Map]]. Used as Data-E [[unscope]] for serializing arguments of messages to references having this SerMap, except that the values are not exit names, but rather references to be used in the receiving vat.
 +
* <var>uncallers</var> :[[List]]. Used as Data-E [[uncaller]] list in the same way.
 +
* <var>invExits</var> :[[Map]] and <var>invUncallers</var> :[[List]]. When a [[PassByProxy]] reference is sent over a reference having this SerMap, it arrives in the receiving vat having a SerMap with these two fields exchanged with <var>exits</var> and <var>uncallers</var>.
[[Category:Unresolved design issues]]
[[Category:Unresolved design issues]]

Revision as of 04:21, 27 June 2008

Premise

Distributed applications running in multiple E vats should be able to exchange objects of custom types, i.e. to agree that their makers should be graph exits, without requiring that the objects be mobile code, or that the vats have matching entries in the global emaker namespace [which should go away too, but I haven't gotten to that problem yet --Kevin Reid 22:19, 26 June 2008 (CDT)]].

Proposals

Table-tagged references

There are multiple tables of graph exits, and each CapTP eventual reference specifies one such table. Messages sent to a reference are serialized using that reference's table. PassByProxy objects in the message arguments, when unserialized on the other side, are remote references with the inverse of the original exit table.

Two eventual references are the same only if their exit tables are the same.

Eventual-send result promises share the same table as the original reference; this is appropriate as any message sent on it before it resolves will be going to the original reference's host vat for forwarding.

The 'withExits' operation introduces an agreement.

withExits(referent, map :SerMap)

Returns an object which, when passed over a CapTP reference, is passed like referent except that its exit table is augmented with the entries in map.

A SerMap is an object with four fields:

  • exits :Map. Used as Data-E unscope for serializing arguments of messages to references having this SerMap, except that the values are not exit names, but rather references to be used in the receiving vat.
  • uncallers :List. Used as Data-E uncaller list in the same way.
  • invExits :Map and invUncallers :List. When a PassByProxy reference is sent over a reference having this SerMap, it arrives in the receiving vat having a SerMap with these two fields exchanged with exits and uncallers.
Personal tools
more tools