home *** CD-ROM | disk | FTP | other *** search
/ Dream 42 / Amiga_Dream_42.iso / RiscPC / Internet / Connexion / SPak.spk / !NewsBase_docs_Notes < prev    next >
Encoding:
Text File  |  1994-11-10  |  5.6 KB  |  123 lines

  1.  
  2. When debatching a file, newsbase first attempts to recognise the type of
  3. batch file by scanning it for valid separators. These consist of lines
  4. beginning with:
  5.  
  6. #! rmail                mail
  7. ^A                      mail (control-A)
  8. From                    mail (including trailing space)
  9. #! rnews                news
  10.  
  11. If a separator is not found on the first line of the file, newsbase will
  12. 'rewind' to the beginning of the file, after attempting recognition. If no
  13. valid separators are found, newsbase tries to guess the batch type by
  14. presence of "Newsgroups:" headers, etc. Headerless parts of the file will be
  15. saved to the groups "Email.postmaster" or "junk" depending on how newsbase
  16. finally recognises it.
  17.  
  18. From Newsbase 0.43, articles are held in the directory:
  19. group.name.~x.~xN
  20. where N is (article number DIV 75) MOD 75
  21. This now permits many more articles to be held without creating a deep
  22. directory structure.
  23.  
  24. Article numbers are assigned for valid groups as soon as the
  25. Newsgroups: line has been decoded. A "Xref:" header line is then inserted
  26. into the article buffer, allowing clients to mark crossposts as read in all
  27. the crossposted groups. Saving then follows the pregenerated group/number
  28. list (allowing up to 10 groups).
  29.  
  30. From Newsbase 0.23, the "Supercedes:" header is respected, and a superceded
  31. article is deleted (if not locked).
  32.  
  33. The "Expires:" header is handled by encoding the expiry date within a
  34. file's datastamp for articles which require it (the high byte of the 5-byte
  35. datestamp is set to &FF as a flag; the remaining 4 bytes contain the
  36. expiry date as a 1-word integer in the form CEYRMNDY. Files encoded this
  37. way have an apparent datestamp, to the filing system, sometime in the
  38. year 2247).
  39.  
  40. Expire code is called on a per-group basis, to simplify index update.
  41. Expired article numbers are added to a delete buffer and are removed from
  42. the group index when the buffer fills or a different group is referenced.
  43.  
  44. The delete buffer is 512 articles deep (ie, 512 deletions before an index
  45. rewrite is required).
  46.  
  47. When delete buffer is filled, or a deletion for a different group arrives, the
  48. index is updated to remove entries for deleted articles.
  49.  
  50. Polling is disabled during an index update; an hourglass is displayed while
  51. this occurs. With a medium-speed hard disk and around 1000 index
  52. entries, an index update generally takes around 2-5 seconds.
  53.  
  54. Article request by message ID is not currently supported as the lookup is 
  55. quite slow (the index file must be scanned).
  56.  
  57. Index files are held in each group's "root directory", eg
  58. news:rec.audio.~index.
  59.  
  60. The index file format is fixed-length 200-byte records, one record per article.
  61. The record format is:
  62. bytes 0-3 : article number
  63. bytes 4-7 : article date (format CEYRMNDY)
  64. bytes 8-19: reserved for extra information.
  65. bytes 20-n: "Message-ID" field, from article header, null-terminated
  66. bytes n-m : "From" field.
  67. bytes m-199 : "Subject field.
  68.  
  69. Fields may be truncated if they do not fit within the record space available.
  70. If no message ID is available in the article header, it is replaced with
  71. "<0>", in accordance with RFC977.
  72.  
  73. Criteria for design of record structure-
  74.  1. Must be easy to access, and fast to add and remove records, even from
  75.     BASIC. Fixed record size avoids doing any significant processing.
  76.  2. Article information is destinied to be passed to a client program via wimp
  77.     messages. The "Article info" message passes the following information:
  78.     article number, from, and subject. The maximum amount of data
  79.     that can be passed in a wimp message is about 230 bytes.
  80.  
  81. Threading information is not provided for. However, many newsreaders (xrn,
  82. for example) manage a passable substitute by simply sorting on subject. Full
  83. threading will probably require maintenance of a separate threading
  84. database, as the requirements are probably incompatible with those
  85. (simplicity+speed) of the main indexes. This may be added at a later date
  86. but will not be considered now.
  87.  
  88.  
  89. This scheme works well with small numbers of newsgroups (150 tested but more
  90. should scale fairly linearly) and, with the new directory structure of
  91. Newsbase 0.43, more than 2000 articles per group. Better memory management
  92. will be needed within NewsBase to deal with many more groups, but that is an
  93. internal implementation issue. See the file "Tuning" for information on how
  94. to tailor newsbase for larger newsfeeds.
  95.  
  96.  
  97. The from and subject strings returned by "ListArticles" are length limited
  98. and intended for display (in article catalogues) only. Use the fields
  99. directly from the article headers for generating replies, etc.
  100.  
  101. The pathname returned by "article get" should be used once and not stored
  102. across calls to Wimp_Poll. It is possible for article files to move without
  103. notification (generally only at debatch or expiry time)
  104.  
  105. "Article delete" is included to complete the command set, but should
  106. probably not be used in a multiple-reader environment. It will not be
  107. effective against locked articles. One situation where the function might
  108. be useful is to delete personal email - in this situation, deletion will
  109. always be permitted. For other groups, deletion may be disabled as a
  110. newsbase configuration option.
  111.  
  112. It is the responsibility of the newsbase client to track which articles and
  113. groups a reader is interested in, or has read.
  114.  
  115. "Article lock" prevents an article from being deleted or expired, regardless
  116. of expiry date.
  117.  
  118. Mail messages are mistakenly split on lines starting "From ". The extra bit
  119. of message is saved to Email.postmaster (problem mail) with a suitable
  120. subject (no recipient?) rather than into a group "Email" as currently.
  121. Using the ka9q transport, this is only seen with POP (SMTP alters these
  122. lines to ">From "). This can be avoided by using ^A or "#! rmail" separators.
  123.