Article View: news.software.nntp
Article #88115Re: Header lines
From: news
Date: Fri, 10 Jan 2020 21:20
Date: Fri, 10 Jan 2020 21:20
35 lines
2571 bytes
2571 bytes
Borneq <borneq@antyspam.hidden.pl> wrote: > > I think about how to store articles in database (especially in Sqlite). > I prefer one table record for one article but can be better solutions? > > I want store body as compressed blob, required header fields as table > column fields, but is also variable number not required header fields. > My own NNTP server software (called sqlnetnews) stores each article as a record in a SQLite database. It stores overview data for use of the OVER command, and one column stores a blob containing both header and body together, in the format of the protocol (with stuffed dots). If you want to write your own, you may use compression if you wish, or you may do other things different to what I did, too. The SQLite website mentions that SQLite is 35% faster than file system (approximately; depending on conditions). Large data should not be stored in WITHOUT ROWID tables, so you should not use a WITHOUT ROWID table for the table containing the article text. (You also cannot use WITHOUT ROWID tables with incremental blob I/O, so that is another reason to avoid the use of a WITHOUT ROWID table for this case.) I might suggest to use WAL mode, which allows simultaneous reads and writes, and is faster when there are many writes to the database. As far as I know, the specification of NNTP does not require that article numbers be consecutive but does require them to be monotonic in each newsgroup, so that newer articles always have higher article numbers. My own sqlnetnews software uses the same article numbers for all newsgroups (but checks existence in the current newsgroup when requesting an article by number), which I think is compatible with the NNTP specification. -- Note: I am not always able to read/post messages during Monday-Friday.
Technical Details
Message-ID:
<1578687780.bystand@zzo38computer.org>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-mailReferences:
<5e1486b7$0$511$65785112@news.neostrada.pl> <5e14e1f3$0$558$65785112@news.neostrada.pl>Show Full Headers
Complete Article Headers
Message-ID: <1578687780.bystand@zzo38computer.org> Subject: Re: Header lines Date: Fri, 10 Jan 2020 21:20:51 +0000 From: news@zzo38computer.org.invalid References: <5e1486b7$0$511$65785112@news.neostrada.pl> <5e14e1f3$0$558$65785112@news.neostrada.pl> 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 Newsgroups: news.software.nntp Organization: Aioe.org NNTP Server Lines: 35 Nntp-Posting-Host: T3p5Iplo8Qapd43srEM3cA.user.gioia.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: bystand/0.7.3 X-Notice: Filtered by postfilter v. 0.9.2