runway
play

Runway A new tool for distributed systems design Diego Ongaro Lead - PowerPoint PPT Presentation

Runway A new tool for distributed systems design Diego Ongaro Lead Software Engineer, Compute Infrastructure @ongardie https://runway.systems Outline 1. Why we need new tools for distributed systems design 2. Overview and demo of Runway


  1. Runway A new tool for distributed systems design Diego Ongaro Lead Software Engineer, Compute Infrastructure @ongardie https://runway.systems

  2. Outline 1. Why we need new tools for distributed systems design 2. Overview and demo of Runway 3. Building a Runway model

  3. Distributed Systems Are Hard ● Concurrency and message delays ● Failures, failures during failures ● Many possible interleavings of events ● Little visibility, poor debugging environments

  4. Raft Background / Difficult Bug Raft: fault-tolerant consensus algorithm Difficult design bug: Used in many examples in this talk Quick summary: 1. Use majority voting to elect a leader 2. Leader replicates its log to followers

  5. Typical Approaches Find Design Issues Too Late Code reviews Unit tests These are good techniques for implementation errors System tests ● Localized: easy to fix Randomized tests, fuzzing, Too expensive for design errors Jepsen ● May require large changes Benchmarks ● May cause unforeseen consequences Metrics Let’s find the right design sooner... Dark launches Bug reports

  6. Design Phase Communication: Evaluation: Goals ● Build intuition quickly ● Simplicity ● Unambiguous ● Correctness ● Reviewable: discuss major issues and ● Performance consider alternatives ● Availability Commonly used today: State of the art: ● Visualization (animation) Tools ● Specification ● Model checking ● Simulation

  7. Design Tools Use System Models A model is a representation of a system that captures its essential concepts and omits irrelevant details. Visualization Specification Model checking Simulation

  8. A Tour of Runway

  9. Runway Overview Specify, simulate, visualize, and check system models graphs, data randomized model simulator execution (spec) visualization interaction S2:recv (error) model (animation) S3:proc checker S1:send Integrated into one tool: write one model, get many benefits

  10. Runway Demo Too many bananas, elevators, and Raft

  11. Runway Integration Independent tools: create independent models TLA+ JS Rust pseudo ● Write similar models for different tools ● Change the design: revise them all 500 LOC 300 LOC 550 LOC 150 LOC Runway: reuse the same model ● Lower cost, additional benefit ⇒ create models sooner ● More likely to find modeling bugs Specification, simulation, and model checking all benefit from visualization

  12. Building a Runway Model

  13. Developing a Model specification Idealized steps: 1. Sketch view by hand 2. Define types, state variables visualization 3. Create view based on sketch aids with view 4. Write invariants debugging 5. Write transition rules Tip: set convenient starting state

  14. Runway’s Specification Language ● Specification is code ● Define starting state, transition rules, and invariants ○ Labeled Transition System ● Rules encode behavior + failures ● Applying a rule is atomic (one at a time) ● A rule is active if applying it would change the state ● If multiple rules are active, system decides ○ Simulator: random choice ○ Model checker: walk the tree

  15. Example: Too Many Bananas (1) Type and variable declarations, invariant type-safe variant: can’t access unless ReturningFromStore

  16. Example: Too Many Bananas (2) Transition rule no state changed: inactive until readset changes

  17. It’s About Time Developers: each server tries to approximate “the global clock” Physicists: Ha! Blah blah blah, blah, blah! Blah blah blah blah. Blah! Want some safety properties to hold even if clocks misbehave Need time to describe availability and performance Runway’s current approach: global clock, conditionally true server.timeoutAt <= clock

  18. Summary ● Let’s apply tools to help us design distributed systems ● Modeling helps focus our attention on concepts, leaving out unimportant details ● Runway combines spec, model checking, simulation, and interactive visualization ● Go view the models, build your own, and help develop Runway

  19. solve design problems in the design phase https://runway.systems

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend