TCPTransport » History » Version 3
J. Moringen, 11/11/2011 08:34 AM
restructured
1 | 3 | J. Moringen | h1. Socket-based Transport |
---|---|---|---|
2 | 1 | S. Wrede | |
3 | 3 | J. Moringen | {{>toc}} |
4 | 1 | S. Wrede | |
5 | 3 | J. Moringen | h2. Usage |
6 | 1 | S. Wrede | |
7 | 3 | J. Moringen | *Warning: The socket-based transport is experimental* (and currently only available in C++ and Common Lisp) |
8 | 3 | J. Moringen | |
9 | 3 | J. Moringen | h3. Prerequisites |
10 | 3 | J. Moringen | |
11 | 3 | J. Moringen | Check that the socket-based transport connector is part of your RSB installation: |
12 | 3 | J. Moringen | * Common Lisp programs display this information in the output of @PROGRAM --help-for=uri@ and in error messages if the transport is not available |
13 | 3 | J. Moringen | * For C++, this can be checked by calling @rsb_version --verbose@ |
14 | 3 | J. Moringen | |
15 | 3 | J. Moringen | If the transport is available, output similar to the following is produced: |
16 | 1 | S. Wrede | <pre> |
17 | 1 | S. Wrede | sericit:server swrede$ rsb_version --verbose |
18 | 1 | S. Wrede | Version: 0.5.0, build 2871 (DATE 2011-10-17 20:57:29 +0200 (Mon, 17 Oct 2011)), abi 2 |
19 | 1 | S. Wrede | |
20 | 1 | S. Wrede | |
21 | 1 | S. Wrede | Default Configuration |
22 | 3 | J. Moringen | rsb::ParticipantConfig[...] |
23 | 1 | S. Wrede | |
24 | 1 | S. Wrede | Connectors |
25 | 1 | S. Wrede | ConnectorFactory<rsb::transport::InPullConnector>[ |
26 | 1 | S. Wrede | ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}] |
27 | 1 | S. Wrede | ] |
28 | 1 | S. Wrede | ConnectorFactory<rsb::transport::InPushConnector>[ |
29 | 1 | S. Wrede | ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}] |
30 | 1 | S. Wrede | ConnectorInfo[socket, schemas = {socket}, options = {host, port, server, enabled}] |
31 | 1 | S. Wrede | ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}] |
32 | 1 | S. Wrede | ] |
33 | 1 | S. Wrede | ConnectorFactory<rsb::transport::OutConnector>[ |
34 | 1 | S. Wrede | ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}] |
35 | 1 | S. Wrede | ConnectorInfo[socket, schemas = {socket}, options = {enabled}] |
36 | 1 | S. Wrede | ConnectorInfo[spread, schemas = {spread}, options = {host, maxfragmentsize, port, enabled}] |
37 | 1 | S. Wrede | ] |
38 | 1 | S. Wrede | |
39 | 1 | S. Wrede | Converters |
40 | 3 | J. Moringen | [...] |
41 | 3 | J. Moringen | </pre> |
42 | 1 | S. Wrede | |
43 | 3 | J. Moringen | h3. Configuration |
44 | 1 | S. Wrede | |
45 | 3 | J. Moringen | 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 |
46 | 3 | J. Moringen | # Have separate @rsb.conf@ files in the working directory of the separate processes: |
47 | 3 | J. Moringen | The basic client configuration (on a single host) looks as follows: |
48 | 1 | S. Wrede | <pre> |
49 | 1 | S. Wrede | [transport.socket] |
50 | 1 | S. Wrede | enabled = 1 |
51 | 1 | S. Wrede | server = 0 |
52 | 1 | S. Wrede | [transport.inprocess] |
53 | 1 | S. Wrede | enabled = 0 |
54 | 1 | S. Wrede | [transport.spread] |
55 | 1 | S. Wrede | enabled = 0 |
56 | 1 | S. Wrede | </pre> |
57 | 1 | S. Wrede | For the server config just change the server line to @server = 1@. |
58 | 3 | J. Moringen | In order to use this connector for communication across multiple hosts, the @host@ and if necessary @port@ options have to be specified. |
59 | 3 | J. Moringen | # Using environment variables: |
60 | 3 | J. Moringen | #* For server process: |
61 | 3 | J. Moringen | @$ export RSB_TRANSPORT_SOCKET_ENABLED=1@ (unless specified in @rsb.conf@) |
62 | 3 | J. Moringen | @$ export RSB_TRANSPORT_SOCKET_SERVER=1@ |
63 | 3 | J. Moringen | #* For client processes: |
64 | 3 | J. Moringen | @$ export RSB_TRANSPORT_SOCKET_ENABLED=1@ (unless specified in @rsb.conf@) |