affdf244be64efc2ea36a18b63b83972ed530e3f
[ric-plt/lib/rmr.git] / doc / src / man / rmr.7.xfm
1 .if false
2 ==================================================================================
3         Copyright (c) 2019 Nokia
4         Copyright (c) 2018-2019 AT&T Intellectual Property.
5
6    Licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8    You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17 ==================================================================================
18 .fi
19 .if false
20         Mnemonic        rmr.7.xfm
21         Abstract        The manual page for the whole RMr library
22         Author          E. Scott Daniels
23         Date            29 January 2019
24 .fi
25
26 .** if formatting with tfm, the roff.im will cause roff output to be generated
27 .** and rst.im will cause rst to be generated depending on OUTPUT_TYPE env
28 .** var.
29 .** if formatting with pfm, then pretty postscript will be generated
30
31 .gv e LIB lib
32 .if pfm
33         .im &{lib}/generic_ps.im
34 .ei
35         .gv e OUTPUT_RST use_rst
36         .if .ev &use_rst 1 =
37                 .im &{lib}/rst.im
38         .ei
39                 .im &{lib}/roff.im
40         .fi
41 .fi
42
43 &line_len(6i)
44
45 &h1(RMr Library)
46 &h2(NAME)
47         RMr -- Ric Message Router Library
48
49 &h2(DESCRIPTION)
50 RMr is a library which provides  a user application with the ability
51 to send and receive messages to/from  other RMr based applications
52 without having to understand the underlying messaging transport environment (e.g. Nanomsg)
53 and without needing to know which other endpoint applications are currently
54 available and accepting messages.
55 To do this, RMr depends on a routing table generated by an external source.
56 This table is used to determine the destination endpoint of each message sent by mapping the
57 message type T (supplied by the user application) to an endpoint entry.
58 Once determined, the message is sent directly to the endpoint.
59 The user application is unaware of which endpoint actually receives the
60 message, and in some cases whether that message was sent to multiple
61 applications.
62
63 &space
64 RMr functions do provide for the ability to respond to the specific source
65 instance of a message allowing for either a request response, or call
66 response relationship when needed. 
67
68
69 &h3(The Route Table)
70 The library is supplied with a route table which maps message numbers to
71 endpoint groups such that each time a message of type T is sent, the message
72 is delivered to one member of each group associated with T.
73 For example, message type 2 might route to two different groups where
74 group A consists of worker1 and worker2, while group B consists only of
75 logger1.
76
77 &space
78 It is the responsibility of the route table generator to know which endpoints
79 belong to which groups, and which groups accept which message types.
80 Once understood, the route table generator publishes a table that is ingested
81 by RMr and used for mapping messages to end points.
82
83 &h3(Environment)
84 To enable configuration of the library behaviour outside of direct user application
85 control, RMr supports a number of environment variables which provide information
86 to the library. 
87 The following is a list of the various environment variables, what they control
88 and the defaults which RMr uses if undefined.
89
90 &beg_dlist(.75i : ^&bold_font )
91 &di(RMR_BIND_IF) This provides the interface that RMr will bind listen ports to allowing
92         for a single interface to be used rather than listening across all interfaces.
93         This should be the IP address assigned to the interface that RMr should listen
94         on, and if not defined RMr will listen on all interfaces.
95
96 &di(RMR_RTG_SVC) RMr opens a TCP listen socket using the port defined by this
97         environment variable and expects that the route table generator process
98         will connect to this port.
99         If not supplied the port 4561 is used.
100
101 &di(RMR_RTG_ISRAW) Is set to 1 if the route table generator is sending "plain" messages
102         (not using RMr to send messages, 0 if the rtg is using RMr to send. The default
103         is 1 as we don't expect the rtg to use RMr.
104
105 &di(RMR_SEED_RT) This is used to supply a static route table which can be used for
106         debugging, testing, or if no route table generator process is being used to
107         supply the route table. 
108         If not defined, no static table is used and RMr will not report &ital(ready)
109         until a table is received.
110 &end_dlist
111
112
113 &h2(SEE ALSO )
114 .ju off
115 rmr_alloc_msg(3),
116 rmr_tralloc_msg(3),
117 rmr_call(3),
118 rmr_free_msg(3),
119 rmr_init(3),
120 rmr_init_trace(3),
121 rmr_get_src(3),
122 rmr_get_srcip(3),
123 rmr_get_trace(3),
124 rmr_get_trlen(3),
125 rmr_payload_size(3),
126 rmr_rcv_msg(3),
127 rmr_rcv_specific(3),
128 rmr_rts_msg(3),
129 rmr_ready(3),
130 rmr_fib(3),
131 rmr_has_str(3),
132 rmr_tokenise(3),
133 rmr_mk_ring(3),
134 rmr_ring_free(3),
135 rmr_set_trace(3),
136 rmr_torcv_msg(3),
137 rmr_wh_open(3),
138 rmr_wh_send_msg(3)
139 .ju on
140
141
142 .qu