]> Cypherpunks.ru repositories - nncp.git/blob - doc/bundles.texi
7bbc85a274d7480156383c87f18c5546475d9f07
[nncp.git] / doc / bundles.texi
1 @node Bundles
2 @unnumbered Bundles
3
4 Usual @ref{nncp-xfer} command requires filesystem it can operate on.
5 That presumes random access media storage usage, like hard drives, USB
6 flash drives and similar. But media like CD-ROM and especially tape
7 drives are sequential by nature. You can prepare intermediate directory
8 for recording to CD-ROM disc/tape, but that requires additional storage
9 and is inconvenient.
10
11 Bundles, created with @ref{nncp-bundle} command are convenient
12 alternative to ordinary @command{nncp-xfer}. Bundle is just a collection
13 of @ref{Encrypted, encrypted packets}, stream of packets. It could be
14 sequentially streamed for recording and digested back.
15
16 @itemize
17
18 @item They do not require intermediate storage before recording on
19 either CD-ROM or tape drive.
20 @example
21 $ nncp-bundle -tx SOMENODE | cdrecord -tao -         # record directly to CD
22 $ nncp-bundle -tx SOMENODE | dd of=/dev/sa0 bs=10240 # record directly to tape
23
24 $ dd if=/dev/cd0 bs=2048 | nncp-bundle -rx  # read directly from CD
25 $ dd if=/dev/sa0 bs=10240 | nncp-bundle -rx # read directly from tape
26 @end example
27
28 @item They do not require filesystem existence to deal with, simplifying
29 administration when operating in heterogeneous systems with varying
30 filesystems. No @command{mount}/@command{umount}, @command{zpool
31 import}/@command{zpool export} and struggling with file permissions.
32 @example
33 $ nncp-bundle -tx SOMENODE | dd of=/dev/da0 bs=1M # record directly to
34                                                   # hard/flash drive
35 $ dd if=/dev/da0 bs=1M | nncp-bundle -rx # read directly from drive
36 @end example
37
38 @item This is the fastest way to record outbound packets for offline
39 transmission -- sequential write is always faster, when no
40 metainformation needs to be updated.
41
42 @item This is convenient to use with append-only storages, just
43 sending/appending new bundles.
44
45 @item Bundles could be repeatedly broadcasted in one-way transmission.
46 @ref{Sync, Sync protocol} requires interactive connection, but bundles
47 can contain mix of various recipients.
48
49 @end itemize
50
51 Technically bundle is valid POSIX.1-2001
52 @url{https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_01, pax archive}
53 with directory/files hierarchy identical to that is used in
54 @ref{nncp-xfer}: @file{NNCP/RECIPIENT/SENDER/PACKET}. So bundle can also
55 be created by manual tar-ing of @command{nncp-xfer} resulting directory.