[news.software.b] Grading of UUCP news traffic

stevo@judy.Jpl.Nasa.Gov (Steve Groom) (07/01/88)

We have been slowly adding Trailblazer news feeds using ihave/sendme.
However, for some sites we deal with (including us), 'blazer time can
be hard to come by.  You know, several modems available, but the
'blazers are busy or just not available at all hours.

What we do now is put a grade limitation on the slower modems so that
it doesn't try to send news over a slow line if the 'blazer(s) is/are
busy, but holds news waiting for the 'blazer.  What I would like to do
is be able to send news control messages across the slow lines, and
just reserve actual article traffic for the 'blazers.

(For those of you unfamiliar with 4.3 BSD UUCP grading: for UUCP
commands such as uux you can specify a 'grade'.  Then in the L.sys
file, along with the time-to-call information, you can specify the
minimum grade permissible for jobs when connecting on that line.  Jobs
not qualifying remain queued and are not run until the line grade
allows it.  By putting mail at a different grade from news and setting
the minimum grade for a slow line somewhere in between the two, you can
restrict a line to mail only.)

Since we run ihave/sendme, I would like to be able to get those ihave's
and sendme's out to the other system as soon as possible, and at the
same time not worry about having news flow over slow lines.  This
would, I believe, make the protocol more effective, as timely replies
help reduce redundant traffic.  It would also help ensure that the
sender had articles ready to go when the fast line does become
available, and time wouldn't be wasted with the exchange and processing
of ihave's and sendme's during that time.

Doing something like this might also help improve the effectiveness of
cancel messages, by allowing them to propogate at a higher "priority"
than the regular message.

