Distributed Data Flow Language for Multi-Party Protocols Krzysztof Ostrowski † , Ken Birman † , Danny Dolev § † Cornell University, § Hebrew University {krzys|ken}@cs.cornell.edu, [email protected]
Transcript
Slide 1
Distributed Data Flow Language for Multi-Party Protocols
Krzysztof Ostrowski , Ken Birman , Danny Dolev Cornell University,
Hebrew University {krzys|ken}@cs.cornell.edu,
[email protected]
http://liveobjects.cs.cornell.edu basic building block
Slide 15
http://liveobjects.cs.cornell.edu basic building block
Slide 16
http://liveobjects.cs.cornell.edu need lots of different
objects (protocols)
Slide 17
http://liveobjects.cs.cornell.edu need lots of different
objects (protocols) user-defined objects
Slide 18
How to Implement New Objects? custom user-defined object
Slide 19
custom user-defined object Java / C# / C++ protocol composition
Frameworks (Ensemble, BAST, Appia) MACE, P2, etc. How to Implement
New Objects?
Slide 20
custom user-defined object Java / C# / C++ protocol composition
Frameworks (Ensemble, BAST, Appia) MACE, P2, etc. How to Implement
New Objects?
Slide 21
custom user-defined object Java / C# / C++ protocol composition
Frameworks (Ensemble, BAST, Appia) MACE, P2, etc. How to Implement
New Objects?
Slide 22
higher-level logic (making decisions) Java / C# / C++ protocol
composition Frameworks (Ensemble, BAST, Appia) MACE, P2, etc.
lower-level logic (e.g., ACKs, timeouts, building rings/trees,
internal bookkeeping) intermingled, tightly-coupled How to
Implement New Objects?
Slide 23
higher-level logic (making decisions) lower-level logic (e.g.,
ACKs, timeouts, building rings/trees, internal bookkeeping)
intermingled, tightly-coupled How to Implement New Objects?
Slide 24
higher-level logic (making decisions) lower-level logic (e.g.,
ACKs, timeouts, building rings/trees, internal bookkeeping)
intermingled, tightly-coupled How to Implement New Objects?
Slide 25
less flexibility harder to write/debug Java / C# / C++ protocol
composition Frameworks (Ensemble, BAST, Appia) MACE, P2, etc.
error- prone less sophisticated How to Implement New Objects?
Slide 26
less flexibility harder to write/debug Java / C# / C++ protocol
composition Frameworks (Ensemble, BAST, Appia) MACE, P2, etc.
error- prone less sophisticated How to Implement New Objects?
Slide 27
less flexibility harder to write/debug Java / C# / C++ protocol
composition Frameworks (Ensemble, BAST, Appia) MACE, P2, etc.
error- prone less sophisticated How to Implement New Objects?
Slide 28
less flexibility harder to write/debug Java / C# / C++ protocol
composition Frameworks (Ensemble, BAST, Appia) MACE, P2, etc.
error- prone less sophisticated How to Implement New Objects?
Slide 29
lower-level logic (e.g., ACKs, timeouts, building rings/trees,
internal bookkeeping) higher-level logic (making decisions)
separation of concerns
Slide 30
How to Implement New Objects? separation of concerns programmer
compiler and runtime
Slide 31
How to Implement New Objects? separation of concerns programmer
compiler and runtime
example: leader election protocol 3 3 9 6 aggregation with
min
Slide 122
example: leader election protocol aggregation with min 3 9 6
3
Slide 123
example: leader election protocol aggregation with min 3 9 6
3
Slide 124
example: leader election protocol aggregation with min 3 9 6
3
Slide 125
Different flavors of aggregation: 1.In-order, 2.Guarded,
3.Coordinated, 4.Etc. formal, abstract properties can reason about
global behavior Separation of Concerns
Slide 126
We dont specify: 1.How values are aggregated (in the network,
in a centralized fashion) 2.Which nodes interact with one-another
3.What protocol is used (token ring, scalable tree, gossip) 4.Where
the aggregated values emerge 5.When and how often aggregation
occurs
Slide 127
Separation of Concerns We dont specify: 1.How values are
aggregated (in the network, in a centralized fashion) 2.Which nodes
interact with one-another 3.What protocol is used (token ring,
scalable tree, gossip) 4.Where the aggregated values emerge 5.When
and how often aggregation occurs
Slide 128
Separation of Concerns We dont specify: 1.How values are
aggregated (in the network, in a centralized fashion) 2.Which nodes
interact with one-another 3.What protocol is used (token ring,
scalable tree, gossip) 4.Where the aggregated values emerge 5.When
and how often aggregation occurs
Slide 129
Separation of Concerns We dont specify: 1.How values are
aggregated (in the network, in a centralized fashion) 2.Which nodes
interact with one-another 3.What protocol is used (token ring,
scalable tree, gossip) 4.Where the aggregated values emerge 5.When
and how often aggregation occurs
Slide 130
Separation of Concerns We dont specify: 1.How values are
aggregated (in the network, in a centralized fashion) 2.Which nodes
interact with one-another 3.What protocol is used (token ring,
scalable tree, gossip) 4.Where the aggregated values emerge 5.When
and how often aggregation occurs
Slide 131
Separation of Concerns We dont specify: 1.How values are
aggregated (in the network, in a centralized fashion) 2.Which nodes
interact with one-another 3.What protocol is used (token ring,
scalable tree, gossip) 4.Where the aggregated values emerge 5.When
and how often aggregation occurs
Slide 132
Aggregation with a Token Ring
Slide 133
{1..3,5..6}{2..4, 6}{1..6}
Slide 134
Aggregation with a Token Ring {1..3,5..6}{2..4, 6}{1..6} token
leader node
Slide 135
Aggregation with a Token Ring {1..3,5..6}{2..4, 6}{1..6}
token
Slide 136
Aggregation with a Token Ring {1..3,5..6} {2..4, 6}{1..6}
Slide 137
Aggregation with a Token Ring {1..3,5..6} {2..4, 6}{1..6}
Slide 138
Aggregation with a Token Ring {1..3,5..6} {2..4, 6} {1..6}
intersect
Slide 139
Aggregation with a Token Ring {2..3, 6} {1..6}
Slide 140
Aggregation with a Token Ring {2..3, 6} {1..6}
Slide 141
Aggregation with a Token Ring {2..3, 6} {1..6} intersect
01: object lock ( bool wants ) : bool holds 02: { 03: same int
owner; 04: where ( wants ) 05: owner := elect ( id ); 06: holds :=
wants ( owner = id ); 07: } embedding distributed locking
protocol
Slide 162
01: object elect ( up int candidate ) 02: : s-up int leader 03:
{ 04: s-up int elected := 0; 05: where ( fresh elected 06: elected
candidate ) 07: elected := min candidate; 08: leader := elected;
09: } leader election protocol the core part
Slide 163
Conclusions
Slide 164
1.Collaboration requires custom protocols a)Fine-tuned for a
particular application semantics b)Fine-tuned for different
networks and workloads 2.Existing protocol languages dont suffice
a)Developers need a clean separation of concerns 3.Modeling
protocols as distributed flows a)Captures high-level protocol
semantics concisely b)Reduces a coding burden on protocol
developers c)Supports reasoning about the protocol behavior
d)Provides a high degree of architectural flexibility
Conclusions