home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / CNEWS / _CNEWS.TAR / usr / doc / cnews / docs / ihave < prev    next >
Encoding:
Text File  |  1994-09-02  |  7.1 KB  |  338 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 owes some ideas to Root Boy Jim of UUNET.
  108. .Ix "Root Boy Jim"
  109. .br
  110. .ne 1i
  111. .SH
  112. utzoo's sys file
  113. .LP
  114. .DS L
  115. .ft B
  116. # Send ihave telling utstat what we have -- batcher turns the batch into a
  117. # giant control message and posts it to "to.utstat".  (#1)
  118. utstat.wehave/utstat:rec.music.synth,!to/all:I:
  119. # actual transmission of control messages, via normal means (#2)
  120. utstat:to.utstat/all:f:
  121. .ft
  122. .DE
  123. .br
  124. .ne 1i
  125. .SH
  126. utstat's sys file
  127. .LP
  128. .DS L
  129. .ft B
  130. # Send ihave telling utzoo what we have -- batcher turns the batch into a
  131. # giant control message and posts it to "to.utzoo".  (#1)
  132. utzoo.wehave/utzoo:rec.music.synth,!to/all:I:
  133. # actual transmission of control messages, via normal means (#2)
  134. utzoo:to.utzoo/all:f:
  135. .ft
  136. .DE
  137. .ne 1i
  138. .SH
  139. utzoo's batchparms file
  140. .TS L
  141. l s s s s s
  142. l l l l l l .
  143. .ft B
  144. # sample ihave/sendme setup
  145. # site    size    queue    builder    muncher    sender
  146. # ----    ----    -----    -------    -------    ------
  147. utstat.wehave    40000    20    batchih    nocomp    viainews
  148. utstat.ihave    40000    20    batchsm    nocomp    viainews
  149. utstat.sendme    40000    20    batchra    nocomp    vianowhere
  150. .TE
  151. .ne 6i
  152. .so ihave.pic
  153. .SH
  154. An Example
  155. .SH
  156. An article arrives on utzoo
  157. .PP
  158. A new article arrives on
  159. .I utzoo
  160. in newsgroup
  161. .I rec.music.synth
  162. and is matched by the first
  163. .I sys
  164. file line
  165. .B "on utzoo" ,
  166. which writes the Message-ID of the article
  167. onto a batch file
  168. (\c
  169. .I $NEWSARTS/out.going/utstat.wehave/togo ).
  170. There are some subtleties here:
  171. it is essential to add
  172. .B ,!to
  173. to the subscription list
  174. if that list contains
  175. .B all
  176. or
  177. .B to
  178. to prevent looping messages;
  179. and
  180. it is always worthwhile to prevent leaking local
  181. newsgroups out one's full feeds,
  182. so if the subscription list contained
  183. .B all
  184. one would want to add something like
  185. .B ,!general
  186. or
  187. .B ,!utstat .
  188. Eventually,
  189. the batcher runs on the batch file.
  190. .PP
  191. The
  192. .I batchih
  193. batcher on
  194. .I utzoo
  195. prepares
  196. a batch of Message-IDs as an
  197. .I ihave
  198. control message to
  199. .I utstat
  200. and submits it to
  201. .I "inews \-h" 
  202. which matches
  203. .I sys
  204. line #2,
  205. and
  206. writes the file name of the
  207. article file containing the
  208. control message
  209. on the usual
  210. .I utstat
  211. batch file
  212. (\c
  213. .I $NEWSARTS/out.going/utstat/togo ).
  214. .PP
  215. Eventually,
  216. the normal batcher will run on
  217. .I utzoo
  218. on the usual
  219. .I utstat
  220. batch file
  221. and will produce batches,
  222. including the
  223. .I ihave
  224. control message,
  225. and transmit them to
  226. .I utstat
  227. by means specified in
  228. .I $NEWSCTL/batchparms .
  229. .SH
  230. The resulting ihave message arrives on utstat
  231. .PP
  232. When the
  233. .I ihave
  234. control message arrives on
  235. .I utstat ,
  236. .I relaynews
  237. .Ix relaynews
  238. will write the name of the file containing the control message
  239. on the
  240. .I utzoo
  241. .I ihave
  242. batch file
  243. (\c
  244. .I $NEWSARTS/out.going/utzoo.ihave/togo ).
  245. .PP
  246. Eventually,
  247. the
  248. .I batchsm
  249. batcher will run on
  250. .I utstat
  251. on that batch file,
  252. which will produce a
  253. .I sendme
  254. control message
  255. and submit it to
  256. .I "inews \-h"
  257. which matches
  258. .I sys
  259. line #2,
  260. and writes the name of the
  261. .I sendme
  262. control message on
  263. the usual
  264. .I utzoo
  265. batch file
  266. (\c
  267. .I $NEWSARTS/out.going/utzoo/togo)
  268. .PP
  269. Eventually,
  270. the normal batcher will run on
  271. .I utstat
  272. on the usual
  273. .I utzoo
  274. batch file,
  275. and will produce batches including
  276. the
  277. .I sendme
  278. and send them to
  279. .I utzoo
  280. by means specified in
  281. .I $NEWSCTL/batchparms .
  282. .Ix batchparms
  283. .Ix files batchparms
  284. .SH
  285. The resulting sendme message arrives on utzoo
  286. .PP
  287. When the
  288. .I sendme
  289. control message arrives on
  290. .I utzoo ,
  291. .I relaynews
  292. writes the name of the file containing the control message
  293. on the
  294. .I sendme
  295. batch file,
  296. and the
  297. .I batchra
  298. batcher eventually
  299. writes the file names of the requested articles
  300. (named by Message-ID in
  301. the
  302. .I sendme
  303. control message)
  304. on the usual
  305. .I utstat
  306. batch file.
  307. .PP
  308. Eventually,
  309. the normal batcher on
  310. .I utzoo
  311. will run and produce batches,
  312. including the articles requested by the
  313. .I sendme ,
  314. and will send them to
  315. .I utstat
  316. by means specified in
  317. .I $NEWSCTL/batchparms .
  318. .SH
  319. Comparison with B News
  320. .Ix ihave/sendme "B News"
  321. .PP
  322. There is a lot of activity involved in ihave/sendme,
  323. and there are at least five distinct channels
  324. and three transactions needed to send a batch of articles.
  325. B news ``simplifies'' the
  326. .I sys
  327. file by requiring certain
  328. .I sys
  329. file options (sic)
  330. to be set to fixed values,
  331. and
  332. by overloading madly.
  333. The resulting
  334. .I sys
  335. file is much more difficult to decypher,
  336. and if you should want to specify non-default options,
  337. you are out of luck.
  338.