🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90985

Re: betterbird: reading crossposts once?

#90985
From: Jakob Bohm
Date: Mon, 16 Oct 2023 20:11
69 lines
5368 bytes
On 2023-10-16 19:27, Frank Slootweg wrote:
> Jakob Bohm <jb-usenet@wisemo.com.invalid> wrote:
>> On 2023-10-16 18:03, candycanearter07 wrote:
>>> On 10/16/23 10:49, Frank Slootweg wrote:
>>>>     Neither do I, but it's just SMOP (Small Matter Of Programming). All
>>>> you have to do is to remember all the hundred of thousands / millions of
>>>> message-ids of the postings you've ever 'read'. How hard can *that* be!?
>>>> :-)
>>>
>>> You could just scan for matching ids when you read an article. Or, maybe
>>> you could limit it to the messages read in the last x days, to cut down
>>> on processing time.
>>
>> A more practical optimization is to only retain a database of MIDs of
>> messages that are marked "read" in actively kept message storage.  Thus
>> when a read message is "aged out" of storage, its "read" status is aged
>> out too.  To avoid old messages transiting in and out of view, keep a
>> count of how many copies are marked read for each MID and count that
>> down as messages age out.  Once in a while, rebuild database from the
>> stored messages and their "read" status, then do a second pass to mark
>> duplicates of read messages as read.  Bonus: Also index the body
>> contents hash to catch identical multi-posting.
> 
>    I said "hundred of thousands / millions of message-ids" for a reason.
> 
>    I have well over a million articles in my "message storage". Keeping
> that a amount of messages-ids is already not practical, but *scanning*
> (for read/not_read status) them for each an every new (and old) article
> is impossible.
> 
>    But even if you don't keep (that) many articles in your message store,
> when you add a new newsserver which has a long retention time, you *do*
> have to scan all those articles, just in case there's one which you have
> already marked as read.
> 
>    That's why newsservers and newsreaders use article numbers instead of
> message-ids. It makes things much more simple (actually possible instead
> of impossible). But yes, it works only for a specific server, not
> accross servers and when adding a new group or/and new server you should
> only fetch the latest N articles (which is very simple using article
> numbers).
> 
>    Bottom line: Using article numbers is done for a very good reason.
> 

You don't understand what I wrote.  Idea would be to use some kind of 
available (search optimized) database engine to store the values, 
updated incrementally as messages enter and leave the storage or are 
marked read.  Scanning all messages would be a "once in a while" 
database repair in case the database gets out of sync with the message 
storage and be done using O(n*log(n)) code.

Database lookups would happen during the initial import of messages (to 
see if a newly arrived message was marked read by an earlier user access 
to a duplicate) and when displaying a message or its header on screen 
(to see if it a duplicate was marked read since its arrival).

Thus common operations change from complexity O(n*n) to O(delta*log(n))
given typically assumed lookup costs in indexed databases.


Enjoy

Jakob
-- 
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
Technical Details
Message-ID: <DR2cna8-c45fBbD4nZ2dnZeNn_Vi4p2d@giganews.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <uftnus$2voq4$1@dont-email.me> <w29h803rmpn4.dlg@v.nguard.lh> <slrnuilnm3.3uvei.rayban@raybanana.net> <ofkn3js6yvvh$.dlg@v.nguard.lh> <uggt8q.rdg.1@ID-201911.user.individual.net> <ugh6ae$cvr5$3@dont-email.me> <ughha2.nhc.1@ID-201911.user.individual.net> <ughfd8$aigv$1@news.trigofacile.com> <ugjdnb.ido.1@ID-201911.user.individual.net> <8mpm1esqft.fsf@raybanana.net> <ugjt35.nqo.1@ID-201911.user.individual.net> <ugjmsc$1fjvk$2@dont-email.me> <PYicnd_php9R_7D4nZ2dnZeNn_Vi4p2d@giganews.com> <ugk2rn.pb0.1@ID-201911.user.individual.net>

Show Full Headers
Complete Article Headers
Message-ID: <DR2cna8-c45fBbD4nZ2dnZeNn_Vi4p2d@giganews.com>
Subject: Re: betterbird: reading crossposts once?
Date: Mon, 16 Oct 2023 22:11:26 +0200
From: Jakob Bohm <jb-usenet@wisemo.com.invalid>
References: <uftnus$2voq4$1@dont-email.me> <w29h803rmpn4.dlg@v.nguard.lh> <slrnuilnm3.3uvei.rayban@raybanana.net> <ofkn3js6yvvh$.dlg@v.nguard.lh> <uggt8q.rdg.1@ID-201911.user.individual.net> <ugh6ae$cvr5$3@dont-email.me> <ughha2.nhc.1@ID-201911.user.individual.net> <ughfd8$aigv$1@news.trigofacile.com> <ugjdnb.ido.1@ID-201911.user.individual.net> <8mpm1esqft.fsf@raybanana.net> <ugjt35.nqo.1@ID-201911.user.individual.net> <ugjmsc$1fjvk$2@dont-email.me> <PYicnd_php9R_7D4nZ2dnZeNn_Vi4p2d@giganews.com> <ugk2rn.pb0.1@ID-201911.user.individual.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
In-Reply-To: <ugk2rn.pb0.1@ID-201911.user.individual.net>
Nntp-Posting-Date: Mon, 16 Oct 2023 20:10:42 +0000
X-Abuse-And-Dmca-Info: Please be sure to forward a copy of ALL headers
X-Abuse-And-Dmca-Info: Otherwise we will be unable to process your complaint properly
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:6.2) Goanna/20230604 Epyrus/2.0.2
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Mime-Version: 1.0
Organization: WiseMo A/S
X-Postfilter: 1.3.40
Lines: 69
X-Usenet-Provider: http://www.giganews.com
X-Dmca-Notifications: http://www.giganews.com/info/dmca.html
X-Trace: sv3-oQh212Qzl+eg+s+CZvUmXj9CKMhH/KxzByCB7mUt9Y4mKMkdgUP8z/fwOEuVanuWKiF8x+RRWIwOAtZ!Axd4NLyYElZeqyBGawZtZCmvPP7oSgM690+URfc3GD8/RMCK6tdNQwSmyiB8Rrk7oeyhMUTVrBY=
X-Complaints-To: abuse@giganews.com
Newsgroups: news.software.readers,news.software.nntp
X-Received-Bytes: 5488