RodSession

A RodSession is associated with a WorkingSetMachine and allows for sending and receiving the read only objects called ROD objects which are replicated on demand in a working set.

A RodSession communicates with exactly one remote RodSession using a fully symmetric message based protocol.

A RodSession is stateful, so therefore local and remote RodSessions must be paired for the life of the session.

A RodSession is not concerned with creating or managing internal threads or sockets for IPC. Instead messages are read/written synchronously to a given input or output archive.

A RodSession is defined in the Xc++ language as an $adt:


$adt+ RodSession
{
    void Close();
    InputArchive ReadNextMessage(InputArchive ar);
    bool WriteNextMessage(Archive& ar);
};


void Close()

Must be called without a lock on the CSpace. It is not necessary to have set the CSpace/PSpace in TLS.


InputArchive ReadNextMessage(InputArchive ar)

Read the next message from 'ar' Requires an exclusive lock on the associated CSpace, and CSpace/PSpace to be set in TLS


bool WriteNextMessage(Archive& ar)

Write the next message to ar. Returns false if nothing to write. Requires a lock on the associated CSpace, and CSpace/PSpace to be set in TLS