210 likes | 337 Views
This paper explores the design and implementation of reliable, high-performance communication systems using modular software components. It discusses the benefits of component-based design, such as ease of customization and extensibility, alongside challenges including configuration complexity and performance limitations. Key techniques for optimizing efficiency in communication protocols are highlighted, including garbage collection avoidance and header compression. The paper emphasizes the importance of formal methods in ensuring correctness and robustness, and provides insights into practical applications and design lessons learned from implementations.
E N D
Building reliable, high-performance communication systems from components Xiaoming Liu, Christoph Kreitz, Robbert van Renesse, Jason Hickey, Mark Hayden, Ken Birman, Bob Constable (shepherd: Peter Lee) Cornell, Caltech, Compaq (CMU, Cedilla)
Why software components? • Ease design and development • Tuning to environment • Customization to user app • Extensibility • Verification and robustness
Why not? • Configuration is hard • Performance is bad • Abstraction barriers • Poor locality • Redundant code • Not reliable • Not faster
Group Communication Network
History Ensemble Horus Isis V • Layers • Protocols • Multicast • ML • Formal methods • Membership • CATOCS
Specification logical predicates code of a layer Properties (English) Concrete (ML) Implementation
Specification Abstract Spec (I/O Automata) proof refinement Properties (English) Concrete (ML) Implementation
Abstract IOA specificationof totally ordered multicast S: array[integer] ofmessage next: integer deliv: array[process] ofinteger action Multicast(m) { S[next++] := m; } action Deliver(p, m) precond: deliv[p] < next && m == S[deliv[p]] { deliv[p]++; } global state
abstract FIFO network spec Layer correctness Hickey, Lynch, Van Renesse, TACAS’99 Token layer on each CPU abstract Total Order network spec network + layer == network++
Stack correctness Seqno layer For example: Token Seqno unreliable Token layer FIFO total
Efficiency? • Ensemble stacks have many layers, improving clarity, but inefficient. • 5 optimization techniques: • Avoiding (in-line) garbage collection • Avoiding marshaling • Delaying non-critical message processing • Identifying common paths • Header compression
A protocol layer is a function! old state new state layer input event output events
(off-line) partial evaluation original code NuPrl layer Specialized code Common Case Predicate Hacker + Formal person
Two-phase optimization Off-line On-line Programmer Formal User bypass function code CCP TT TT
Header compaction T_Data T_Data seqno Hash seqno T_Last • Less space • Faster processing
Architecture (deliver only) Application generated bypass original stack CCP (e.g., hdr.seq = win.lo) ? (marshaling, device independence) Transport driver Network
Architecture Application CCP ? generated bypass original stack ? (marshaling, device independence) Transport driver Network
Performance • Three different versions: • Original (ORIG) • Hand-optimized (HAND) • Machine-optimized (MACH) • 300 MHz UltraSparc/Solaris 2.6 • OCaml 2.0 native code compiler
Code latency (sec) (See paper for CPU cycles and TLB misses)
Lessons learned • Design with formalization in mind • Use small, but not too small components • Use a language with formal semantics • Use IOA as a specification language • Use formal tool with in-house expertise
Final remarks • See CD or Web for code samples, links to all code, as well as how to reproduce our results • Still working on a machine-generated proof of correctness