Ad-hoc serialization comity

From Erights

(Difference between revisions)
Jump to: navigation, search
(Proposals: add just-make-a-comm-system proposal)
Line 1: Line 1:
== Premise ==
== 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 --[[User:Kevin Reid|Kevin Reid]] 22:19, 26 June 2008 (CDT)]].
+
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 FQN/emaker namespace [which should go away too, but I haven't gotten to that problem yet --[[User:Kevin Reid|Kevin Reid]] 22:19, 26 June 2008 (CDT)].
== Proposals ==
== Proposals ==
-
 
-
=== User comm systems ===
 
-
 
-
Just make sure it is convenient for an application to make a customized instance of [[Pluribus]] with the desired graph exits. Communication can be bootstrapped by passing cap bits over the standard instance.
 
-
 
-
Compared to the table-tagged references proposal, this is more heavyweight to set up, and requires the application to be more aware of implementation aspects, but does not introduce any complexity into the definition of [[CapTP]].
 
=== Table-tagged references ===
=== Table-tagged references ===
-
There are multiple tables of [[graph exits]], called ''comity tables'', 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 comity table.
+
Each [[CapTP]] [[eventual reference]] has its own table of [[graph exits]]. 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 comity tables are the same.
+
Two eventual references are the [[same]] only if their exit tables are the same.
-
 
+
-
It is not possible to retrieve the comity table of a reference.
+
[[eventual send|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.
[[eventual send|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 'withComity' operation introduces an agreement.
 
-
 
-
withComity(<var>referent</var>, <var>table</var> :ComityTable)
 
-
 
-
Returns a reference like <var>referent</var> except that the exit table is augmented with the entries in <var>table</var>.
 
-
 
-
A ComityTable is an object with four fields:
 
-
* <var>exits</var> :[[Map]]. Used as Data-E [[unscope]] for serializing arguments of messages to references having this ComityTable, 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 ComityTable, it arrives in the receiving vat having a ComityTable with these two fields exchanged with <var>exits</var> and <var>uncallers</var>.
 
(This proposal was invented in conversation with MarkM by --[[User:Kevin Reid|Kevin Reid]] 22:19, 26 June 2008 (CDT))
(This proposal was invented in conversation with MarkM by --[[User:Kevin Reid|Kevin Reid]] 22:19, 26 June 2008 (CDT))
[[Category:Unresolved design issues]]
[[Category:Unresolved design issues]]
-
[[Category:Pluribus]]
 

Revision as of 03:19, 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 FQN/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

Each CapTP eventual reference has its own table of graph exits. 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.

(This proposal was invented in conversation with MarkM by --Kevin Reid 22:19, 26 June 2008 (CDT))

Personal tools
more tools