One drawback to giving all control messages a higher priority (that
you've probably already thought of) is that "sendsys" messages could
also flood the net that much faster.

(Note: we're running news 2.11 patch 14)

The mechanism I would propose to implement this would be to use
different UUCP grades for control messages and article batches.  Since
news uses the same uux flags (which include the UUCP grade
specification) for everything it sends, setting this up requires more
than just a header fix and recompile.  (Actually, the flags are
specified once in the 'localize' script and copied everywhere else during
the install.)

The quick solution would be to fix sendbatch and inews (actually
defs.h) directly after localize had been run.  Sendbatch invokes uux to
send articles and inews invokes uux to send control messages, so I
think that would allow a 'control message' grade and an 'article batch'
grade.

An extravagant solution might be to set up the software with several
different sets of uux flags which could be specified from 'localize',
with perhaps a different set of flags for each type of control message,
and another for article batches.  I'm sure that, in practice, this
would be overkill.

I would like to hear what others think about this.  I will be hacking a
bit locally for my own purposes, but I thought that this might be of
general interest and a possibility for inclusion in later releases.

-steve
/* Steve Groom, MS 168-522, Jet Propulsion Laboratory, Pasadena, CA 91109
 * Internet: stevo@elroy.jpl.nasa.gov   UUCP: {ames,cit-vax}!elroy!stevo
 * Disclaimer: (thick German accent) "I know noothingg! Noothingg!"
 */

jbuck@epimass.UUCP (07/01/88)

In article <7182@elroy.Jpl.Nasa.Gov> stevo@elroy.Jpl.Nasa.Gov (Steve Groom) writes:
>Since we run ihave/sendme, I would like to be able to get those ihave's
>and sendme's out to the other system as soon as possible, and at the
>same time not worry about having news flow over slow lines.

No software modification is required to do this.  "ihave/sendme"
control messages are directed to the group to.neighbor.ctl,
where neighbor is your neighbor.  Just add the following line
to your sys file:

neighbor:world,to.neighbor::uux (switches) - neighbor!rnews

where (switches) are whatever uux options you want, say to
place the call immediately at the appropriate grade.  You
also have a second line for "neighbor" in your sys file
to handle how you want all the groups distributed.
-- 
- Joe Buck  {uunet,ucbvax,pyramid,<smart-site>}!epimass.epi.com!jbuck
jbuck@epimass.epi.com	Old Arpa mailers: jbuck%epimass.epi.com@uunet.uu.net
	If you leave your fate in the hands of the gods, don't be 
	surprised if they have a few grins at your expense.	- Tom Robbins

james@bigtex.uucp (James Van Artsdalen) (07/02/88)

IN article <7182@elroy.Jpl.Nasa.Gov>, stevo@elroy.Jpl.Nasa.Gov (Steve Groom) wrote:
[ using uucp grading to give ihave/sendme priority ]

> The mechanism I would propose to implement this would be to use
> different UUCP grades for control messages and article batches.  Since
> news uses the same uux flags (which include the UUCP grade
> specification) for everything it sends, setting this up requires more
> than just a header fix and recompile.

This last statement is not necessarily the case.  For example:

bigtex:world,comp,news,sci:IF:
bigtex:world,to.bigtex:U:

Note: order is important here: when using sendme, the first entry for
a give system *must* have the F flag, or news will send the articles
unbatched, one by one.

Now set UUXFLAGS in the makefile to use a lower priority than UXMIT in
defs.h.  You can use a different priority for DFTXMIT yet, giving a
third priority.  My assumption is that the lack of compression for
just the ihave/sendme control messages is not a major issue.

Another variation on the ihave/sendme theme is to delay the ihave
messages.  This is useful to build redundancy into an existing
distribution topology.  The change is near the end of sendbatch:

	(     echo /usr/local/lib/news/inews -t \"cmsg ihave \
		 $DOIHAVE\" -n to.$rmt.ctl '<<END_IHAVES'
	      cat /usr/spool/batch/$rmt.$$
	      echo END_IHAVES
	) | at now + 2 days 2>/dev/null

Here, instead of simply feeding the message IDs to inews, I queue them
to be fed two days later.  This gives the remote site a chance to get
the articles via normal routes.
-- 
James R. Van Artsdalen   ...!ut-sally!utastro!bigtex!james   "Live Free or Die"
Home: 512-346-2444 Work: 328-0282; 110 Wild Basin Rd. Ste #230, Austin TX 78746

jerry@oliveb.olivetti.com (Jerry Aguirre) (07/06/88)

I have been using ihave/sendme fairly extensively for a while now.
Sending the ihave and sendme messages at higher priority is an easy
modification to the news/sys file.

All you have to do is add another line to send articles in the
"to.remote" group using an explicit uux command.  Assuming the other
site is named "remote" you can add a line like:

remote-to:world,to.remote:BSUL:/usr/bin/uux -c -z -g0 remote!rnews < %s

To save you having to look all this up (and in case your uux doesn't
support some of these options) here is an explaination.  I used
"remote-to" for two reasons.  First, there are some subtle interactions
when you use more than one entry with the same site name.  Second, this
nicely separates the ihave/sendme traffic in my weekly news report.

The "world,to.remote" will match postings in the "to.remote" group.
This is the normal group that ihave/sendme articles are posted.  Note
that this will not send other articles including cancel or sendsys.
(Unless you post them in the "to.remote" newsgroup.)

The "B" flag means use "B" format news (the default).  The "S" flag
means execute uux directly instead of execing a shell to do it.  In
addition to being faster this avoids the need for quoting shell meta
characters in the third field.  The "U" flag means convert the %s in the
command to the permanent file name.  This avoids an extra copy of the
article.  The "L" flag means only transmit if the article was posted on
this site.  Probably unnecessary given the "to.remote" limitation but it
pays to be cautious.

The uux command has a "-c" option to avoid copying the input file.  This
reduces the queue size.  The "-z" option suppresses response messages.
Finally the "-g0" forces the grade to be "0", the maximum.  I want the
ihave messages to go first, even before mail.  This increases the chance
that they will process and return the sendme in the same connection.
Note also the absense of the "-r" option that would queue without
initiating the call.  You may want to adjust the grade or add the "-r"
option depending on the cost of the connection.

Extensive use of the "ihave" messages can result in your
"spool/news/control" directory getting quite large.  I have reduced this
somewhat by posting a single ihave message to multiple sites.  You may
also want to expire the control group early if disk space becomes a
problem.  Setting an expiration date on the articles might be a better
solution but generating a future date in a shell script sounds like more
trouble than it is worth.  An option to inews that let me set the
expiration date in days would be nice.  It would also be nice if inews
would record some information about sendme articles in the log file.  As
it is there is no direct way to monitor the number of messages
requested.
			Jerry Aguirre