Browse Source

Supply #f as cleanup function in multicast udp-dataspace, instead of void; notes on cleanup functions and visibility-restrictions

fruit
Tony Garnock-Jones 4 years ago
parent
commit
838bde3740
  1. 24
      syndicate/HOWITWORKS.md
  2. 2
      syndicate/mc/udp-dataspace.rkt

24
syndicate/HOWITWORKS.md

@ -509,7 +509,31 @@ interested in the `present` constructor. @@ -509,7 +509,31 @@ interested in the `present` constructor.
# TODO
- describe the cleanup function associated with a handler in the real implementation
- `relay.rkt` uses it. When an inner actor asserts interest in an
inbound assertion-set, the relay process pivots into the outer
dataspace's context, and adds a new endpoint that relays events
to the inner dataspace. The cleanup function attached to that
endpoint retracts (from the inner dataspace) any matching
assertions left over at the time the endpoint is removed.
- that appears to be it! Nowhere else in the code is a
`skeleton-interest` constructed with a non-`#f` cleanup
function.
- figure out and describe scoped assertions / visibility-restrictions
- (partial/sketchy answer:) It's to deal with the fact that
multiple endpoints may overlap. Within a single dataspace, an
assertion matching both endpoints will trigger each of them.
When relaying, the relay maintains an endpoint in the outer
space for each in the inner space. When both outer endpoints are
triggered, if they were to naively relay the matching assertion,
the problem isn't so much that they'd double up (because
dataspaces deduplicate!), the problem is that they don't have
enough information to reconstruct the triggering outer assertion
perfectly! So a visibility-restriction causes an assertion to
*only* trigger inner endpoints that capture *exactly* the
captures of the outer endpoint. One of the outer endpoints will
trigger its "matching" inner endpoint, but not the inner
endpoint of the other endpoint, even though you might expect the
relayed assertion to do so.
<!--

2
syndicate/mc/udp-dataspace.rkt

@ -89,7 +89,7 @@ @@ -89,7 +89,7 @@
(current-actor)
(lambda ()
(assert! (mcds-relevant term peer))))))
void))
#f))
(add-endpoint! (current-facet)
"udp-dataspace (mcds-inbound (observe ...))"
#t

Loading…
Cancel
Save