Chemical Networking Protocols Thomas Meyer and Christian Tschudin University of Basel, Switzerland 8 th ACM Workshop on Hot Topics in Networks (HotNets-VIII) New York, October 22 nd , 2009
Observation • There are many protocols that make use of the same underlying principle: Bring the system to equilibrium at the point of optimal operation • Examples: • Classical: TCP “bases on the conservation of packets principle to bring a connection to equilibrium” [Jacobson, 1988] • Social-network → Gossip protocols • Animal behavior → AntNet routing protocol Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 2
Contributions • Feasibility result: • Protocol implementations can recover from loss of code in the same way as they can recover from packet loss. • Provable dynamics result: • A new way of proving the dynamics of a protocol (e.g. convergence). • Execution model: • All this is enabled by a new programming model , metaphorically called Chemical Networking Protocols . • Paradigmatic change: • Think in terms of flows , not finite state-machines. • Representation-free instead of symbolic information encoding. Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 3
Overview • Distributed chemical reaction networks • Example: Disperser - a gossip-style protocol • Formal convergence analysis • An implementation in Fraglets • Code homeostasis: Self-regulation of code with Quines • A first self-healing protocol • Discussion • Flows vs. FSM • Symbolic vs. representation-free encoding of information • Application fields Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 4
Distributed Chemical Reaction Networks: A Molecule Disperser Example • Each network node contains a multiset of “molecules” . • Each node executes “reactions” . • Example reaction: Pick a (random) molecule and send it to a neighbor node. Node n3 Node n2 Node n1 Node n4 reaction molecule • We start with an arbitrary distribution of molecules... Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 5
Distributed Chemical Reaction Networks: A Molecule Disperser Example • ...and want to obtain a uniform distribution. • The system shall calculate the average number of molecules. Node n3 Node n2 Node n1 Node n4 reaction molecule • What is needed such that this distributed system converges? Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 6
Traditional Packet Scheduling • Traditional packet scheduler: Drain queues as fast as possible. In the chemical context: Each reaction vessel executes reactions back-to-back. • Result: Molecules drift to nodes with high degree : 0-1$%2 0-1$%5 2333 2333 %)*#+$,%-.%/ %)*#+$,%-.%/ 833 833 Node n3 733 733 Node n1 Node n2 633 633 533 533 Node n4 3 3 3 4 23 24 53 3 4 23 24 53 !"#$%&'( !"#$%&'( 0-1$%9 0-1$%6 2333 2333 %)*#+$,%-.%/ %)*#+$,%-.%/ 833 833 733 733 633 633 533 533 3 3 3 4 23 24 53 3 4 23 24 53 !"#$%&'( !"#$%&'( • The result depends on the network topology and the nodes’ performance! Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 7
Elements of a Chemical Networking Theory • Network graph: G = ( V, E ) Node n3 Node n1 Node n2 Node n4 Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 8
Elements of a Chemical Networking Theory • Network graph: G = ( V, E ) Node n3 Node n1 Node n2 Node n4 • Node: Multiset of molecules: Node n2 Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 9
Elements of a Chemical Networking Theory • Network graph: • Set of molecules: G = ( V, E ) S = { X i , C ij } ∀ i ∈ V, ( i, j ) ∈ E Node n3 Node n1 Node n2 Node n4 • Node: Multiset of molecules: Node n2 C 23 X 2 C 24 C 21 Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 10
Elements of a Chemical Networking Theory • Network graph: • Set of molecules: G = ( V, E ) S = { X i , C ij } ∀ i ∈ V, ( i, j ) ∈ E Node n3 Node n1 Node n2 • Set of reactions: Node n4 • Node: Multiset of molecules: R = { r ij | ( i, j ) ∈ E } r ij : C ij + X i − → C ij + X j Node n2 C 23 r 23 X 2 r 21 r 24 C 24 C 21 Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 11
Elements of a Chemical Networking Theory • Network graph: • Set of molecules: G = ( V, E ) S = { X i , C ij } ∀ i ∈ V, ( i, j ) ∈ E Node n3 Node n1 Node n2 • Set of reactions: Node n4 • Node: Multiset of molecules: R = { r ij | ( i, j ) ∈ E } r ij : C ij + X i − → C ij + X j Node n2 v 21 = c 23 x 2 • Law of mass action scheduler: C 23 The reaction rate of all reactions is X 2 equal to the product of the reactant concentrations. v 21 = c 21 x 2 v 2 4 v ij = c ij x i = c 2 4 x C 24 C 21 2 c ij = 1 : v ij = x i Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 12
Law of Mass Action Scheduler • LoMA Scheduler: Each node sleeps for a well-defined (but inherently stochastic) time between two reactions: • Result: Our Disperser protocol computes a useful result : average function. +,-$%. +,-$%1 ./// ./// Node n3 4// 4// $)$#$*!' $)$#$*!' 3// 3// Node n1 Node n2 2// 2// Node n4 1// 1// / / / 0 ./ .0 1/ / 0 ./ .0 1/ !"#$%&'( !"#$%&'( +,-$%5 +,-$%2 ./// ./// 4// 4// $)$#$*!' $)$#$*!' 3// 3// 2// 2// 1// 1// / / / 0 ./ .0 1/ / 0 ./ .0 1/ !"#$%&'( !"#$%&'( Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 13
Disperser: Formal Flow Analysis • Convergence proof of Disperser using a classical perturbation analysis: 1. Write down the system’s differential equations : Node n2 2 x x 2 = x 1 + x 3 + x 4 ˙ − 3 x 2 � �� � � �� � inflow outflow x 1 X 2 3 x x 4 x 2 x 2 Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 14
Disperser: Formal Flow Analysis • Convergence proof of Disperser using a classical perturbation analysis: 1. Write down the system’s differential equations : Node n2 2 x x 2 = x 1 + x 3 + x 4 ˙ − 3 x 2 � �� � � �� � inflow outflow x 1 X 2 3 2. Find the fixpoint : x Concentrations do not change anymore at equilibrium: x 4 set all time derivatives to zero: x 2 x ∗ 2 = ( x ∗ 1 + x ∗ 3 + x ∗ 4 ) / 3 x 2 � j x ∗ j = average number of X-molecules x ∗ i = | V | Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 15
Disperser: Formal Flow Analysis • Convergence proof of Disperser using a classical perturbation analysis: 1. Write down the system’s differential equations : Node n2 2 x x 2 = x 1 + x 3 + x 4 ˙ − 3 x 2 � �� � � �� � inflow outflow x 1 X 2 3 2. Find the fixpoint : x Concentrations do not change anymore at equilibrium: x 4 set all time derivatives to zero: x 2 x ∗ 2 = ( x ∗ 1 + x ∗ 3 + x ∗ 4 ) / 3 x 2 � j x ∗ j = average number of X-molecules x ∗ i = | V | 3. Show that the fixpoint is asymptotically stable : Linearize the system around the fixpoint (Jacobian) and show that the real part of all eigenvalues are negative. Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 16
Chemical Networking Protocol Implementation • Fraglets - a programming language to express distributed chemical reactions: • Molecules=strings of symbols; symbols=executable “assembler instructions” • (Partial) List of the Fraglets instruction set : [ match x tail1 ] + [ x tail2 ] � [ tail1 tail2 ] [ matchp x tail1 ] + [ x tail2 ] � [ matchp x tail1 ] + [ tail1 tail2 ] [ nop tail ] � [ tail ] [ fork a b tail ] � [ a tail ] + [ b tail ] [ send j tail ]i � [ tail ]j • The Disperser protocol, Node n1 Node n2 programmed in Fraglets: C 12 matchp X send n2 X X 2 C 12 + X 1 − → C 12 + X 2 X 1 X send n2 X X Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 17
Overview • Distributed chemical reaction networks • Example: Disperser - a gossip-style protocol • Formal convergence analysis • An implementation in Fraglets • Code homeostasis: Self-regulation of code with Quines • A first self-healing protocol • Discussion • Flows vs. FSM • Symbolic vs. representation-free encoding of information • Application fields Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 18
Finite Reactor • We limit the capacity (number of molecules) of the reaction vessel... Due to limited resources, we cannot let the number of molecules grow infinitely. • ...by randomly overwriting molecules when this vessel capacity is exceeded. overflow Reaction Vessel • Consequence: We risk to lose part of the program logic (code) . • Possible strategy: Continuous regeneration of “code” molecules. Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 19
Autocatalytic Reaction Networks • To handle code loss we have to continuously regenerate it. • Well-known Quines, now in Fraglets: A quine is a program that generates its own source code as output. [match x fork fork fork match nop x] [x fork fork fork match nop x] We start with two slightly different molecules Th. Meyer & Ch. Tschudin: Chemical Networking Protocols 20
Recommend
More recommend