Article View: news.software.nntp
Article #21764Re: News data storage model
From: Curt Welch
Date: Sun, 21 Sep 1997 00:00
Date: Sun, 21 Sep 1997 00:00
41 lines
2669 bytes
2669 bytes
olaf@bigred.inka.de (Olaf Titz) wrote: > (*) A minimalistic approach to a better article storage on the Un*x > filesystem: take a hash from the Message-ID as file name. Simply run > an MD5 on it, encode that in hex or base64, split the string at regular > intervals with slashes so directories don't get to full. > That's all. Example: > <foobarfrotz@bigred.inka.de> > => 01e04eacbe69a317314943ed6ad790e0 (hex) > => /var/spool/news/articles/01e0/4eac/be69/a317/3149/43ed/6ad7/90e0 > Where exactly to split would warrant some careful analysis, taking > into account how many files or subdirectories the average directory > would get vs. the number of lookups required to get at one article. > I haven't done that. This scheem has the problem that it's not optimal for feeding, reading or expiring. Disk and directory activity is randomized for everything so nothing ends up being in the cache (or you need a much larger cache to make it work as well). The formats that make the most sense for todays Usenet are the ones that optimize the structure for feeding and expiring (which is what news systems spend the most time working on). If you use a Unix FS as the underlying storage (which I think still makes a lot of sense), then you want to arrange articles in the order they arrive (which is also the order you send them out in, and the order you expire them in). The overview-like DB is what makes reading efficent. And because even on a heavy news-reading machine, most news groups will never be read, I think it probably makes sense to only build a small over-view index, and extract (and cache) the bulk of the overview data only on demand. Creating and cahching the over-view data as needed should make a machine used only for feeding almost as effecent as one running feed-only software like Diablo. Or at least it seems that way to me without working out the details... Curt Welch curt@kcwc.com http://CurtWelch.Com/
Technical Details
Message-ID:
<19970921131612.010$lU@NewsReader.Com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<5vpddn$qlb$1@news5.ais.net> <5vta1f$gtd$1@ftel.ftel.co.uk> <5vtibt$7i4$1@bigred.inka.de> <5vua1g$vb8$1@newssvr03-int.news.prodigy.com> <603943$rc2$1@bigred.inka.de>Show Full Headers
Complete Article Headers
Message-ID: <19970921131612.010$lU@NewsReader.Com> Subject: Re: News data storage model Date: Sun, 21 Sep 1997 00:00:00 +0000 From: curt@kcwc.com (Curt Welch) References: <5vpddn$qlb$1@news5.ais.net> <5vta1f$gtd$1@ftel.ftel.co.uk> <5vtibt$7i4$1@bigred.inka.de> <5vua1g$vb8$1@newssvr03-int.news.prodigy.com> <603943$rc2$1@bigred.inka.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 274308658 X-User: Curt@NewsReader.Com Organization: KCW Consulting Newsgroups: news.software.nntp