🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #8874

Re: Let's put compression into NNTP -- I am willing to pay

#8874
From: Luca Lizzeri
Date: Sat, 29 Jun 1996 00:00
103 lines
3552 bytes
On Sat, 29 Jun 1996 13:14:19 GMT, Andrew E. Mileski <aem@ott.hookup.net> wrote:
>>In percentage terms, the above test shows around 13% reduction for
>>compress and about 28% for gzip.
>
>Try 'gzip -9' next time.
>

You can do it for batches. On an article by article basis I think it would
put quite a load on the servers. 

Have you tried doing 

date
find /var/spool/news -type f -exec gzip -9 {} \;
find /var/spool/news -type f -exec gunzip {} \;
date

on a busy newsserver ? I haven't tried nor have I any intention of doing it.

OTOH, I have tried tarring my news spool (it's very small, I am on a dialup 
line and I download a dozen comp.* and news.* groups) and then did gzip -9
on the tarball. Results:

news.tar 29.368.320 bytes

time gzip -9 news.tar
111.80user 2.07system 1:54:54elapsed 99%cpu

news.tar.gz 7.730.835 bytes

So the compressibility of nntp traffic seems very high, though the cpu-load
is quite high.

>Both a 13% and 28% reduction _ARE_ worth the effort.
>
At what cost ? I think something more elegant than pure gzipping is
required. A new message format would be interesting, on the lines of

/* 
 * This is entirely off the top of my head. Be merciful in your flames
 */

struct article {
	char *message-id;
	struct Header header;
	struct Body body;
}

struct Header {
	int length;
	char *From;
	int *Path; /* array of IP addresses. What about IPv6 ? */
	int Nntp-Posting-Host; /* IP address */
	int Date; /* long? long long? 64 bits of seconds since the epoch, GMT */
	char *Newsgroups;
	
	.
	.
}

struct Body {
	int length;
	char *contents;
}

and so on.

For transfer you can establish the order of transmission of the headers,
and send them, first the fixed length, ever present ones, then the variable
length ones, preceding them with a length byte (is 256 chars enough for
a header ?), lastly the optional and X-* headers with some ad hoc encoding.

You can also compress only body.contents, for more efficient transmission, 
modifying only the headers, leaving the body alone while you store it and
pass it on. Decompression would best be handled in the clients, doing it on 
the server only for legacy software.

This should take care of great part of the redundancy of NNTP transfers.
You can't do much server-side about the redundancy of usenet discussion :)

The questions are:

1. Would this even work ?

2. Would it be implementable and deployable ?

3. Does a modification of NNTP have a chance in hell of succeeding ?

My answers are:
1,2. Ask me again when I have thought about it. I sure hope so.
3. 	Judging by the whole QP/MIME/7bit unholy mess the chances look slim,
	but the benefits would be great.

[snip]

-- 
Luca Lizzeri
ll@niche.telnetwork.it
lizzeri@mbox.vol.it


Technical Details
Message-ID: <4r3q9b$cv@niche.telnetwork.it>
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: <4qs8mb$abu@fugue.clari.net> <4qt7k2$3hf@dfw-ixnews1.ix.netcom.com> <4qvd4l$3d7$1@bushwire.mira.net.au> <4r3a58$hf3@nic.ott.hookup.net>

Show Full Headers
Complete Article Headers
Message-ID: <4r3q9b$cv@niche.telnetwork.it>
Subject: Re: Let's put compression into NNTP -- I am willing to pay
Date: Sat, 29 Jun 1996 00:00:00 +0000
From: ll@niche.telnetwork.it (Luca Lizzeri)
References: <4qs8mb$abu@fugue.clari.net> <4qt7k2$3hf@dfw-ixnews1.ix.netcom.com> <4qvd4l$3d7$1@bushwire.mira.net.au> <4r3a58$hf3@nic.ott.hookup.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: 163307853
Distribution: inet
Organization: Niche Consulting S.r.l.
Reply-to: ll@niche.telnetwork.it
Newsgroups: news.software.nntp