INTRODUCTION Overlay networks are used in variety of distributed systems. P2: a facility, deployable as a service or library, for the declarative construction, maintenance, and sharing of an overlay network Applications: concise a logical description of an overlay network, and P2 executes this to maintain routing data structures, perform resource discovery and forwarding functionality. Goal: simplify the process of selecting, implementing, deploying and evolving an overlay network design.
INTRODUCTION P2 does not aim as optimized performance as e.g. C, C++ or Java implementations. CHORD: 47 logical rules (full Overlog specification), MACEDON 320 statements. P2: Simplified approach (16 rules, NARADA) Target is to demonstrate that declarative overlay descriptions can be implemented by P2 with acceptable performance.
P2 approach A combination of protocol- and structure centric approach that would be most attractive for overlay specification and runtime. P2 employs 2 types on relations: Soft-state tables (network state) Streams of transient tuples (stream query engines)
Overlog P2 specification language for overlays. Overlog designed for distribution of context data and messages. Overlog: P2 adds constructs to specify physical distribution properties. Tuples are physically generated, stored and sent Queries over streams Deletion of tuples
NARADA Summary of functionality (16 rules): 1.Each node maintains a set of neighbors, and a set of members in the group. 2.Each member epidemically propagates keep-alive messages for itself (Associated to monotonically increased sequence number) 3.Neighbors exchange information about membership liveness and sequence numbers. (members learn the liveness of each member) 4.If member fails to hear direct neighbor for a period, it declares neighbor dead. (updates its own membership state and propagates the rest population) 5.Periodical updates to measure roundtrip latency. 1.If latency time improves -> node A adds node B to its neighbor set 2.If latency time exceeds -> node A removes node B from its neighbor set
Example of NARADA based Overlog declarations Overlog syntacts: :- Neighbor and member are tables whose tuples are retained for 120 seconds: materialize(neighbor, 120, infinity, keys(2)). materialize(member, 120, infinity, keys(2)). materialize(sequence, infinity, 1, keys(2)). Rule (R1): R1 refreshEvent(X) :- periodic(X, E, 3). “Table refreshEvent has a row with value (X), for any X, if table periodic has a row with value (X, E, 3), for some E.”
P2 Implementation Platform: Linux Code: C++ Codelines: ~20k (+ 3 rd party support)
Block diagram of a P2 node
Performance (FIG. 3)
Performance (FIG. 4)
Conclusion The P2 approach looks promising Overlays can be specified concisely Performance is acceptable Overlog allows easy modification