OSI Model

source: https://www.cloudflare.com/learning/ddos/glossary/open-systems-interconnection-model-osi/

Opinion (Nathan)

OSI was over-eagerly conceived in a desire to have everything make sense and fit into a clean abstraction — anything higher than ~L3, arguably, doesn’t have an a priori reason for being uniquely specified where it is. Many of the layers overlap conceptually (is I2C a PHY or link layer? seemingly both), and L5 and L6 don’t meaningfully exist. OSI is good to understand because it’s a common touchpoint, but not terribly useful as a design model.

Relevant reading/commentary: End-to-end arguments in systems design (CSAIL, 1981) — seminal paper discussing tradeoffs of vertical integration or lack thereof in networks. Remarks that endpoint applications are best responsible for providing their own guarantees in any nontrivial network, rather than trying to distribute and enforce that responsibility in all intermediate nodes (the whole network would have to be made aware of all application requirements for each application with different needs, and couldn’t therefore be meaningfully treated as a platform).

In short: intentionally create opaque abstraction boundaries to avoid re-solving the same problems at multiple layers in the stack. Vertical integration can give you more performance when you really need it, but in almost all cases, you don’t. The cost of a nonconformant system reckoned against abstraction capability is astronomical.

Networks for Machines

EtherCAT

EtherCAT is a variation of the Ethernet protocols specialized for real-time industrial control. It is great for applications that require fast update times and low jitter.

The most interesting thing about EtherCAT is that frames (or telegrams) are not fully received before they are forwarded. Each node only reads the section of the frame addressed to it, and may alter the data there, but the other sections are forwarded along. In this way an EtherCAT telegram is like a train that never stops moving; each node can read or write data to its car as it passes through.

Modbus

  • reference
  • standard communication protocol for many industrial devices
  • it revolves around reading and writing data at specific addresses
    • essentially emulating special purpose registers
  • register addresses are sorted into four blocks
    • 0: coils (digital or discrete outputs) (boolean)
    • 1: discrete inputs (boolean)
    • 3: input registers (unsigned)
    • 4: holding registers (or output registers) (unsigned)
  • there are inconsistent and confusing standards about how to write addresses
    • the recommendation is to use 1-based indexing in some contexts, and 0-based indexing in others (!)
    • blocks are often added as a prefix, but you have to know the address range of your system to interpret it (!)
      • 4,001 might refer to block 4 register 1, or block 0 register 4,001
      • …or because of the indexing issue, register 0
    • also you may have noticed that the prefix numbers skip 2 (!)

Misc