TCPTransport » History » Version 7
J. Moringen, 12/06/2012 09:52 PM
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 | 5 | S. Wrede | *Warning: The socket-based transport is beta and this page partially outdated.* |
8 | 5 | S. Wrede | |
9 | 5 | S. Wrede | h3. Specification |
10 | 5 | S. Wrede | |
11 | 7 | J. Moringen | see: http://docs.cor-lab.org/rsb-manual/trunk/html/specification-socket |
12 | 3 | J. Moringen | |
13 | 3 | J. Moringen | h3. Prerequisites |
14 | 3 | J. Moringen | |
15 | 3 | J. Moringen | Check that the socket-based transport connector is part of your RSB installation: |
16 | 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 |
17 | 3 | J. Moringen | * For C++, this can be checked by calling @rsb_version --verbose@ |
18 | 3 | J. Moringen | |
19 | 3 | J. Moringen | If the transport is available, output similar to the following is produced: |
20 | 1 | S. Wrede | <pre> |
21 | 1 | S. Wrede | sericit:server swrede$ rsb_version --verbose |
22 | 1 | S. Wrede | Version: 0.5.0, build 2871 (DATE 2011-10-17 20:57:29 +0200 (Mon, 17 Oct 2011)), abi 2 |
23 | 1 | S. Wrede | |
24 | 1 | S. Wrede | |
25 | 1 | S. Wrede | Default Configuration |
26 | 3 | J. Moringen | rsb::ParticipantConfig[...] |
27 | 1 | S. Wrede | |
28 | 1 | S. Wrede | Connectors |
29 | 1 | S. Wrede | ConnectorFactory<rsb::transport::InPullConnector>[ |
30 | 1 | S. Wrede | ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}] |
31 | 1 | S. Wrede | ] |
32 | 1 | S. Wrede | ConnectorFactory<rsb::transport::InPushConnector>[ |
33 | 1 | S. Wrede | ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}] |
34 | 1 | S. Wrede | ConnectorInfo[socket, schemas = {socket}, options = {host, port, server, enabled}] |
35 | 1 | S. Wrede | ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}] |
36 | 1 | S. Wrede | ] |
37 | 1 | S. Wrede | ConnectorFactory<rsb::transport::OutConnector>[ |
38 | 1 | S. Wrede | ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}] |
39 | 1 | S. Wrede | ConnectorInfo[socket, schemas = {socket}, options = {enabled}] |
40 | 1 | S. Wrede | ConnectorInfo[spread, schemas = {spread}, options = {host, maxfragmentsize, port, enabled}] |
41 | 1 | S. Wrede | ] |
42 | 1 | S. Wrede | |
43 | 1 | S. Wrede | Converters |
44 | 3 | J. Moringen | [...] |
45 | 3 | J. Moringen | </pre> |
46 | 1 | S. Wrede | |
47 | 3 | J. Moringen | h3. Configuration |
48 | 1 | S. Wrede | |
49 | 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 |
50 | 3 | J. Moringen | # Have separate @rsb.conf@ files in the working directory of the separate processes: |
51 | 3 | J. Moringen | The basic client configuration (on a single host) looks as follows: |
52 | 1 | S. Wrede | <pre> |
53 | 1 | S. Wrede | [transport.socket] |
54 | 1 | S. Wrede | enabled = 1 |
55 | 1 | S. Wrede | server = 0 |
56 | 1 | S. Wrede | [transport.inprocess] |
57 | 1 | S. Wrede | enabled = 0 |
58 | 1 | S. Wrede | [transport.spread] |
59 | 1 | S. Wrede | enabled = 0 |
60 | 1 | S. Wrede | </pre> |
61 | 1 | S. Wrede | For the server config just change the server line to @server = 1@. |
62 | 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. |
63 | 3 | J. Moringen | # Using environment variables: |
64 | 3 | J. Moringen | #* For server process: |
65 | 3 | J. Moringen | @$ export RSB_TRANSPORT_SOCKET_ENABLED=1@ (unless specified in @rsb.conf@) |
66 | 3 | J. Moringen | @$ export RSB_TRANSPORT_SOCKET_SERVER=1@ |
67 | 3 | J. Moringen | #* For client processes: |
68 | 3 | J. Moringen | @$ export RSB_TRANSPORT_SOCKET_ENABLED=1@ (unless specified in @rsb.conf@) |