This page explains the different kinds of references for purposes of accurately understanding message delivery and partial failure. For orientation it also provides introductory explanations of how these distinctions affect reference equality. Briefly, if a reference is Settled, it supports The E language's "==" construct and may be used as a key in E's hashtables. Once you have this page under your belt, if you want more information of reference equality and Settled vs Unsettled, proceed to When are two references the same?. Horizontal TaxonomyAll references are either Sturdy or Live. The following diagrams illustrate the possible transitions between the states of a Live reference. The most important distinction is that a live reference is either Near, Eventual, or Broken. These Diagrams use David Harel's Statecharts notation, a generalization of state transition diagrams. In statecharts, rounded rectangles represent a state or set of states. Arrows between rounded rectangles represent possible state transitions from any of the states in the from-set to any of the states in the to-set. So the arrow from Promise to Resolved means that a Promise may become Near, Far, or Broken. Separately, A Far reference may become Broken.
Vertical TaxonomyA reference is either a Promise or Resolved.
Detailed TaxonomyThere are two kinds of Promises: The LocalPromise and the RemotePromise. These further distinctions are mostly of interest to the theoretician or E implementor, and will not normally be of concern to the E programmer. For most programming purposes, all Promises can be treated alike. The result of an eventual-send always starts out as a Promise, either a LocalPromise or a RemotePromise depending on whether the message was sent intra- or inter-vat. A LocalPromise is a promise for which the Resolver is in the same vat. A RemotePromise, like a Far reference, crosses vat boundaries.
Expanded Reference TaxonomySo, mixing graphical notations, here is the expanded reference taxonomy: Rounded rectangles and the arrows between them, none of whom begin with a dot, are to be interpreted according to statechart notation as above. Within the leaf rounded rectangles (those that do not contain further rounded rectangles) the arrows shown, all of whom begin with dots, represent references using our extended Granovetter notation. A line without a squiggle is wholly contained within a single vat. A line with a squiggle (Remote) isn't, or in the case of a SturdyRef, may not be. A triangular arrowhead is a reference messages can be sent on. These messages move towards the arrowhead, in the hopes of eventually being delivered. A gray halo around an arrowhead (Promise) means that, although the arrowhead is not yet attached to an object, and therefore the arrow does not yet point at an object, the arrowhead itself is reified as a Resolver object, which can be used to determine whether and what the arrow should point at. A gray circle attached to an arrowhead is the object the reference points at. Elsewhere, we use cirle vs rectangle to distinguish whether the pointed-to object is PassByProxy (circle) or PassByConstruction (rectangle). (The common case of PassByConstruction is PassByCopy.) A slash as arrowhead (Broken) indicates that the reference will never point at anything. This always goes with a box on the side which is the problem-object (a Throwable presumably explaining why not). While messages may still be sent on this reference, they will always simply report this problem and be discarded. If a gray circle is shown after the slash, it represents the object the reference used to point at before it broke, in which case it retains this identity for equality testing purposes. A diamond as arrowhead (SturdyRef) is "forever". This is the only kind of reference to survive a network partition, and so is the means by which connectivity is preserved and consistency recovered across such traumas. The price of survival is that a SturdyRef cannot directly accept messages, since it cannot guarantee fail-stop delivery: See Handling Partial Failure. Distributed EqualityIn order to reason about distributed reference equality, yet further distinctions are needed. See Equality and in particular When are two references the same?. |
||||||||||||
Unless stated otherwise, all text on this page which is either unattributed or by Mark S. Miller is hereby placed in the public domain.
|