Sample Configuration 3: tibrequest and tibreply

This third example illustrates additional concepts in configuring transports and endpoint implementation, namely: binding a transport to carry several abilities; two-way message traffic; and connection-oriented transports with connecting and listening ends.

  tibrequest tibreply
Program Description The sample program tibrequest creates a publisher object, and sends messages over its one-to-many send ability.

tibrequest also creates an inbox subscriber object, and receives reply messages over its one-to-one receive ability.

The sample program tibreply creates a subscriber object, and receives request messages over its one-to-many receive ability.

It responds to each request message by sending back a reply message over its one-to-one send ability.

Endpoints The sample realm defines the application tibrequest with one endpoint (named tibrequest-endpoint). The sample realm defines the application tibreply with one endpoint (named tibreply-endpoint).

Application Instance

Consider the rdma application instance, and the effect of its configuration.

  tibrequest tibreply
rdma Application Instance The sample realm configures the rdma application instance of tibrequest, to match the identifier rdma. For matching processes, it implements tibrequest-endpoint with the transport rdma-request-tport, which carries the endpoint’s one-to-many send ability, and also its one-to-one receive ability. The sample realm configures the rdma application instance of tibreply, to match the identifier rdma. For matching processes, it implements tibreply-endpoint with the transport rdma-reply-tport, which carries the endpoint’s one-to-many receive ability, and also its one-to-one send ability.
Listen/Connect Notice that the two application instances specify a pair of fragmentary transports to implement their respective endpoints. Furthermore, those transports are complementary.

The essence of their relationship is that rdma-request-tport and rdma-reply-tport both specify the same port number. rdma-request-tport is the connecting end, while rdma-reply-tport is the listening end of the same port. Once they establish a connection between them, they work together to transmit data over that link.

End Result The effect is to join the two endpoints (tibrequest-endpoint and tibreply-endpoint) so that messages flow between them. The request messages flow from tibrequest to tibreply, and the reply messages flow in the opposite direction.