|
NAP |
Networked Associative Pipes Rocketcalc, LLC (Kent, Ohio, USA) Nap's a pipe. |
Quick installation instructions
DescriptionNap provides a simple networked associative pipe framework. Input and output data streams are associated with names (character arrays). Nap relays an output data stream to the first available input data stream with a matching name. Each named pipe operates in the traditional first-in, first out order. Unlike traditional byte-oriented Unix pipes, nap associations are message-oriented.Data streams are relayed from output side to input side over TCP/IP. The nap server authenticates transactions with OpenSSL digital signatures (if available). Several command-line programs are provided to emulate standard pipe operation:
- nap Start a nap server.
- nout Attach a named output stream: blocks until a matching
input stream is available
- nin Attach a named input stream: blocks until a matching
output stream is available
- nbout Non-blocking variant of nout for small transfers
- nap_exit Tell the nap server to quit
- nap_dump Show all named streams in the nap server
See the manual pages for more detailed information on each command and
their options.
Nap is quite similar to named pipes for Microsoft Windows [1], and shares a similar syntax with the NetWorkSpaces[4] associative shared memory system. Although nap data streams are not bound to specific sending and receiving processes (like NetworkSpaces), nap data is relayed directly from sender to receiver requiring that both processes run concurrently (unlike NetworkSpaces). Nap is conceptually a pipe. Many non-associative networked pipe utilities exist: see, for example, netpipes(2) written by Robert Forsman at the University of Florida and netcat(3). SSH and OpenSSH provide encrypted non-associative networked pipes(5). Nap is intentionally simple in design and operation. Our chief goal is intuitive operation. Despite its simplicity, nap can be used to quickly deploy sophisticated multiprocess applications. Example
$ nap # (start a nap server running)
$ echo "Hello there" | nbout message # (nbout will not block)
$ nin message # (connect stdin to a pipe named “message”)
Hello there
A more comprehensive example illustrating parallel programming with the
shell can be found in:
nap-bash.html.
References
| |