TCPTransport » History » Version 1
S. Wrede, 10/17/2011 09:25 PM
1 | 1 | S. Wrede | h1. TCP-based Transport |
---|---|---|---|
2 | 1 | S. Wrede | |
3 | 1 | S. Wrede | h2. Prerequisites |
4 | 1 | S. Wrede | |
5 | 1 | S. Wrede | # Check that the socket / TCP transport connector is part of your RSB installation (currently only available in Trunk) |
6 | 1 | S. Wrede | # You can do this by calling @rsb_version --verbose@ |
7 | 1 | S. Wrede | # Look through the installed connectors and ensure that the socket connector is available as shown in the following console output |
8 | 1 | S. Wrede | |
9 | 1 | S. Wrede | <pre> |
10 | 1 | S. Wrede | sericit:server swrede$ rsb_version --verbose |
11 | 1 | S. Wrede | Version: 0.5.0, build 2871 (DATE 2011-10-17 20:57:29 +0200 (Mon, 17 Oct 2011)), abi 2 |
12 | 1 | S. Wrede | |
13 | 1 | S. Wrede | |
14 | 1 | S. Wrede | Default Configuration |
15 | 1 | S. Wrede | rsb::ParticipantConfig[qosSpec = QualityOfServiceSpec[ordering = 10, reliability = 20], errorStrategy = 0, transports = {Transport[name = socket, converters = {}, options = p{ enabled: "1", server: "1" }], Transport[name = spread, converters = {}, options = p{ enabled: "0" }], Transport[name = inprocess, converters = {}, options = p{ enabled: "0" }]}, eventReceivingStrategy = rsb::ParticipantConfig::EventProcessingStrategy[name = parallel, options = p{ }], eventSendingStrategy = rsb::ParticipantConfig::EventProcessingStrategy[name = direct, options = p{ }], options = p{ }]] |
16 | 1 | S. Wrede | |
17 | 1 | S. Wrede | Connectors |
18 | 1 | S. Wrede | ConnectorFactory<rsb::transport::InPullConnector>[ |
19 | 1 | S. Wrede | ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}] |
20 | 1 | S. Wrede | ] |
21 | 1 | S. Wrede | ConnectorFactory<rsb::transport::InPushConnector>[ |
22 | 1 | S. Wrede | ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}] |
23 | 1 | S. Wrede | ConnectorInfo[socket, schemas = {socket}, options = {host, port, server, enabled}] |
24 | 1 | S. Wrede | ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}] |
25 | 1 | S. Wrede | ] |
26 | 1 | S. Wrede | ConnectorFactory<rsb::transport::OutConnector>[ |
27 | 1 | S. Wrede | ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}] |
28 | 1 | S. Wrede | ConnectorInfo[socket, schemas = {socket}, options = {enabled}] |
29 | 1 | S. Wrede | ConnectorInfo[spread, schemas = {spread}, options = {host, maxfragmentsize, port, enabled}] |
30 | 1 | S. Wrede | ] |
31 | 1 | S. Wrede | |
32 | 1 | S. Wrede | Converters |
33 | 1 | S. Wrede | Repository<std::string>[ |
34 | 1 | S. Wrede | .* <-> bytearray : rsb::converter::ByteArrayConverter[wireType = std::string, wireSchema = .*, dataType = bytearray] |
35 | 1 | S. Wrede | bool <-> bool : rsb::converter::BoolConverter[wireType = std::string, wireSchema = bool, dataType = bool] |
36 | 1 | S. Wrede | portstatechange <-> portstatechange : rsb::introspection::IntrospectionConverter[wireType = std::string, wireSchema = portstatechange, dataType = portstatechange] |
37 | 1 | S. Wrede | uint64 <-> unsigned long long: rsb::converter::Uint64Converter[wireType = std::string, wireSchema = uint64, dataType = unsigned long long] |
38 | 1 | S. Wrede | utf-8-string <-> std::string : rsb::converter::StringConverter[wireType = std::string, wireSchema = utf-8-string, dataType = std::string] |
39 | 1 | S. Wrede | void <-> void : rsb::converter::VoidConverter[wireType = std::string, wireSchema = void, dataType = void] |
40 | 1 | S. Wrede | ] |
41 | 1 | S. Wrede | </pre> |
42 | 1 | S. Wrede | |
43 | 1 | S. Wrede | h2. Usage |
44 | 1 | S. Wrede | |
45 | 1 | S. Wrede | *Warning: This is an experimental connector!" (only available in C++) |
46 | 1 | S. Wrede | |
47 | 1 | S. Wrede | Processes are configured in server and client modes. Therefore, you currently have to add separate @rsb.conf@ files in the working directory of the separate processes. |
48 | 1 | S. Wrede | |
49 | 1 | S. Wrede | The basic client configuration (on a single host) looks as follows: |
50 | 1 | S. Wrede | <pre> |
51 | 1 | S. Wrede | [transport.socket] |
52 | 1 | S. Wrede | enabled = 1 |
53 | 1 | S. Wrede | server = 0 |
54 | 1 | S. Wrede | [transport.inprocess] |
55 | 1 | S. Wrede | enabled = 0 |
56 | 1 | S. Wrede | [transport.spread] |
57 | 1 | S. Wrede | enabled = 0 |
58 | 1 | S. Wrede | </pre> |
59 | 1 | S. Wrede | |
60 | 1 | S. Wrede | For the server config just change the server line to @server = 1@. |
61 | 1 | S. Wrede | |
62 | 1 | S. Wrede | In order to use this connector for remote communciation, you also have to specify @host@ and if necessary @port@ fields. |