TCPTransport » History » Version 4

Version 3 (J. Moringen, 11/11/2011 08:34 AM) → Version 4/8 (J. Moringen, 11/11/2011 08:36 AM)

h1. Socket-based Transport

{{>toc}}

h2. Usage

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

h3. 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:
<pre>
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
[...]
</pre>

h3. 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
# Have separate @rsb.conf@ files in the working directory of the separate processes:
The basic client configuration (on a single host) looks as follows:
<pre>
[transport.socket]
enabled = 1
server = 0
[transport.inprocess]
enabled = 0
[transport.spread]
enabled = 0
</pre>
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.
# 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@)

h2. 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_ |