🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by Asle Pedersen Thu, 08 Jul 1999 00:00
What is the DBZ database
#38522
Author: Asle Pedersen
Date: Thu, 08 Jul 1999 00:00
10 lines
1061 bytes
I have seen the DBZ database been mentioned in all the INN faq files,
but what is it? Is the overview database a DBZ database? What is the
most common way of storing news by a news-client? I'm thinking of using
an SQL database, but some people have advised me not to do so. What
other options do I have ?

-Asle Pedersen


Re: What is the DBZ database
#38524
Author: meow
Date: Thu, 08 Jul 1999 00:00
35 lines
2134 bytes
Asle Pedersen <apederse@grm.hia.no> writes:

> I have seen the DBZ database been mentioned in all the INN faq files,
> but what is it?

In INN and its predecessors, the articles are stored in individual
files, indexed by message ID.  History is a simple text file listing
the IDs and their locations; dbz provides an on-disk hash table to
quickly locate an entry in that file.  So, dbz is really just a
simplified/optimized version of the dbm-style databases found in lots
of programs.

> Is the overview database a DBZ database?

Generally not.  It is traditionally in the form of text file like
history, but indexing (if it exists at all) is usually simpler because
sequential access is the common case.

> What is the most common way of storing news by a news-client?

By a client?  There is no most common way =) Some readers use what's
one file per group much like a traditional Unix mail folder, others
copy the classical news server model and have one directory per group,
one file per article.  Others use home-grown databases.

> I'm thinking of using an SQL database, but some people have advised
> me not to do so. What other options do I have ?

For a client, that might work just fine, so long as the engine you
choose is reasonably smart about using disk space.  For a server, you
will probably find that an RDBMS is simply too slow for the job; it's
optimized for a different sort of data flow.


Re: What is the DBZ database
#38541
Author: Curt Welch
Date: Fri, 09 Jul 1999 00:00
37 lines
2667 bytes
Asle Pedersen <apederse@grm.hia.no> wrote:
> > In INN and its predecessors, the articles are stored in individual
> > files, indexed by message ID.  History is a simple text file listing
> > the IDs and their locations; dbz provides an on-disk hash table to
> > quickly locate an entry in that file.  So, dbz is really just a
> > simplified/optimized version of the dbm-style databases found in lots
> > of programs.
>
> I'm a bit confused by this answer because I read an answer by Curt Welch
> to another question in this category and he says (quote):

I'm not sure which point confuses you, but...

> "Older systems would store each article in a separate file in a file
> system but the overhead for that has grown too large for today's Usenet
> volumes......"

Let me say that some people still run inn in the mode where each article
is stored in it's own file.  But to keep up with a full feed you need
a lot more disk bandwidth than whey you use one of the various techniques
of store multiple articles together in large files.

The db familly of "data base access" functions create a hashed disk file.
This is used to create the index by Message-ID -- i.e. so given a message
I.D. you can quickly (i.e. with not too many disk reads) find the
associated article.  With inn (at least the old inn), what you got out of
the dbz file was the address of the line in the history file that contained
the article's Message-ID and the list of groups it was posted to along with
the article number assigned for each group.  With the new inn you get this
long "token" which is used to locate the file in the cyc bufs (at least I
think that's how it works...)

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Re: What is the DBZ database
#38550
Author: meow
Date: Fri, 09 Jul 1999 00:00
25 lines
1925 bytes
Asle Pedersen <apederse@grm.hia.no> writes:

>> In INN and its predecessors, the articles are stored in individual
>> files, indexed by message ID.  History is a simple text file listing
>> the IDs and their locations; dbz provides an on-disk hash table to
>> quickly locate an entry in that file.  So, dbz is really just a
>> simplified/optimized version of the dbm-style databases found in lots
>> of programs.

> I'm a bit confused by this answer because I read an answer by Curt Welch to
> another question in this category and he says (quote):

> "Older systems would store each article in a separate file in a file system
> but the overhead for that has grown too large for today's Usenet
> volumes......"

On the newer INN systems, the filename field of history is replaced by
a storage token, which is basically still an encoded filename.  In one
of the new storage methods (CNFS) it includes an offset into that
file.  I left all that out because dbz still works the same way.  If
you really want to get into that part of things, it might be a good
idea to grab a copy of INN, play with it, and maybe dig into the
sources.

Re: What is the DBZ database
#38564
Author: Russ Allbery
Date: Fri, 09 Jul 1999 00:00
16 lines
1364 bytes
Asle Pedersen <apederse@grm.hia.no> writes:

> It was the point about storing in one file per article or not that
> confused me, but in an e-mail Matthew Emmerton cleared things up for me
> when he pointed out to that in newer systems (e.g newer versions of
> INN), a switch is being made from "traditional" storage system to CNFS,
> which uses raw disk buffers (1GB, etc) and stores the articles in the
> buffer, hence no filesystem overhead.

And a lot of people are going to intermediate solutions so that they still
have some fine-grained control over expire times (timehash, timecaf).

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: What is the DBZ database
#38568
Author: Asle Pedersen
Date: Fri, 09 Jul 1999 00:00
35 lines
2452 bytes
Curt Welch wrote:

> Asle Pedersen <apederse@grm.hia.no> wrote:
> > > In INN and its predecessors, the articles are stored in individual
> > > files, indexed by message ID.  History is a simple text file listing
> > > the IDs and their locations; dbz provides an on-disk hash table to
> > > quickly locate an entry in that file.  So, dbz is really just a
> > > simplified/optimized version of the dbm-style databases found in lots
> > > of programs.
> >
> > I'm a bit confused by this answer because I read an answer by Curt Welch
> > to another question in this category and he says (quote):
>
> I'm not sure which point confuses you, but...
>
> > "Older systems would store each article in a separate file in a file
> > system but the overhead for that has grown too large for today's Usenet
> > volumes......"

It was the point about storing in one file per article or not that confused me,
but in an e-mail Matthew Emmerton cleared things up for me when he pointed out
to that in newer systems (e.g newer versions of INN), a switch is being made
from "traditional" storage system to CNFS, which uses raw disk buffers (1GB,
etc) and stores the articles in the buffer, hence no filesystem overhead.

BTW, I think I will stick to a simple SQL database in my news-client
application, as there will be a moderated number of articles to store after I
have done some filtering. I will probably use the varchar type for some of the
databasefields. (unless someone have a better suggestion than using SQL).

-Asle Pedersen



Re: What is the DBZ database
#38571
Author: Asle Pedersen
Date: Fri, 09 Jul 1999 00:00
18 lines
1504 bytes
> In INN and its predecessors, the articles are stored in individual
> files, indexed by message ID.  History is a simple text file listing
> the IDs and their locations; dbz provides an on-disk hash table to
> quickly locate an entry in that file.  So, dbz is really just a
> simplified/optimized version of the dbm-style databases found in lots
> of programs.

I'm a bit confused by this answer because I read an answer by Curt Welch to
another question in this category and he says (quote):

"Older systems would store each article in a separate file in a file system
but the overhead for that has grown too large for today's Usenet
volumes......"

-Asle


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