Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

TCP and QIO

Original Message
Name: cwingho
Date: September 4, 2007 at 09:33:17 Pacific
Subject: TCP and QIO
OS: VMS Alpha
CPU/Ram: 617 Hz
Model/Manufacturer: Digital/DS10
Comment:
I am designing a communication process on a VAX that communicates as a client to the outside world at one end and as a server to another end where there is a running application on the same machine. I would like to know if my concept is correct: Since I don't want to check the arrival of messages periodically so I will use a TCP socket to talk to the outside world and a QIO with AST to the backend application. I was told that the TCP socket has a higher priority then the QIO, so the process goes into hibernation at the QIO waiting for a incoming message to kick off the AST. The AST will then disable the read attribute of the the TCP socket, process the message, send it out through the socket, and then restore the socket to read mode for reply from the remote server by setting the select command with infinite timeout, it then followed by hibernation at the QIO to complete the cycle. The essense of my design is based on the assumption of TCP socket has a higher priority than QIO/AST. If my assumption is wrong, what is my alternative? My goal is to put the process into a sleep mode instead of checking for messages at both ends using a round-robin fashion.


Report Offensive Message For Removal


Response Number 1
Name: Bob Gezelter
Date: September 5, 2007 at 06:06:45 Pacific
Subject: TCP and QIO
Reply: (edit)
cwingho,

I would re-check the information that you are depending on. It is also quite possible that something has been lost in the wording of the post.

Basically, when as AST arrives, it preempts the normal thread of processing. The processing associated with the AST is executed, and then the AST exits. ASTs can occur at almost any time, except when explicitly disabled or when another AST is already executing (I strongly recommend against ever disabling ASTs).

The best way to implement the functionality described in this post is as a collection of AST routines, some associated with QIO operations to the TCP pipe associated with the client connection and some associated with the connection to the downstream server.

My presentation from the 1995 Fall US DECUS Symposium, "Introduction to AST Programming" can be found at: http://www.rlgsc.com/decus/usf95/in...

I hope that the above is helpful.

- Bob Gezelter, http://www.rlgsc.com


Report Offensive Follow Up For Removal

Response Number 2
Name: cwingho
Date: September 5, 2007 at 08:32:54 Pacific
Subject: TCP and QIO
Reply: (edit)
Bob, thank you for the reply. If AST interrupts the normal flow of a process, then it has the highest priority and above that of a TCP socket waiting for something to read, so I got the whole thing reversed. Based on that I should let the socket wait forever and let the AST do the processing when a message arrives from the applications. I will also try if your suggestion will work, i.e., use AST at both ends of the communications, the only thing I am not sure is whether a TCP socket select function can call an AST though. I have looked at your 1995 presentation on AST, you recommended using queue to insert and remove queued messages. I will see if I can incorporate a LIB$INSQHI & LIB$REMQTI at the server's end to do the job. Thanks. again
P.S. I cut and pasted my original msg, must have missed a couple of words. Thanks for adding them back in. CWH

Report Offensive Follow Up For Removal

Response Number 3
Name: Bob Gezelter
Date: September 5, 2007 at 08:48:23 Pacific
Subject: TCP and QIO
Reply: (edit)
cwingho,

The socket library is not appropriate to use in AST state. The best way to write this is to use the AST-enabled interfaces on both connections.

The post did not mention which IP stack is in use, but all of them support accessing TCP streams directly using the QIO interface.

Needless to say, we have assisted clients with implementing systems of this type.

- Bob Gezelter, http://www.rlgsc.com


Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: TCP and QIO

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




VGA Card in 386 clone - dip-switche

Video/Graphics problem

Ping on DOS 6.22

netgear, onelevel

Ping on DOS 6.22


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC