🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #93155

Re: RFC: Open sourcing csiph-web

#93155
From: Colin Macleod
Date: Fri, 27 Nov 2026 14:56
41 lines
3849 bytes
Kevin Bowling <kevin.bowling@kev009.com> posted:
> 
> Without consideration, if you deployed it on the open web to a random 
> NNTP server or your own, it would likely DoS the NNTP server.  The 
> biggest expense is article threading due to large thread windows and 
> bots not doing linear (cache friendly) sweeps.

Perhaps you might be interested in how I do threading on newsgrouper.org?
This runs on a fairly modest home PC - 8 logical cores, 32GB ram, 1TB ssd
for the overview database.  I don't run my own nntp server.

I pull XOVER data from three different remote nntp servers on demand and
load this into an "over" table in a Sqlite database.  The schema can be
seen at
https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=scripts/db_create.tcl&ln=17-21
Here I have a field "prev" which is the message-id of the last entry in the
References header, which is usually the message being replied to, if any.
There are indexes on this "prev" field and the actual "msgid", combined with
a group identifier.

I can then use recursive SQL queries to follow these msgid/prev pointers
to pull out a single thread:
https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=news_code.tcl&ln=2879-2886
or all the threads in a time range:
https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=news_code.tcl&ln=2889-2900

I still need to chase these pointers between the records in memory to build
the thread tree structure, but that's quite fast:
https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=news_code.tcl&ln=2907-3027

I find this works well, with quite quick response and no great load on the
machine.  I do have various bot defence measures also, and perhaps fewer
user than you.

-- 
Colin Macleod ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ https://cmacleod.me.uk
BLACK FRIDAY - 50% Extra Signature Free!!!

AI Bros: All your bits are belong to us!

FEED GAZA NOW!  SAVE GAZA NOW!  HOUSE GAZA NOW!  FEED GAZA NOW!
Technical Details
Message-ID: <1795791419-7@newsgrouper.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
References: <11ebphq$546$1@csiph.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
From: Colin Macleod <user7@newsgrouper.org.invalid>
Newsgroups: news.software.nntp
Subject: Re: RFC: Open sourcing csiph-web
References: <11ebphq$546$1@csiph.com>
Date: Fri, 27 Nov 2026 14:56:59 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <1795791419-7@newsgrouper.org>
Injection-Info: newsgrouper.org; mail-complaints-to="newsgrouper@yahoo.com"; posting-account=user7
Injection-Date: Fri, 27 Nov 2026 14:56:59 GMT
User-Agent: Newsgrouper/0.9.0
Organization: You cannot be serious!!!
X-Face: ;>4')~8UD=d.R[\.@A;)N{u_j#_=cmLx$}bIc4.3By~hf[q~|cf59?%bLtS)G@w#32G1%7y
  kz`PF}nwv'neqs,&gJm|V!,Xuekf[YIYQB7[Px"t#|rqb20(<F+y~
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAWlBMVEUOqj99lWv/gSb8+vzH
  yfDKcKfawMf/wXL/xwX/0DL/4MgAnuf////woTuJAg9haNWbJVrmDRbf8/wXqt0wOcfWPknT
  or8xStFls+AyPs/XiXvV447V5/JsPbGdJXGAAAAByElEQVRIie2V0XqDIAyFqaGoaKWztSDi
  +7/mkkoVFLbuonfLTeUzP+ckNMjaPwb7Bz4CcB+uh/eA0YdWSvE3mBW4Y4zKvW+JG6XGu+p/
  BYJnMHrkwVrYYbDyB6AFNap1Ie3XMwaZB1oEXnWLAXPtQEikEgNmBWh7C6SDTCGzwN0DmD+I
  l7WiKErIAHoBRNcF1iURGaC5EQDXrgt9EyFTANwaQ7+PrrPRRnKTSAEocN39ScqigDwg9gJP
  QOYBG1fwDrB3lLPU5wC4FJcU4JqGJy1Bpku8aWggjkXLzDngudE8HNtaro7iefDndvBEjsBx
  x40xIcCXEtDT9SpiR1YprTXNcQh4Rxjn+bxNt+NK08yPd7ooAgB7ZPyjQGIxDc9sjamGrqK+
  DwCz9OgZj5kIcI8zbq3nk0jMQyCAG5+RwJjnWRm79SgAACsIbiUiZoJEj8dctkdAMLYJEPFA
  AUFbTEVqpuHEWPoSg7qq4QigwJTMb8uqSl0zWQFZVXW49oBj7JQzFAm8AHSUvrjRUGzVAxNj
  yW8D5tfxiw0Qbj9mUqKfejdLmyWsYon6FVV1zA/b6uNUbVGXB6PrSfdi8gqlFygnmajr89/p
  b4k/bLhxPQ+xAAAAAElFTkSuQmCC
Behaviour: mis*