aspects and closures and promises (oh my!) alva l. couch tufts university
TRANSCRIPT
![Page 1: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/1.jpg)
Aspects and Closures and Promises (Oh My!)
Alva L. Couch
Tufts University
![Page 2: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/2.jpg)
Goals
• To form a unified theory of system administration
• To point out similarities and differences between existing theories
• To suggest next steps
![Page 3: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/3.jpg)
Aspects
• Embody the idea of constraints needed in order for a system to work properly. – Example: the hostname has to be listed
identically in several files in /etc.
• An aspect is a pair <P, C> where– P is a set of parameters. – C is a set of constraints on parameter value.
![Page 4: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/4.jpg)
Key ideas of aspects
• Parameters stored in different locations are considered distinct.
• Most common constraint is identity: P1==P2 (note that we mean the values of the parameters, not their names!)
• Easiest way to manage aspects: generate all configuration data from “one file”, where identity relationships are automatically preserved.
![Page 5: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/5.jpg)
Closures
• Idea of a closure: a domain of “semantic predictability”.
• Theoretically, a function F from a set of sequences of inputs to predicted outputs
• A closure is a function F:Σ*→Σ where– Σ is an alphabet of transactions that can occur– Σ* is the set of all sequences of transactions
![Page 6: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/6.jpg)
Closure structure
• The definition of a closure is easy. • The “structure” of a closure arises from
equivalences on Σ*, where we consider g≡h whenever F(g)=F(h)
• This gives rise to a set of equivalence classes of inputs Σ*/≡, where the members of each class evoke the same response.
• The “configuration” of a closure can be considered as the equivalence class E⊆Σ* (under the equivalence relation ≡) corresponding to the inputs received so far.
![Page 7: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/7.jpg)
Closures and aspects
• If transactions involve selecting parameter values in accordance with constraints, and behaviors are predictable as a result, then an aspect (together with its behavior) forms a closure.
![Page 8: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/8.jpg)
Distributed aspects
• Many aspects are “distributed” among a network.
• Example: the identity of the DNS server has to be a server that in actuality provides DNS service.
• Logic behind generative configuration management: distributed aspects are guaranteed to be correct.
![Page 9: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/9.jpg)
Promises
• A promise is a commitment to provide service.
• A →π B: A promises π to B
• π contains two parts– A “type” T that distinguishes the kind of
promise. – Subsidiary data D that further identifies
the nature of the promise.
![Page 10: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/10.jpg)
One primitive kind of promise
• Type T = a parameter name
• Data D = a parameter value
• Interpretation: if you set this parameter to this value, “it’ll all work”.
![Page 11: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/11.jpg)
Another kind of promise
• T=“DNS service”
• D=“I am a DNS server you could use”
• You could decide, based upon receiving this promise, whether to bind to that DNS server or not.
![Page 12: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/12.jpg)
Degenerate case: master/slave
• One host serves as “master”.
• It “promises” that if everyone conforms to a specific configuration, all will work.
X
A
B
C
D
E
F
π
π
π
π
π
π
![Page 13: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/13.jpg)
Distributed masters for differing aspects
• Natural evolution: one master/aspect (in Paul Anderson’s definition of the word)
XY
A
BC
D
![Page 14: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/14.jpg)
Promise types
• π: a promise to provide something• U(π): an acknowledgement or agreement
to use the value contained in π• C(π): an agreement to coordinate value of
π with another host, so that the two hosts agree on the value of π– A –C(π)→ B means
• A asks B to coordinate with A on π. • B responses that it will coordinate. • B responds with values for π (as π is updated).
![Page 15: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/15.jpg)
Promises and closures
• A promise is something made between agents, not something that exists in an agent by itself.
• Inside an agent, we want “closure”. • Between agents, we have “promises”.• Thus there is little meaning to a promise
within a closure, but a rather straightforward meaning between closures.
![Page 16: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/16.jpg)
Promises and constraints
• A promise always– binds the sender with a constraint. – provides an option to the receiver.
• A promise never – binds or constrains the receiver. – requires a response.
![Page 17: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/17.jpg)
Simple promises
• A sends π to B. • B sends U(π) to A. • Thus A and B are bound together. • Example: A provides file service,
directory service, backup service, etc. B agrees to use service provided by A.
![Page 18: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/18.jpg)
Promises and distributed aspects
• A promise is a way of communicating constraints to other hosts.
• It always gives options.
• So the receiving host may choose between options given.
• Distributed aspects are satisfied by using only promised services.
![Page 19: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/19.jpg)
Promise theory in action
A B
C D
C(π)
C(π)
C(π)
![Page 20: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/20.jpg)
Promise theory in action (2)
A B
C D
C(π)
C(π)
C(π)
Xπ
U(π)
π
![Page 21: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/21.jpg)
Promise theory in action (3)
A B
CD
C(π)
C(π)
C(π)
Xπ
U(π)V(π)
ππ
V(π)
ππ
V(π)
At the end of this process, all coordinated nodes share service X.
![Page 22: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/22.jpg)
How networks self-organize from promises
• Servers broadcast promises to serve.
• Clients receive broadcasts, promise to use.
• Communities use coordination promises to ensure a consistent environment.
• Result is bindings that form distributed aspects.
![Page 23: Aspects and Closures and Promises (Oh My!) Alva L. Couch Tufts University](https://reader035.vdocuments.net/reader035/viewer/2022062518/56649ec65503460f94bd2028/html5/thumbnails/23.jpg)
Promises and distributed aspects
• Promises solve the problem of non-working services and bad bindings.
• But there is no way to undo a promise!
• If a host decides not to be a DNS server, must reboot the promise process.
• Bindings occur at boot time and are not persistent between boots.