🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87080

Re: About compression with NNTP

#87080
From: Julien ÉLIE
Date: Fri, 16 Oct 2015 20:22
61 lines
3950 bytes
Hi Russ,

>> I received a private comment highlighting the fact that the COMPRESS
>> command, as described in that draft, is not necessarily straight-forward
>> to implement in all existing software.  The reason is that the mandatory
>> use of deflate() from zlib implies that NNTP software can cope with
>> 0-bytes in the stream.  Which is not always the case.
>
> But that's also true of STARTTLS.
>
> I think there may be some confusion here.  The point of COMPRESS as an
> NNTP extension is to act as a transport layer, similar to STARTTLS or a
> SASL confidentiality layer.  This makes it much easier to implement in the
> same way that SSL support is easier to implement: you need only worry
> about compression and decompression in your network code, when putting
> bits on the wire or taking them off.  No command implementation has to
> care, since by the time the bits have exited the transport layer,
> everything is the plain-text protocol that the rest of the software is
> expecting.

As far as I understand, the issue is for news software still using 
fputs()/fgets() instead of read()/write() on sockets.  Adding support 
for either TLS or compression is not that easy for them.



> The approach that you describe, with compression implemented separately in
> each command, is therefore quite a bit more complex.  Rather than having a
> simple on-off at the network level such as with STARTTLS, each command now
> has to be aware of the compression status and separately compress its own
> data (but not the rest of the stream).

Yet, in order to improve compression efficiency, shouldn't a few 
commands be aware of the compression status anyway?
Ken's draft suggests that the compression dictionary be clear when 
switching from article headers to article body text, notably when 
containing attachments in Base64 or UUencode form for instance.

Well, such an integration in NNTP commands is easy, though, as we just 
need to call the relevant function if compression is active.



More general questions:

- Should we keep the COMPRESS name, or switch to something like 
STARTCOMPRESSION?  (to keep the semantics of the existing STARTTLS command)

- Should we keep the suggested 291 response code instead of re-using the 
(never standardized) 207 response code implemented in NNTPRelay and 
Diablo?  They implement the MODE COMPRESS command, that answers 207:
     http://sedore.com/nntprelay/compressed-nntp-not.htm

-- 
Julien ÉLIE

« – Essayons d'interroger ce garde habilement sans éveiller ses
     soupçons…
   – Hep ! Où est enfermé Assurancetourix ? » (Astérix)

Technical Details
Message-ID: <mvrm9s$i1l$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <mvjp3s$n0u$1@news.trigofacile.com> <AABWHiG/QCkAACAT.A1.flnews@WStation2.stz-e.de> <mvmahl$iou$1@news.trigofacile.com> <87si5d41ll.fsf@hope.eyrie.org>

Show Full Headers
Complete Article Headers
Message-ID: <mvrm9s$i1l$1@news.trigofacile.com>
Subject: Re: About compression with NNTP
Date: Fri, 16 Oct 2015 22:22:19 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <mvjp3s$n0u$1@news.trigofacile.com> <AABWHiG/QCkAACAT.A1.flnews@WStation2.stz-e.de> <mvmahl$iou$1@news.trigofacile.com> <87si5d41ll.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Oct 2015 20:22:20 +0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="aaubervilliers-651-1-161-208.w81-249.abo.wanadoo.fr:81.249.172.208";
 logging-data="18485"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0)
 Gecko/20100101 Thunderbird/38.3.0
In-Reply-To: <87si5d41ll.fsf@hope.eyrie.org>
X-Received-Body-CRC: 2034571301
X-Received-Bytes: 3937