interaction protocols
play

Interaction Protocols Martin Thompson - @mjpt777 Code How - PowerPoint PPT Presentation

Interaction Protocols Martin Thompson - @mjpt777 Code How significant are protocols to software development? protocol noun \ pr -t - k l \ Source: http://www.merriam-webster.com/ protocol noun \ pr -t - k l \ : a


  1. Interaction Protocols Martin Thompson - @mjpt777

  2. Code

  3. How significant are protocols to software development?

  4. protocol noun \ ˈ prō -t ə - ˌ k ȯ l \ Source: http://www.merriam-webster.com/

  5. protocol noun \ ˈ prō -t ə - ˌ k ȯ l \ : a code prescribing strict adherence to correct etiquette and precedence Source: http://www.merriam-webster.com/

  6. protocol noun \ ˈ prō -t ə - ˌ k ȯ l \ : a code prescribing strict adherence to correct etiquette and precedence : a set of conventions governing the treatment and formatting of data in an electronic communications system Source: http://www.merriam-webster.com/

  7. Evolutionary Biology

  8. Facial Expressions

  9. Manners & Etiquette

  10. Evolution of Communities Hygiene Disease <=>

  11. Evolution of Communities Hygiene Disease <=> Courtesy Society <=>

  12. Evolution of Communities Hygiene Disease <=> Courtesy Society <=> Norms Trust <=>

  13. Formal Protocols

  14. Rules of Engagement

  15. Rules of Engagement “What is acceptable”

  16. Rules of Engagement “What is acceptable” “Good conditions to succeed”

  17. Rules of Engagement “What is acceptable” “Good conditions to succeed” “ Jus ad bellum, Jus ad bello ”

  18. Concurrent & Distributed Systems

  19. How should components Interact?

  20. IETF (Internet Engineering Task Force)

  21. 418 “I'm a teapot”

  22. How should we document our protocols?

  23. API vs Protocol

  24. Open, *[Read | Write], Close

  25. Open, *[Read | Write], Close 1. Open: ... 2. Read: ... 3. Write: ... 4. Close: ...

  26. “What could possibly go wrong?”

  27. Multicast Example

  28. ACK / NAK Implosion

  29. Where should we focus?

  30. Many Aspects to Consider • Layering • Feedback • Versioning • Sequencing • Encoding • Batching • Addressing • Sync/Async • Error Handling • Validation • Flow Control • Trust • Congestion Control • Privacy

  31. Who cares about waste?

  32. Encoding Don’t use text codecs! Please use binary codecs

  33. Encoding “…but it’s human readable…”

  34. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-------------------------------------------------------------+ |R| Frame Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------------------------+ | Version |B|E| Flags | Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------------------------+ |R| Term Offset | +-+-------------------------------------------------------------+ | Session ID | +---------------------------------------------------------------+ | Stream ID | +---------------------------------------------------------------+ | Term ID | +---------------------------------------------------------------+ | Encoded Message ... ... | +---------------------------------------------------------------+

  35. Encoding SBE, Flat Buffers, Cap’n’Proto , ASN.1, etc.

  36. Versioning

  37. Versioning Protocols: What conversation? •

  38. Versioning Protocols: What conversation? • Messages: What encoding? •

  39. Versioning Protocols: What conversation? • Messages: What encoding? • State: What instance? •

  40. MPMC Queue http://www.1024cores.net/

  41. Sync vs Async

  42. Synchronous

  43. Synchronous

  44. Synchronous

  45. Synchronous

  46. Synchronous

  47. Synchronous

  48. Synchronous

  49. Synchronous

  50. Synchronous

  51. Synchronous

  52. Synchronous

  53. Synchronous

  54. Synchronous What’s Happening?

  55. Asynchronous

  56. Asynchronous

  57. Asynchronous

  58. Asynchronous

  59. Asynchronous

  60. Asynchronous

  61. Asynchronous

  62. Asynchronous

  63. Asynchronous

  64. Asynchronous

  65. Asynchronous

  66. Asynchronous

  67. Asynchronous

  68. Asynchronous

  69. Asynchronous What’s Happening?

  70. “…but, but, synchronous is so much easier...”

  71. Synchronous => Blocking

  72. ...it’s about managing state via feedback

  73. When designing an API, wrap Async with Sync if you must 

  74. RPC / HTTP / TCP

  75. TCP → TCP Fast Open → QUIC HTTP/1.1 → SPDY → HTTP/2 TLS 1.2 → TLS 1.3

  76. 0-RTT and replay attacks

  77. Batching

  78. Etiquette of a request

  79. 100 GigE ?

  80. Future of Syscalls sndmmsg, rcvmmsg() Onload, VMA DPDK, ef_vi

  81. Snake Oil Protocols

  82. 2PC / XA

  83. “Two -Phase Commit is not fault tolerant because it uses a single coordinator whose failure can cause the protocol to block”

  84. Guaranteed Delivery™

  85. Applications should have feedback & recovery protocols

  86. Protocol Layering “What can we depend on?”

  87. Wrapping up…

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