home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / cnews.tar / doc / ihave < prev    next >
Text File  |  1992-07-23  |  7KB  |  339 lines

  1. .Ch "Setting Up Netnews Feeds Using the Ihave/sendme Protocol"
  2. .Ix ihave/sendme
  3. .SH
  4. Introduction
  5. .PP
  6. The ihave/sendme protocol is a means of conserving network bandwidth
  7. at the expense of some real-time delays in getting netnews.
  8. It pre-dates the NetNews Transfer Protocol (NNTP)
  9. for the TCP/IP protocol stack by several years and attempts much
  10. the same optimisation,
  11. but ihave/sendme is batched,
  12. unlike NNTP.
  13. .PP
  14. The above perhaps needs emphasizing:
  15. \fIihave/sendme has nothing whatsoever to do with NNTP\fR.
  16. NNTP has ``ihave'' and ``sendme'' messages, which have somewhat similar
  17. functions to the ihave/sendme protocol (hence the similarity of names),
  18. but the implementations are completely unrelated.
  19. If you want to set up an NNTP feed, you are reading the wrong document.
  20. .PP
  21. Ihave/sendme
  22. is sketched in extremely vague terms in
  23. ARPA Internet RFC 1036 (nee 850),
  24. .Ix "RFC 1036"
  25. but the description therein is so lofty as
  26. to be useless as a protocol specification.
  27. .SH
  28. Into the Breach
  29. .PP
  30. The basic ihave/sendme strategy is for a site which has just received a new
  31. netnews article to send an
  32. .I ihave
  33. .Ix "control messages" ihave
  34. .Ix "control messages" sendme
  35. .Ix Message-IDs
  36. netnews control message
  37. containing the Message-ID of the new article to each
  38. of its ihave/sendme
  39. neighbours;
  40. the neighbour consults its netnews
  41. .I history
  42. file and if it has not seen the article,
  43. sends back a
  44. .I sendme
  45. control message containing the original Message-ID;
  46. upon receipt of the
  47. .I sendme ,
  48. the first site will transmit the article via normal channels
  49. to the requesting neighbour.
  50. If you are getting exactly one news feed,
  51. ihave/sendme is of no benefit and merely slows down the reception
  52. of news.
  53. If you are getting multiple feeds,
  54. the added delay may not be worth the reduction in volume of
  55. news transferred
  56. (though sites being fed by long-distance telephone may disagree).
  57. In general,
  58. ihave/sendme should be a last resort,
  59. if only because it is more complicated to understand and set up
  60. than an ordinary news feed.
  61. .PP
  62. Due to the high volume of netnews,
  63. sending individual articles is always a performance disaster
  64. .Ix "performance disaster" NNTP
  65. .Ix NNTP "performance disaster"
  66. (see B News,
  67. NNTP and unbatched ihave/sendme),
  68. so the golden rule of netnews is
  69. ``Thou shalt batch thine articles.''.
  70. This makes the above sketch a little slower and more complicated:
  71. now individual articles are not sent,
  72. but batches of
  73. .I ihave ,
  74. .I sendme ,
  75. and
  76. netnews messages are transmitted,
  77. incurring further delay since netnews batchers are usually
  78. run only once per hour,
  79. say.
  80. .PP
  81. We will now walk through an example ihave/sendme set up between
  82. two C news sites
  83. (\c
  84. .I utzoo
  85. and
  86. .I utstat ),
  87. with reference to the following
  88. .I sys
  89. .Ix sys
  90. .Ix files sys
  91. file fragments and flow diagram.
  92. Most of the work is done by specialised batch preparers.
  93. .I relaynews
  94. merely responds to
  95. .I "ihave site"
  96. or
  97. .I "sendme site"
  98. control messages
  99. by writing the name of the file containing the control message
  100. onto
  101. site\c
  102. .B .ihave/togo
  103. or
  104. site\c
  105. .B .sendme/togo ,
  106. respectively.
  107. This scheme is mostly due to
  108. Root Boy Jim of UUNET.
  109. .Ix "Root Boy Jim"
  110. .br
  111. .ne 1i
  112. .SH
  113. utzoo's sys file
  114. .LP
  115. .DS L
  116. .ft B
  117. # Send ihave telling utstat what we have -- batcher turns the batch into a
  118. # giant control message and posts it to "to.utstat".  (#1)
  119. utstat.wehave/utstat:rec.music.synth,!to/all:I:
  120. # actual transmission of control messages, via normal means (#2)
  121. utstat:to.utstat/all:f:
  122. .ft
  123. .DE
  124. .br
  125. .ne 1i
  126. .SH
  127. utstat's sys file
  128. .LP
  129. .DS L
  130. .ft B
  131. # Send ihave telling utzoo what we have -- batcher turns the batch into a
  132. # giant control message and posts it to "to.utzoo".  (#1)
  133. utzoo.wehave/utzoo:rec.music.synth,!to/all:I:
  134. # actual transmission of control messages, via normal means (#2)
  135. utzoo:to.utzoo/all:f:
  136. .ft
  137. .DE
  138. .ne 1i
  139. .SH
  140. utzoo's batchparms file
  141. .TS L
  142. l s s s s s
  143. l l l l l l .
  144. .ft B
  145. # sample ihave/sendme setup
  146. # site    size    queue    builder    muncher    sender
  147. # ----    ----    -----    -------    -------    ------
  148. utstat.wehave    40000    20    batchih    nocomp    viainews
  149. utstat.ihave    40000    20    batchsm    nocomp    viainews
  150. utstat.sendme    40000    20    batchra    nocomp    vianowhere
  151. .TE
  152. .ne 6i
  153. .so ihave.pic
  154. .SH
  155. An Example
  156. .SH
  157. An article arrives on utzoo
  158. .PP
  159. A new article arrives on
  160. .I utzoo
  161. in newsgroup
  162. .I rec.music.synth
  163. and is matched by the first
  164. .I sys
  165. file line
  166. .B "on utzoo" ,
  167. which writes the Message-ID of the article
  168. onto a batch file
  169. (\c
  170. .I $NEWSARTS/out.going/utstat.wehave/togo ).
  171. There are some subtleties here:
  172. it is essential to add
  173. .B ,!to
  174. to the subscription list
  175. if that list contains
  176. .B all
  177. or
  178. .B to
  179. to prevent looping messages;
  180. and
  181. it is always worthwhile to prevent leaking local
  182. newsgroups out one's full feeds,
  183. so if the subscription list contained
  184. .B all
  185. one would want to add something like
  186. .B ,!general
  187. or
  188. .B ,!utstat .
  189. Eventually,
  190. the batcher runs on the batch file.
  191. .PP
  192. The
  193. .I batchih
  194. batcher on
  195. .I utzoo
  196. prepares
  197. a batch of Message-IDs as an
  198. .I ihave
  199. control message to
  200. .I utstat
  201. and submits it to
  202. .I "inews \-h" 
  203. which matches
  204. .I sys
  205. line #2,
  206. and
  207. writes the file name of the
  208. article file containing the
  209. control message
  210. on the usual
  211. .I utstat
  212. batch file
  213. (\c
  214. .I $NEWSARTS/out.going/utstat/togo ).
  215. .PP
  216. Eventually,
  217. the normal batcher will run on
  218. .I utzoo
  219. on the usual
  220. .I utstat
  221. batch file
  222. and will produce batches,
  223. including the
  224. .I ihave
  225. control message,
  226. and transmit them to
  227. .I utstat
  228. by means specified in
  229. .I $NEWSCTL/batchparms .
  230. .SH
  231. The resulting ihave message arrives on utstat
  232. .PP
  233. When the
  234. .I ihave
  235. control message arrives on
  236. .I utstat ,
  237. .I relaynews
  238. .Ix relaynews
  239. will write the name of the file containing the control message
  240. on the
  241. .I utzoo
  242. .I ihave
  243. batch file
  244. (\c
  245. .I $NEWSARTS/out.going/utzoo.ihave/togo ).
  246. .PP
  247. Eventually,
  248. the
  249. .I batchsm
  250. batcher will run on
  251. .I utstat
  252. on that batch file,
  253. which will produce a
  254. .I sendme
  255. control message
  256. and submit it to
  257. .I "inews \-h"
  258. which matches
  259. .I sys
  260. line #2,
  261. and writes the name of the
  262. .I sendme
  263. control message on
  264. the usual
  265. .I utzoo
  266. batch file
  267. (\c
  268. .I $NEWSARTS/out.going/utzoo/togo)
  269. .PP
  270. Eventually,
  271. the normal batcher will run on
  272. .I utstat
  273. on the usual
  274. .I utzoo
  275. batch file,
  276. and will produce batches including
  277. the
  278. .I sendme
  279. and send them to
  280. .I utzoo
  281. by means specified in
  282. .I $NEWSCTL/batchparms .
  283. .Ix batchparms
  284. .Ix files batchparms
  285. .SH
  286. The resulting sendme message arrives on utzoo
  287. .PP
  288. When the
  289. .I sendme
  290. control message arrives on
  291. .I utzoo ,
  292. .I relaynews
  293. writes the name of the file containing the control message
  294. on the
  295. .I sendme
  296. batch file,
  297. and the
  298. .I batchra
  299. batcher eventually
  300. writes the file names of the requested articles
  301. (named by Message-ID in
  302. the
  303. .I sendme
  304. control message)
  305. on the usual
  306. .I utstat
  307. batch file.
  308. .PP
  309. Eventually,
  310. the normal batcher on
  311. .I utzoo
  312. will run and produce batches,
  313. including the articles requested by the
  314. .I sendme ,
  315. and will send them to
  316. .I utstat
  317. by means specified in
  318. .I $NEWSCTL/batchparms .
  319. .SH
  320. Comparison with B News
  321. .Ix ihave/sendme "B News"
  322. .PP
  323. There is a lot of activity involved in ihave/sendme,
  324. and there are at least five distinct channels
  325. and three transactions needed to send a batch of articles.
  326. B news ``simplifies'' the
  327. .I sys
  328. file by requiring certain
  329. .I sys
  330. file options (sic)
  331. to be set to fixed values,
  332. and
  333. by overloading madly.
  334. The resulting
  335. .I sys
  336. file is much more difficult to decypher,
  337. and if you should want to specify non-default options,
  338. you are out of luck.
  339.