Message Streams handle the details of inter-process communication for you, whether you are communicating between two threads on the same system or threads located on different hosts that are connected over a network.
NOTE For this release, Message Streams can only establish networked communications channels between machines that run the CommonPoint application system.
In the request-reply interface, a server can handle requests from multiple clients. The request and reply are bound to a thread for the duration of the transaction.
NOTE Datastreams, a Message Streams interface supporting full duplex communications, is not available in this release.
When a server starts up, it instantiates a TRequestReceiverStream. The constructor for this class requires a service definition object as a parameter. The service definition is necessary because it establishes the service access point through which the server receives client messages and sends replies. Once you create the first request receiver stream, the service definition is considered active.
A client that wants to connect to a server first must identify the service it needs by creating a valid service reference and then instantiating a TRequestSenderStream. Similar to TRequestReceiverStream, you construct a TRequestSenderStream using the service reference. The client can then stream data into the request sender stream and send a message to the server.
The message
streams
communication
model
Message Streams communication uses a synchronous send-receive-reply model called the request-reply interface. In a request-reply exchange:
Implementing
request-reply communication
You implement request-reply communication using objects of classes TRequestSenderStream and TRequestReceiverStream. These classes derive from TStream, and so they include basic streaming protocol.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Generated with WebMaker