Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Towards Meta-Level Engineering and Tooling for Complex Concurrent Systems

Towards Meta-Level Engineering and Tooling for Complex Concurrent Systems

B207c84229c3cc91fa26369bc374d2eb?s=128

Stefan Marr

March 24, 2016
Tweet

Transcript

  1. Stefan Marr, Elisa Gonzalez Boix, Hanspeter Mössenböck Towards Meta-Level Engineering

    and Tooling for Complex Concurrent Systems
  2. ApplicaFons in the MulFcore Age 2 Concurrency Model: event-loops or

    actors User Interface asynchronous event-driven
  3. ApplicaFons in the MulFcore Age 3 ~/Library/Mail$ sqlite3 EnvelopeIndex SQLite

    version 3.7.7.1sqlite> .schema CREATE TABLE addresses (ROWID int, address, comment); CREATE TABLE messages (ROWID int, message_id, document_id, in_reply_to, remote_id int, sender int…); Data Storage consistency required transacFonal backends Concurrency Model: transacFonal operaFons
  4. ApplicaFons in the MulFcore Age 4 Data Analysis and Processing

    performance sensiFve Concurrency Model: data-parallel queries, map/reduce, fork/join, …
  5. And, This is Real! hUp://stefan-marr.de/ 2014/07/why-is-concurrent- programming-hard/ 5 Tasharofi, S.;

    Dinges, P. & Johnson, R. E. Why Do Scala Developers Mix the Actor Model with other Concurrency Models? ECOOP 2013. Apple Mail
  6. How to provide tooling for all of them? 6

  7. Research Challenges •  Debugger for MulFple Concurrency Models •  Minimizing

    Interference 7 How to Abstract from Concurrency Models?
  8. A DEBUGGER FOR SUCH APPLICATIONS SupporFng a Wide Range of

    Concurrency Models. 8
  9. Subsystems as CommunicaFng Event Loops 9 Actor A Actor B

    Actor Principle
  10. Subsystems as CommunicaFng Event Loops 10 Actor A Actor B

    In Theory: One Message at a Time
  11. Subsystems as CommunicaFng Event Loops 11 Actor A Actor B

    Actors Contain Objects
  12. Subsystems as CommunicaFng Event Loops 12 Actor A Actor B

    Which message cause which changes?
  13. Subsystems as CommunicaFng Event Loops 13 Actor A Actor B

    caused? caused?
  14. Subsystem uses TransacFons 14 Actor A Subsystem B

  15. Subsystem uses TransacFons 15 Subsystem B

  16. Subsystem uses TransacFons 16 Subsystem B

  17. Subsystem uses TransacFons Subsystem B Thread A Thread B

  18. Subsystem uses TransacFons Subsystem B Thread A Thread B Thread

    A
  19. Subsystem uses TransacFons Subsystem B Thread A Thread B Thread

    A Thread B How did transacFons interact?
  20. Requirements •  High-level representaFon of concepts •  Move between abstracFon

    levels •  Enable – Observe AcFons (History) – Understand Dependencies – Interact and Explore 20
  21. MINIMIZING INTERFERENCE Research Challenge 21

  22. Shared Resource in Message-based System 22 Synchro nizer Shared “Mutable”

    Resource Added later, forgot about synchronizer
  23. Shared Resource in Message-based System 23 Synchro nizer Shared “Mutable”

    Resource 75% probability 25% probability
  24. AUaching Debugger 24 Synchro nizer Shared “Mutable” Resource Debugger

  25. With Debugger 25 Synchro nizer Shared “Mutable” Resource Debugger 99%

    probability 1% probability
  26. Tradeoff: Precision vs. Interference •  How to minimize recorded data?

    – Maximize re-synthesized informaFon – ParFal re-execuFon? •  Independent of the concurrency model? 26
  27. HOW TO ABSTRACT FROM CONCURRENCY MODELS? Research Challenge 27

  28. What are common properFes for debugging? 28

  29. Causality: Control & Data Dependencies 29 Details different for each

    Concurrency Model
  30. Scheduling Dependencies 30 Async message sends, rendevous semanFcs, blocking semanFcs,

    ...
  31. Challenge: Support Wide Range of Concepts ConflicFng Goals – ImplementaFon Level:

    Use common abstracFons – Tool Level: Show expected semanFcs 31 EnFty Event causes influences * *
  32. SOMns: A Smalltalk with Actors 32 • • JavaScript, Node.js

    5.4.0 JavaScript, GraalJS Ruby, JRuby+Truffle SOMns, Newspeak Java, 1.8.0_66 1 2 3 4 5 6 7 8 9 10 11 12 Runtime Factor, normalized to Java 1.8.0_66 (lower is better) Dynamic Language Research Planorm Faster than V8
  33. Actor Performance On Par with JVM Frameworks 33 Chameneos ConcurrentSorted

    LinkedList Counting ForkJoinThroughput PingPong RadixSort ThreadRing Geo Mean 0 1 2 3 4 5 6 7 8 Runtime factor over Scalaz lower is better Akka Jetlang SOMns Scalaz
  34. Research Goals •  Debugger for MulFple Concurrency Models •  Minimizing

    Interference 34 How to Abstract from Concurrency Models?