[Info-vax] VMS process communication

Dave Froble davef at tsoft-inc.com
Tue Sep 13 20:59:57 EDT 2022


On 9/13/2022 6:34 PM, Stephen Hoffman wrote:
> On 2022-09-13 20:59:40 +0000, Dave Froble said:
>
>> That's what "handshakes" are for.
>>
>> Hey, I want to send some data, 4000 bytes ...
>> Ok, ready to receive data ...
>> Send the data, wait for a response ...
>> Ok, received 4000 bytes ...
>>
>> Anything else would be considered a failure.
>>
>> In addition, checksums and such could be included to insure the 4000 bytes
>> sent is the same 4000 bytes received.
>
> 4K is ~one (modern) disk block, but yeah.
>
> More common to send 4K with a checksum, or 4K encrypted with a checksum, and let
> the receiver figure it out, though. An application-level TCP-style handshake is
> closer to what is described is certainly workable, but the chatter greatly slows
> things. I'd probably look at the QUIC handshake, or at a message-passing or
> transaction framework, if I needed the extra chatter.  DECdtm, or Paxos
> protocol, or MQTT, and tracking the transaction state, etc. But more generally
> with the use of TCP or QUIC, you will get notification of either a successful
> send, partial send, or of a failure to send.
>
> It's up to the app or the transaction manager to determine where the failure
> occurred, just as it's up to app-local error processing the trap shadow on an
> Alpha to determine where the error occurred, or other sorts of errors.
>
> Put somewhat differently, it's usually best to design the connection for speed
> and simplicity and for the common cause, and to (potentially) make the error
> path and error recovery path somewhat more ugly.
>
> PS: The TCP send operation has four potential outcomes: all bytes transferred, a
> partial transfer with a need to loop and send more, a local failure with no
> transfer, or a connection failure from the remote side with no data transferred.
> Handling this usually involves a state machine.
>
> PPS: one of the more common errors here with TCP and such is assuming a 1-to-1
> mapping of writes to reads. TCP and QUIC don't (necessarily) work that way. One
> big write can become many smaller reads, for instance.
>
> PPPS: Depending on the platform, QUIC can have a specific API:
> https://developer.apple.com/documentation/network/quic_options — with that, QUIC
> can be switched to datagram, for instance.  And AFAIK, OpenVMS TCP/IP Services
> has UDP, TCP, and SCTP, but lacks QUIC.
>
> PPPPS: having a framework that deals with this makes this whole area far easier
> to deal with, and with fewer mistakes, and with fewer problems with encryption
> or authentication.
>

Well, yeah, but I learned communications over a serial line ...

-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list