the network as a language construct
play

The Network as a Language Construct Tony Garnock-Jones Sam - PowerPoint PPT Presentation

ESOP 2014, Grenoble, France; 20140410 The Network as a Language Construct Tony Garnock-Jones Sam Tobin-Hochstadt Matthias Felleisen Actor Programming Languages Erlang/OTP, Scala/Akka, ... ? ? ? Actor Programming Languages Erlang/OTP,


  1. ESOP 2014, Grenoble, France; 20140410 The Network as a Language Construct Tony Garnock-Jones Sam Tobin-Hochstadt Matthias Felleisen

  2. Actor Programming Languages Erlang/OTP, Scala/Akka, ...

  3. ? ? ? Actor Programming Languages Erlang/OTP, Scala/Akka, ...

  4. Routing Hierarchical Events Layering Publish/Subscribe for Actors Actor Programming Languages Erlang/OTP, Scala/Akka, ...

  5. This Talk See Paper Routing Hierarchical Events Layering Network Calculus Publish/Subscribe for Actors Actor Actor Programming Languages Calculus Erlang/OTP, Scala/Akka, ...

  6. PART I: The Problem

  7. Functional I/O Scaling up big-bang from domain-speci fi c to general functional I/O

  8. Functional I/O Scaling up big-bang from domain-speci fi c to general functional I/O Apps in a functional I/O style: • echo server • multi-user chat • DNS server • SSH server

  9. Functional I/O Distributed Systems Scaling up big-bang from Implementing RabbitMQ domain-speci fi c to general and using it to build functional I/O distributed systems Apps in a functional I/O style: • echo server • multi-user chat • DNS server • SSH server

  10. Functional I/O Distributed Systems Scaling up big-bang from Implementing RabbitMQ domain-speci fi c to general and using it to build functional I/O distributed systems Apps in a functional I/O style: Investigated other paradigms: • echo server • OO languages • multi-user chat • Network architecture • DNS server • CORBA services • SSH server • Erlang applications

  11. Ubiquitous Patterns and Problems Event broadcasting Naming service Service discovery Startup ordering Crash/exit signalling Conversation management

  12. Ubiquitous Patterns and Problems Event broadcasting Naming service Service discovery Uniform Linguistic Solution Startup ordering Crash/exit signalling Conversation management

  13. Recipe for Actor Languages Base language actor "Network"

  14. Consumers fi lter by subsystem, severity

  15. Logging: Requirements Scorecard Route log entries from producers to consumers Consumers fi lter log messages Decouple producers from consumers Avoid shared-state explosion Discovery of logging service Only produce if someone's listening Alert when a producer crashes/exits Uniform treatment of I/O

  16. PART II: Why Publish/Subscribe? How?

  17. Logging: Requirements Scorecard Route log entries from producers to consumers ✔ "Router" actor Consumers fi lter log messages ✔ "Router" actor Decouple producers from consumers ✔ "Router" actor Avoid shared-state explosion ✔ "Router" actor Discovery of logging service Only produce if someone's listening Alert when a producer crashes/exits Uniform treatment of I/O

  18. See Eugster's 2003 pub/sub survey

  19. Route by address Messages

  20. Route by address Route by content Messages Patterns Interests

  21. Route by address Route by content or or or

  22. Logging: Requirements Scorecard Route log entries from producers to consumers ✔ pub/sub Consumers fi lter log messages ✔ pub/sub Decouple producers from consumers ✔ pub/sub Avoid shared-state explosion ✔ pub/sub Discovery of logging service no need! Only produce if someone's listening Alert when a producer crashes/exits Uniform treatment of I/O ✔ pub/sub

  23. PART III: Why Routing Events? How?

  24. Logging: Requirements Scorecard Route log entries from producers to consumers ✔ Consumers fi lter log messages ✔ Decouple producers from consumers ✔ Avoid shared-state explosion ✔ Discovery of logging service Only produce if someone's listening Alert when a producer crashes/exits Uniform treatment of I/O ✔

  25. Shared Conversational Interest

  26. Shared Conversational Interest

  27. Shared Conversational Interest

  28. Shared Conversational Interest

  29. Shared Conversational Interest Any pattern language will do — if it supports ∩

  30. What is a Routing Event?

  31. What is a Routing Event? From Actor to Network

  32. What is a Routing Event? From Actor to Network

  33. What is a Routing Event? causes From Actor to Network From Network to Actor

  34. Routing Events for Service Discovery

  35. Routing Events for Service Discovery

  36. Routing Events for Service Discovery

  37. Routing Events for Service Discovery

  38. Routing Events for Service Discovery

  39. Routing Events for Service Discovery

  40. Routing Events for Service Discovery

  41. Routing Events for Service Discovery

  42. Routing Events for Service Discovery

  43. Routing Events for Presence Detection

  44. Routing Events for Presence Detection

  45. Routing Events for Presence Detection

  46. Routing Events for Presence Detection

  47. Routing Events for Presence Detection

  48. Routing Events for Presence Detection

  49. Routing Events for Presence Detection

  50. Routing Events for Presence Detection

  51. Routing Events for Presence Detection

  52. Routing Events for Presence Detection

  53. Routing Events for Crash Detection cf. Erlang's links/monitors [Armstrong 2003]

  54. Routing Events for Crash Detection cf. Erlang's links/monitors [Armstrong 2003]

  55. Routing Events for Crash Detection cf. Erlang's links/monitors [Armstrong 2003]

  56. Routing Events for Crash Detection ! cf. Erlang's links/monitors [Armstrong 2003]

  57. Routing Events for Crash Detection ! cf. Erlang's links/monitors [Armstrong 2003]

  58. Routing Events for Crash Detection ! cf. Erlang's links/monitors [Armstrong 2003]

  59. pager Routing Events for Crash Detection ! cf. Erlang's links/monitors [Armstrong 2003]

  60. Logging: Requirements Scorecard Route log entries from producers to consumers ✔ pub/sub Consumers fi lter log messages ✔ pub/sub Decouple producers from consumers ✔ pub/sub Avoid shared-state explosion ✔ pub/sub Discovery of logging service ✔ routing events Only produce if someone's listening ✔ routing events Alert when a producer crashes/exits ✔ routing events Uniform treatment of I/O ✔ pub/sub

  61. Logging: Requirements Scorecard Route log entries from producers to consumers ✔ pub/sub Consumers fi lter log messages ✔ pub/sub Decouple producers from consumers ✔ pub/sub Avoid shared-state explosion ✔ pub/sub Discovery of logging service ✔ routing events Only produce if someone's listening ✔ routing events Alert when a producer crashes/exits ✔ routing events Uniform treatment of I/O not fi nished!

  62. PART IV: Why Hierarchical Layering? How?

  63. Logging: Requirements Scorecard Route log entries from producers to consumers ✔ Consumers fi lter log messages ✔ Decouple producers from consumers ✔ Avoid shared-state explosion ✔ Discovery of logging service ✔ Only produce if someone's listening ✔ Alert when a producer crashes/exits ✔ Uniform treatment of I/O not fi nished!

  64. Layers make I/O Uniform pager ! c i g a m Logging

  65. Layers make I/O Uniform pager ! c i g a m Logging Logging pager ordinary actions Pager communication

  66. Layers make I/O Uniform pager ! c i g a m Logging Logging pager ordinary actions Pager communication

  67. Layers Scope Conversations

  68. Layers Scope Conversations

  69. Layers Scope Conversations

  70. Layers Compose ... ...

  71. Layers Compose ... ...

  72. Layers Compose ... ...

  73. One Layer = One Protocol ... ... ... ...

  74. TCP header One Layer = One Protocol Encrypted payload SSH command ... App message ... ... ...

  75. UDP header One Layer = One Protocol DNS header Question Answer Answer ... ... ...

  76. UDP header One Layer = One Protocol DNS header Question Answer Answer ... Snoops via pub/sub to populate cache! ... ...

  77. ...

  78. ...

  79. Logging: Requirements Scorecard Route log entries from producers to consumers ✔ pub/sub Consumers fi lter log messages ✔ pub/sub Decouple producers from consumers ✔ pub/sub Avoid shared-state explosion ✔ pub/sub Discovery of logging service ✔ routing events Only produce if someone's listening ✔ routing events Alert when a producer crashes/exits ✔ routing events Uniform treatment of I/O ✔ layering

  80. Logging: Requirements Scorecard Route log entries from producers to consumers ✔ pub/sub Consumers fi lter log messages ✔ pub/sub Decouple producers from consumers ✔ pub/sub Avoid shared-state explosion ✔ pub/sub Discovery of logging service ✔ routing events Only produce if someone's listening ✔ routing events Alert when a producer crashes/exits ✔ routing events Uniform treatment of I/O ✔ layering + great additional bene fi ts from layering ✔

  81. PART V: Conclusions

  82. Marketplace Minimart JS-Marketplace Typed Racket Racket Javascript

Recommend


More recommend