2. The Erlang I/O Protocol
2 The Erlang I/O Protocol
The I/O protocol in Erlang enables bi-directional communication between clients and servers.
-
The I/O server is a process that handles the requests and performs the requested task on, for example, an I/O device.
-
The client is any Erlang process wishing to read or write data from/to the I/O device.
The common I/O protocol has been present in OTP since the beginning, but has been undocumented and has also evolved over the years. In an addendum to Robert Virding's rationale, the original I/O protocol is described. This section describes the current I/O protocol.
The original I/O protocol was simple and flexible. Demands for memory efficiency and execution time efficiency have triggered extensions to the protocol over the years, making the protocol larger and somewhat less easy to implement than the original. It can certainly be argued that the current protocol is too complex, b