🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.developers
Article #67

Re: Newshistory checking

#67
From: Terrance Richard Boyes
Date: Wed, 14 Jul 1999 00:00
47 lines
3431 bytes
Dave {Reply Address in.sig} <noone@llondel.demon.co.uk> wrote:
> On 14 Jul 1999 05:51:54 GMT, Chris Croughton wrote:

>>The way I'd do it would be to read in the file, in file order, then use
>>qsort (ANSI C routine) to sort it (or rather sort an array of pointers
>>to the strings) and then use bsearch to find them.  You don't need to
>>add the new IDs to the list as they come in, as they should be unique
>>anyway among themselves.

> This is not true if you're talking to Demon's news machines. If I
> crosspost an article to all the demon.* groups and then request
> articles from those groups with NEWNEWS then I'll get offered the same

[snip]

That's true of any system that uses NEWNEWS since it's done 
on a per group basis. And also of course a problem for anybody
using XOVER as well unless you use the XREF to dedupe across
groups.

> On the subject of KA9Q, will a hash table (as used in KA9Q) do the

I didn't even consider KA9Q, and having grabbed the code, yep
it uses a nice simple hashing algorithm. Now all I've got to
do is work the numbers out so it'll work nicely for 64K entries
*in* RAM rather than 64KB *of* RAM !

> business efficiently enough? Hash each ID into a suitable number of
> bits with a decent algorithm and you only need go search the list for
> each hit in the hash table (which is hopefully small enough to be in
> RAM and indexed in a reasonable manner). Obviously this doesn't work

RAM isn't a problem ;~)

> too well above a certain size if there are enough history file entries
> to fill the hash table (bigger table will fix this but slows down
> searching).

My normal newshistory tends to sit at about 32K entries
(about 1 month worth) which comes to a little over 1.3 MB in
raw file size. So allowing for overheads that'd still be
less than 2MB. When I said large I wasn't meaning on an ISP
scale...

-- 
<URL:http://www.pierrot.co.uk/>                                  Team AMIGA
Yeast is yeast and nest is nest and never the mane shall tweet.
Technical Details
Message-ID: <19990714.210035.0AA80202.TCaa@pierrot.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <19990713.200500.0AA80202.PEaa@pierrot.co.uk> <slrn7oo9bq.j5g.chris@ccserver.keris.org> <abbaryybaqryqrzbapbhx.fevjazn.pminews@sharra.llondel.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bb05,75d5f9974c0fd91a
X-Google-Attributes: gid10bb05,public
From: tez@pierrot.co.uk (Terrance Richard Boyes)
Subject: Re: Newshistory checking
Date: 1999/07/14
Message-ID: <19990714.210035.0AA80202.TCaa@pierrot.co.uk>
X-Deja-AN: 501114115
X-PGP-Fingerprint: 20 66 0F E8 85 64 9C 2C  6F 82 6F 19 6C 2F 6A 1D 
X-Cancel-Lock: TEZT:8838c9625ecdd13e23eff06333abbd32 8838c9625ecdd13e23eff06333abbd32 9779a5cbf465c8b1bf141b9144732785
X-PGP-Keyfile: <URL:http://www.pierrot.co.uk/pgpauth/>
References: <19990713.200500.0AA80202.PEaa@pierrot.co.uk> <slrn7oo9bq.j5g.chris@ccserver.keris.org> <abbaryybaqryqrzbapbhx.fevjazn.pminews@sharra.llondel.demon.co.uk>
X-PGP-Auth: pub   512/3A14C4B9 1999/04/22 Tez Boyes <tez@pierrot.co.uk> iQBVAwUBN40JCkXush46FMS5AQEjQwH8CWSACa5IxT5Tap84uNK6Rqb0XXDl5mD+ 4GqlSmudqve7ExUAEVGtmEU9d2gByMjORxHYP/yot0FG+Lw/GdKPlQ== =P+L+
X-NaMLServ: $VER: v0.9b <tez@pierrot.co.uk>
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!finch-post-12.mail.demon.net!pierrot.demon.co.uk!pierrot.co.uk!tez@pierrot.co.uk
X-Trace: mail2news.demon.co.uk 931993392 mail2news:13577 mail2news mail2news.demon.co.uk
Organization: ECL.Net
User-Agent: tin/pre-1.4-980618 (AMIGA)
X-Lan-Trace: news.pierrot.lan 19990714.210035 news:TCaa IDENT tez@ami060.pierrot.lan
Newsgroups: demon.ip.developers