[comp.mail.uucp] uucico turnaround with "g" protocol

rhg@cpsolv.UUCP (Richard H. Gumpertz) (11/12/89)

In article <739@lakart.UUCP> dg@lakart.UUCP (David Goodenough) writes:
>for this to fail , but I wanted to get the net.opinion of the following
>idea. When running in slave mode, _ALWAYS_ respond with a 'HN' when the
>master says 'H'. If I have work, I'll enter master mode, and my
>requests will be processed. If I have NO work, I'll immediately follow
>my 'HN' response with a 'H' request of my own. At this point, I'm in
>the same place as my master program is when it's run out of work, and
>from there on in, it will work just fine. Basically, can I be lazy, and
>do this:

What happens if you end up talking to a uucico that does the same things as
you do?  It seems to me that you will send H/HN back and forth forever!
A program really should be capable of running with a clone of itself at
another site!
-- 
===============================================================================
| Richard H. Gumpertz rhg%cpsolv@uunet.uu.NET -or- ...uunet!amgraf!cpsolv!rhg |
| Computer Problem Solving, 8905 Mohawk Lane, Leawood, Kansas 66206-1749      |
===============================================================================

dg@lakart.UUCP (David Goodenough) (11/17/89)

rhg@cpsolv.UUCP (Richard H. Gumpertz) sez:
> In article <739@lakart.UUCP> dg@lakart.UUCP (Who, Me?) writes:
>>for this to fail , but I wanted to get the net.opinion of the following
>>idea. When running in slave mode, _ALWAYS_ respond with a 'HN' when the
>>master says 'H'. If I have work, I'll enter master mode, and my
>>requests will be processed. If I have NO work, I'll immediately follow
>>my 'HN' response with a 'H' request of my own. At this point, I'm in
>>the same place as my master program is when it's run out of work, and
>>from there on in, it will work just fine. Basically, can I be lazy, and
>>do this:
> 
> What happens if you end up talking to a uucico that does the same things as
> you do?  It seems to me that you will send H/HN back and forth forever!
> A program really should be capable of running with a clone of itself at
> another site!

I wasn't going to say anything about this, since this only happens in
slave mode: master mode does it right, and I wasn't anticipating two slaves
talking to each other. _HOWEVER_ .... since the chance exists, the following
hack will fix my hack:

first received 'H' - respond with 'HN' and then send any data that has to
go (maybe none). At this point I know there is no traffic waiting for the
remote: send a 'H', and do whatever is demanded by his response (be it 'HN'
or 'HY'). It is worth noting that in a UNIX environment it is possible to
get a HN back at this point if someone has just spooled a letter. Assuming
a 'HN', process _HIS_ requests till we get a 'H'. Now send a 'HY', because
we know it's the second time through, and we're out of the woods. From here
on in, it's trivial, and would follow the pattern of the master mode program
receiving a 'H' request.

Now, will _THAT_ scheme break? I can't see how, but then who knows.
-- 
	dg@lakart.UUCP - David Goodenough		+---+
						IHS	| +-+-+
	....... !harvard!xait!lakart!dg			+-+-+ |
AKA:	dg%lakart.uucp@xait.xerox.com			  +---+