🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #21195

Re: YOUHAVE transaction and speeding up nocem's

#21195
From: Olaf Titz
Date: Tue, 02 Sep 1997 00:00
59 lines
3629 bytes

brian moore <bem@news.cmc.net> wrote:
> I played with c-nocem a bit, but found it rather annoying: it likes pausing
> the server to process its mods to the history database, which of course
> kills any connections trying to deliver articles and is generally annoying

This is annoying, but pausing the server should not kill any
connections. (Or do they time out at the client side?)

> since I am too lazy to figure out record locking on dbz files (locking
> individual hash chains while its updating), I thought of something truly

Record locking in dbz looks rather hard to me. First problem: the hash
chains are not explicitly there; when a slot is filled the next one
gets taken. For locking a chain you had to keep track of the
individual slots. Second problem: there are three modes in which the
history.pag file is handlesd, depending on compilation and run-time
flags: in small chunks (regular), all at once in memory (dbzincore)
and mapped (-DMMAP). A reliable locking mechanism has to work for all
of them.

In any case, it would be necessary to flock() the history text file in
addition to the hash file. Unfortunately, you can't get away with this
alone because of the second problem mentioned above.

> Hack c-nocem to open a channel to inn (as ctlinnd does) and use that
> to pass the message ID's to cancel.  Keeping it internal to INN would
>...
> I don't know if the existing channel would handle multiple IDs as it
> stands (I don't think it would), but it seems like allowing a stream of
> message ID's to toast would speed up nocem processing immensely unless

ncmspool works like this. It feeds the server "ctlinnd cancel"
commands. This would be the best way to do it in theory, but the
overhead for every single article to be cancelled seems a bit high for
my taste. You have to open up a new socket, send a command, wait for
response for each single cancel. These are datagram sockets, meaning
that (a) they can't be used for batches of cancels because of maximum
datagram size, (b) you need at least to wait for response on every
command. (And (c) the implementation in libinn makes a new socket for
every command, but I think this isn't strictly necessary.)

To get batch cancel processing into the server, which would
undoubtedly be a bit cleaner than the fastcancel program, the server
should have a special channel where it can be feeded commands in bulk
without much overhead. (Like a command channel operating on a stream
socket, perhaps even without acknowledgements of the individual
commands, which are not needed here.) I.e. some major hackery on innd
itself.

olaf
-- 
___        Olaf.Titz@inka.de or @{stud,informatik}.uni-karlsruhe.de       ____
__ o           <URL:http://www.inka.de/~bigred/>     <IRC:praetorius>
__/<_              >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____

Technical Details
Message-ID: <5ui1ir$cqv$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
References: <5ud3lb$grv$1@news.cmc.net>

Show Full Headers
Complete Article Headers
Message-ID: <5ui1ir$cqv$1@bigred.inka.de>
Subject: Re: YOUHAVE transaction and speeding up nocem's
Date: Tue, 02 Sep 1997 00:00:00 +0000
From: olaf@bigred.inka.de (Olaf Titz)
References: <5ud3lb$grv$1@news.cmc.net>
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: 269930365
X-Complaints-To: newsmaster@bigred.inka.de
X-Trace: bigred.inka.de 873236896 13156 (None) 127.0.0.1
Organization: private Linux site, southern Germany
Newsgroups: news.software.nntp