My preliminary thinking on NetWoF was that the input and output pipe buffers could be configured to be very large, and then trusted to accommodate all data put into them. (Hey, DOS’s faux pipes worked that way!)

No such luck. Windows allows its pipes to be dynamically sized, but Linux seems to have a rigid 4K pipe buffer size.

Windows provides a way to check pipe fullness from the read end of an anonymous pipe, but not from the write end. *nix apparently provides a way to detect writable-ness of the pipe, but not the amount of empty space. The read and write operations block reading an empty pipe or writing a full pipe, so I need some mechanism to avoid those happening. A simple protocol will be involved here, with each end of the pipe pair (parent and child) signalling an empty inbound pipe via the outbound pipe. Each end of the pipe pair can write pipe-size worth of data, then wait for a pipe-empty signal before writing more.

Pipe latency is an issue with this design approach. Pitchers Duel’s networking (the itch I scratch), is very latency-tolerant, so I doubt this will be a problem for me, but it might be for some applications. When it is done, someone can measure the latency, so we have a factual basis for the choice.

Advertisements