( new-session, session-id, queue-id ) ( end-session, session-id ) ( datagram, session-id, data )The following messages are placed in the network-in queue:
( datagram, network-address, (session-id, data) )The following messages are placed in the session-in queues:
( datagram, data )Note that the network layer need not understand that the session-id is included with the data, but it must be there, and at the far end of the net, the network layer must deliver the session-id along with the data to the transport layer. It may be convenient to use a uniform format for all datagrams in all queues, so the session-id and network-address may be included in datagrams placed in the session-in queue, and the network-address may be included with datagrams placed in the transport-in queue. These extra fields would simply be ignored in these contexts, with their values treated as meaningless or undefined.
Part B: A crucial detail has been omitted from the specification for this problem! No mention was made of how a session is established -- that is, no mention was made of messages sent through the transport layer and used to establish connections between the session layer on one machine and the session layer on another machine elsewhere in the network.
use socket() to create a SOCK_STREAM socket use connect() to connect the socket to a the RPC server use write() to send the RPC parameters to the server use read() to read the results use close() to terminate the connecitonThe server would operate as follows:
repeat the following: use socket() to create a SOCK_STREAM socket use accept() to allow a client to connect to this server use read() to read RPC parameters from the client call the procedure use write() to return results to the client use close() to terminate the connection
Problems 14 on page 461 of the text asks:
Part A Is reading and writing files on a server idempotent? Yes.
Part B Is compiling a program idempotent? Yes.
Part C Are remote banking transactions idempotent? No!