Thread View: news.software.readers
5 messages
5 total messages
Started by Ross Ridge
Fri, 28 Aug 1992 08:20
Re: relaynews vs the "threaded" newsreaders
Author: Ross Ridge
Date: Fri, 28 Aug 1992 08:20
Date: Fri, 28 Aug 1992 08:20
91 lines
4407 bytes
4407 bytes
geoff@world.std.com (Geoff Collyer) writes:
>Further staring has convinced me that in fact trn wants two distinct
>databases: a ``presentation menu'' database, sharable with nn and other
>readers, stored per group and containing at least article number, subject and
>author for each message (possibly message-id too); and the link data used
>to generate the trn `hunt the wumpus' diagrams, indexed by article file
>name and yielding the link data and a message-id or history file offset.
I really don't if you can really make that seperation with trn. With trn
you select entire threads, and those threads are defined by the link data.
>So I think I'm going to skip the intermediate stage I had proposed, and
>go straight to a common adjunct data base. Does anyone understand what's
>*in* the link data in the trn database? (I still don't; I think I've got
>a block against `hunt the wumpus' diagrams.)
Well basically they're not squashed dodecahedrons, they're trees. :-)
I'm not quite sure what you want to know, so please forgive me if
I completely fail to answer your question. I think the best place
to start is trn's internal data structures.
This structure is for the list of threads:
typedef struct Root {
struct Root *link; /* the link to next oldest thread */
ARTICLE *articles; /* the root of a tree of articles in
the thread */
SUBJECT *subjects; /* a list subjects in the thread. */
/* ... */
} ROOT;
Here's the one for the tree of articles:
typedef struct Article {
struct Article *parent, *children, *siblings;
/* These are the basic links of the tree, |parent| is the article that
this is follow-up to, |children| is a pointer to the oldest article
that is a follow-up to this article, and |siblings| is a list of
newer articles that are also follow-ups to the parent. The normal
order of reading is this article then the children, then the siblings.
This is the link data. */
struct Subject *subject;
/* The subject of the article. This points to one of the members of the
list of subjects for this thread. */
struct Author *author;
/* The author of the article, this points to a member of list of authors
for the current newsgroup */
struct Root *root;
/* the thread that this article belongs to */
struct Domain *domain;
char *id;
struct Article *id_link;
/* these members define the message-id of this article. It's divdided
into two parts, the "id" part before the '@' and the "domain" part
after the '@'. |domain| is a pointer to member of a list of domains
for this newsgroup, and |id| is the id part for this article.
|id_link| is a list of articles sharing the same domain as this one.
The |Domain| structure containts a pointer to the article that is
the start of this list. Searching for message-id's is done simply,
first look sequentially through the list of domains and then through
the list of id's for that domain. */
/* ... */
} ARTICLE;
For reference the |Domain| structure:
typedef struct Domain {
char *name;
ARTICLE *ids;
struct Domain *link;
} DOMAIN;
To save space and for clarity I've deleted some members and reordered them
a bit, see "threads.h" for the complete structures. The database used by
trn parallels these structures, the chief difference is that pointers are
replaced with sequence numbers. There are special cases for referenced
articles that haven't arrived yet, and for articles that have expired.
Ross Ridge
--
Ross Ridge - The Great HTMU l/ //
[OO][oo]
ross@zooid.guild.org /()\/()/
uunet.ca!zooid!ross db //
Re: relaynews vs the "threaded" newsreaders
Author: Geoff Collyer
Date: Fri, 28 Aug 1992 13:38
Date: Fri, 28 Aug 1992 13:38
26 lines
1901 bytes
1901 bytes
Ross Ridge: >I really don't if you can really make that seperation with trn. With trn >you select entire threads, and those threads are defined by the link data. That certainly is the user interface; what I'm trying to determine is what link data is actually needed to maintain the thread linkages. >I'm not quite sure what you want to know, so please forgive me if >I completely fail to answer your question. I think the best place >to start is trn's internal data structures. Thanks; I had seen the data structure definitions, but they beg the question `how much of this complexity is really needed?'. For example, what use is a sibling pointer, given parent and children pointers? Surely one's siblings are one's parent's children. Given a database that permits quick (dbm-style) lookups by message-id or article file name, and that contains at least Message-Id: and References: header data and article file name for each article, could trn do everything it currently does? (I'm assuming that spending a little time assembling linkages in core upon group entry is acceptable.) -- Geoff Collyer world.std.com!geoff, uunet.uu.net!geoff ``Leave the evil grasping to us.'' - A. L. Arms, UNIX licensing, WECo.
Re: relaynews vs the "threaded" newsreaders
Author: Sean Eric Fagan
Date: Fri, 28 Aug 1992 21:47
Date: Fri, 28 Aug 1992 21:47
20 lines
1792 bytes
1792 bytes
In article <Btp4Jv.H9r@world.std.com> geoff@world.std.com (Geoff Collyer) writes: >Given a database that permits quick (dbm-style) lookups by message-id >or article file name, and that contains at least Message-Id: and >References: header data and article file name for each article, could >trn do everything it currently does? (I'm assuming that spending a >little time assembling linkages in core upon group entry is >acceptable.) I don't know. It needs to be able to find an article's thread-parents, as well as its thread-children. While the former are in the References: lines, the latter are only available by sucking up the entire database 8-;. (Well, not true, but the ability to find children of an arbitrary article is necessary. But there are a couple of ways to do that, assuming a nice, quick database.) -- Sean Eric Fagan | "You can't get lost in one room, no matter how sef@kithrup.COM | little effort you make to learn your way around." -----------------+ -- William E Davidsen (william@crd.GE.COM) Any opinions expressed are my own, and generally unpopular with others.
Re: relaynews vs the "threaded" newsreaders
Author: Brad Templeton
Date: Fri, 28 Aug 1992 22:18
Date: Fri, 28 Aug 1992 22:18
12 lines
1271 bytes
1271 bytes
Having written a thread builder and drawer once myself, my feeling is that there is no need for two databases. A regular database, with the references line is enough. With an appropriate hashing algorithm, building the trees from the references lines, once you have them in ram, is not that hard, and while it is a waste in a sense to calculate them each time, it is not a killer. The hard part is getting all those headers and references lines into ram. That's the function a database serves -- saving you 100 file opens. -- Brad Templeton, ClariNet Communications Corp. -- Sunnyvale, CA 408/296-0366
Re: relaynews vs the "threaded" newsreaders
Author: Alan P Barrett
Date: Tue, 01 Sep 1992 10:47
Date: Tue, 01 Sep 1992 10:47
23 lines
1970 bytes
1970 bytes
In article <Btp4Jv.H9r@world.std.com>, geoff@world.std.com (Geoff Collyer) writes: > Given a database that permits quick (dbm-style) lookups by message-id > or article file name, and that contains at least Message-Id: and > References: header data and article file name for each article, could > trn do everything it currently does? (I'm assuming that spending a > little time assembling linkages in core upon group entry is > acceptable.) Please also cache anything that folk are likely to request via XHDR, such as Subject: and From:. Then the NNTP server could respond to XHDR, XTHREAD, LISTGROUP etc. with readily available data. (I seem to recall a post by Eliot Lear several months ago, in which he reported grafting a variant of nn's database into nntpd for this purpose.) Once XHDR is cheap, newsreaders might choose to use it in their kill-file processing (consider an rn kill pattern like /^Newsgroups: .*alt\.flame/h). Once newsreaders do that, the set of headers that benefit from caching would be enlarged. --apb Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa RFC822: barrett@ee.und.ac.za Bang: m2xenix!quagga!undeed!barrett
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads