TCPTransport » History » Version 4

« Previous - Version 4/8 (diff) - Next » - Current version
J. Moringen, 11/11/2011 08:36 AM
added implementation links


Socket-based Transport

Usage

Warning: The socket-based transport is experimental (and currently only available in C++ and Common Lisp)

Prerequisites

Check that the socket-based transport connector is part of your RSB installation:
  • Common Lisp programs display this information in the output of PROGRAM --help-for=uri and in error messages if the transport is not available
  • For C++, this can be checked by calling rsb_version --verbose

If the transport is available, output similar to the following is produced:

sericit:server swrede$ rsb_version --verbose
Version: 0.5.0, build 2871 (DATE 2011-10-17 20:57:29 +0200 (Mon, 17 Oct 2011)), abi 2

Default Configuration
rsb::ParticipantConfig[...]

Connectors
ConnectorFactory<rsb::transport::InPullConnector>[
    ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}]
]
ConnectorFactory<rsb::transport::InPushConnector>[
    ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}]
    ConnectorInfo[socket, schemas = {socket}, options = {host, port, server, enabled}]
    ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}]
]
ConnectorFactory<rsb::transport::OutConnector>[
    ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}]
    ConnectorInfo[socket, schemas = {socket}, options = {enabled}]
    ConnectorInfo[spread, schemas = {spread}, options = {host, maxfragmentsize, port, enabled}]
]

Converters
[...]
  

Configuration

When employing the socket-based transport, RSB-using processes are configured in server and client modes (with one server and one or more clients). To configure processes accordingly, there are two possibilities
  1. Have separate rsb.conf files in the working directory of the separate processes:
    The basic client configuration (on a single host) looks as follows:
    [transport.socket]
    enabled = 1
    server = 0 
    [transport.inprocess]
    enabled = 0
    [transport.spread]
    enabled = 0
    

    For the server config just change the server line to server = 1.
    In order to use this connector for communication across multiple hosts, the host and if necessary port options have to be specified.
  2. Using environment variables:
    • For server process:
      $ export RSB_TRANSPORT_SOCKET_ENABLED=1 (unless specified in rsb.conf)
      $ export RSB_TRANSPORT_SOCKET_SERVER=1
    • For client processes:
      $ export RSB_TRANSPORT_SOCKET_ENABLED=1 (unless specified in rsb.conf)

Implementations

Language File(s)
C++ source:trunk/cpp/core/src/rsb/transport/socket
Java missing
Python work in progress, not yet committed to trunk
Common Lisp not yet committed to trunk