🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #29531

Re: Replacing innmail?

#29531
From: Peter J Naylor
Date: Fri, 03 Jul 1998 00:00
100 lines
5558 bytes
In article <m3k95wrk0t.fsf@windlord.stanford.edu>,
	Russ Allbery <rra@stanford.edu> writes:
> Peter J Naylor <pete@filter.supernal.net> writes:
> 
>>> Even though it's dramatically faster
> 
>> Really?  How so?
> 
> Because from an embedded interpreted language, I have access to all of
> INN.  There are patches now that let me query INN to see if a group is
> moderated, cancel a message already received, add things to the history
> file, do history lookups, etc.  That stuff is slow, impossible, or memory
> bloated in an external program, or all three.

You're making the comparison between the two particular languages which
are provided with a direct interface to INN functions and everything
else - which doesn't have the same interface.  This doesn't tell me
anything at all about why using an interpretted scripting language
is dramatically faster than a compiled binary for filtering.

>>> and more convenient. 
> 
>> For whom?
> 
> Developers of the filters, since the embedded ones have more capabilities.

I don't disagree, but the extra convenience is provided by hooks in INN.
It would be far more convenient to allow people to use whatever they wish.

>> Wouldn't it be nicer to be able to specify an executable in the config
>> files which would be forked at run time and sit there being fed either
>> the complete article or just the headers (another config file option?) -
>> returning responses which match a predefined set that INN could then act
>> upon?  That way you could write the executable in whatever language you
>> prefer - shell script if you wish.
> 
> Sure, that would be nice; that's what Cyclone does.  I wouldn't use it,
> because an embedded language is even nicer and considerably more flexible,

I don't understand.  How is it more flexible?  Is it more flexible
because it still has access to more internal functions than the
externally forked process?  I believe those are the hooks which are
patched into INN - why couldn't the functions be made available to
the interface for the generic, forked process?

> plus lets me do things that approach wouldn't without sending stuff
> through ctlinnd (with all the race conditions and other problems involved
> there), but I think that would be good functionality to add to INN for
> those who do want that.

Wait... if INN is communicating directly with the process it forks, and
providing an interface to all the same functions as it does through
the Perl hooks, what has ctlinnd got to do with it?

> I didn't argue that it was free of security problems, but it's
> considerably more secure than shell.  Honestly, that's not a controversial
> statement, even among people who detest Perl.  Shell scripts are a lot of
> things, including insanely portable, but secure isn't high on the list;
> there are just too many quoting irregularities and too many ways to get it
> wrong.

Why Perl though?  We went from a shell script that worked for everyone
but recently needed a security fix, to another interpretted script.
The security problem doesn't exist in the patched shell script or
the Perl script.  The Perl script also uses sendmail instead of
UCB Mail.  What's the advantage that justifies the dependency on a
totally separate and otherwise unnecessary package?  Couldn't the
same have been done in C and just compiled with the rest of INN?

>> The readability issue is your opinion only, and the line counts are both
>> unsubstantiated and unimportant to users.
> 
> They're important to me.

Because they use more disk space?  The scripts do the same thing as far
as the user is concerned, only one needs Perl, which might not already
be available and may be unwanted.

>> The scripts we're talking about have negligible performance impact when
>> considering the overall package.  If performance was truly of major
>> importance they shouldn't be interpretted.
> 
> *shrug*  Matters to me.  Perl is about 3 times slower than C for this, and
> several orders of magnitude easier to write for the sorts of things those
> scripts do.

I would agree with that attitude if these scripts were for your
personal use at your site only.  Since INN is intended for use by
many, it is worth some extra time to accomplish a task in the best
manner rather than the quickest/easiest.

-- 
/*-------------------------------------------------------------*
 * Peter James Naylor ## SysAdmin, Supernal Technologies, Inc. *
 *-------------------------------------------------------------*
    * pete@filter.supernal.net ## <http://www.supernal.net> *
    *-------------------------------------------------------*/

Technical Details
Message-ID: <6nhfdv$p44$1@news.supernal.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
References: <6napr9$oov$1@nnrp1.dejanews.com> <87hg13uhd9.fsf@erlenstar.demon.co.uk> <6nc7s9$1lc$1@news.supernal.net> <m390meuulh.fsf@windlord.Stanford.EDU> <6ncl16$5s6$1@news.supernal.net> <m3d8bqoxkm.fsf@windlord.Stanford.EDU> <6netla$su5$1@news.supernal.net> <m3k95wrk0t.fsf@windlord.Stanford.EDU>

Show Full Headers
Complete Article Headers
Message-ID: <6nhfdv$p44$1@news.supernal.net>
Subject: Re: Replacing innmail?
Date: Fri, 03 Jul 1998 00:00:00 +0000
From: pete@filter.supernal.net (Peter J Naylor)
References: <6napr9$oov$1@nnrp1.dejanews.com> <87hg13uhd9.fsf@erlenstar.demon.co.uk> <6nc7s9$1lc$1@news.supernal.net> <m390meuulh.fsf@windlord.Stanford.EDU> <6ncl16$5s6$1@news.supernal.net> <m3d8bqoxkm.fsf@windlord.Stanford.EDU> <6netla$su5$1@news.supernal.net> <m3k95wrk0t.fsf@windlord.Stanford.EDU>
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: 368283363
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: Supernal Technologies, Inc.
Newsgroups: news.software.nntp