blob: 3fe3e12bb9aec9cbfe266c98762142a43cdca377 [file] [log] [blame]
E. Scott Daniels06e85b72019-08-06 16:29:00 -04001.if false
2==================================================================================
E. Scott Danielsa3a121c2020-05-06 09:07:08 -04003 Copyright (c) 2019-2020 Nokia
4 Copyright (c) 2018-2020 AT&T Intellectual Property.
E. Scott Daniels06e85b72019-08-06 16:29:00 -04005
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
20.if false
21 Mnemonic: user.xfm
22 Abstract: This is the main module for the base RMR user documentation.
23 Date: 30 July 2019
24 Author: E. Scott Daniels
25.fi
26
E. Scott Danielsa3a121c2020-05-06 09:07:08 -040027.dv textfont Helvetica
28.dv textsize 10p
29.gv e XFM_PASS pass
30
31.** vars picked up by front_junk or gen_title as it's a generic module
32.dv doc_title RIC Message Router -- RMR
33.dv doc_subtitle User's Guide
34.dv orig_date 30 July 2019
35.** must reverse titles when generating rst to disambiguate in the doc list
36.dv reverse_titles 1
37
E. Scott Daniels06e85b72019-08-06 16:29:00 -040038.** setup will do the right thing with the index configuration
39.dv index_snare_file index_snatch.im
40.im ./setup.im
41
E. Scott Daniels06e85b72019-08-06 16:29:00 -040042.dv mtsid message type and subscription ID
43.dv Mtsid Message type and subscription ID
44.dv mt message type
45.dv Mt Message type
46.dv mts message types
47
E. Scott Daniels5a9d1752020-04-17 17:07:06 -040048.** --------------------------------------------------------------------------------------
E. Scott Daniels06e85b72019-08-06 16:29:00 -040049
E. Scott Danielsa3a121c2020-05-06 09:07:08 -040050&line_len( &line_size )
E. Scott Daniels06e85b72019-08-06 16:29:00 -040051&h1(Overview)
Lott, Christopher (cl778h)fe6a8562020-04-06 15:05:22 -040052
53The RIC Message Router (RMR) is a library for peer-to-peer
54communication. Applications use the library to send and receive
55messages where the message routing and endpoint selection is based on
56the message type rather than DNS host name-IP port combinations.
E. Scott Daniels06e85b72019-08-06 16:29:00 -040057The library provides the following major features:
58
59&half_space
60&indent
61&beg_list( &lic1 )
62 &li Routing and endpoint selection is based on &ital(message type.)
63 &half_space
64
65 &li Application is insulated from the underlying transport mechanism and/or protocols.
66 &half_space
67
68 &li Message distribution (round robin or fanout) is selectable by message type.
69 &half_space
70
Lott, Christopher (cl778h)fe6a8562020-04-06 15:05:22 -040071 &li Route management updates are received and processed
72 asynchronously and without overt application involvement.
E. Scott Daniels06e85b72019-08-06 16:29:00 -040073&end_list
74&uindent
75
76&space
77&h2(Purpose)
Lott, Christopher (cl778h)fe6a8562020-04-06 15:05:22 -040078RMR's main purpose is to provide an application with the ability to
79send and receive messages to/from other peer applications with minimal
80effort on the application's part. To achieve this, RMR manages all
81endpoint information, connections, and routing information necessary
82to establish and maintain communication. From the application's point
83of view, all that is required to send a message is to allocate (via
84RMR) a message buffer, add the payload data, and set the message type.
85To receive a message, the application needs only to invoke the receive
86function; when a message arrives a message buffer will be returned as
87the function result.
E. Scott Daniels06e85b72019-08-06 16:29:00 -040088
89&h2(Message Routing)
Lott, Christopher (cl778h)fe6a8562020-04-06 15:05:22 -040090Applications are required to place a message type into a message
91before sending, and may optionally add a subscription ID when
92appropriate. The combination of message type, and subscription ID are
93refered to as the &ital(message key,) and is used to match an entry in
94a routing table which provides the possible endpoints expecting to
95receive messages with the matching key.
E. Scott Daniels06e85b72019-08-06 16:29:00 -040096
97&h3(Round Robin Delivery)
Lott, Christopher (cl778h)fe6a8562020-04-06 15:05:22 -040098An endpoint from RMR's perspective is an application to which RMR may
99establish a connection, and expect to send messages with one or more
100defined message keys. Each entry in the route table consists of one
101or more endpoint groups, called round robin groups. When a message
102matches a specific entry, the entry's groups are used to select the
103destination of the message. A message is sent once to each group,
104with messages being &ital(balanced) across the endpoints of a group
105via round robin selection. Care should be taken when defining
106multiple groups for a message type as there is extra overhead required
107and thus the overall message latency is somewhat increased.
E. Scott Daniels06e85b72019-08-06 16:29:00 -0400108
109&h3(Routing Table Updates)
Lott, Christopher (cl778h)fe6a8562020-04-06 15:05:22 -0400110Route table information is made available to RMR a static file (loaded
111once), or by updates sent from a separate route manager application.
112If a static table is provided, it is loaded during RMR initialization
113and will remain in use until an external process connects and delivers
114a route table update (often referred to as a dynamic update). Dynamic
115updates are listened for in a separate process thread and applied
116automatically; the application does not need to allow for, or trigger,
117updates.
E. Scott Daniels06e85b72019-08-06 16:29:00 -0400118
119&h2(Latency And Throughput)
Lott, Christopher (cl778h)fe6a8562020-04-06 15:05:22 -0400120While providing insulation from the underlying message transport
121mechanics, RMR must also do so in such a manner that message latency
122and throughput are not impacted. In general, the RMR induced
123overhead, incurred due to the process of selecting an endpoint for
124each message, is minimal and should not impact the overall latency or
125throughput of the application. This impact has been measured with
126test applications running on the same physical host and the average
127latency through RMR for a message was on the order of 0.02
128milliseconds.
E. Scott Daniels06e85b72019-08-06 16:29:00 -0400129
130&space
Lott, Christopher (cl778h)fe6a8562020-04-06 15:05:22 -0400131As an application's throughput increases, it becomes easy for the
132application to overrun the underlying transport mechanism (e.g. NNG),
133consume all available TCP transmit buffers, or otherwise find itself
134in a situation where a send might not immediately complete. RMR
135offers different &ital(modes) which allow the application to manage
136these states based on the overall needs of the application. These
137modes are discussed in the &ital(Configuration) section of this
138document.
E. Scott Daniels06e85b72019-08-06 16:29:00 -0400139
140
141.** snarf in the major sections (to avoid one huge source document and maybe to promote reuse)
142.im general_use.im
143.im advanced_use.im
144.im failures.im
145.im config.im
146
147
148.if tfm
149 .** show all column/foot notes
E. Scott Danielsa3a121c2020-05-06 09:07:08 -0400150 &h1(Notes)
E. Scott Daniels06e85b72019-08-06 16:29:00 -0400151 .cn showend
152 &mult_space( 3 )
153.fi
154
155
156
157.dv qr_appendix A
158.pa
E. Scott Daniels5a9d1752020-04-17 17:07:06 -0400159.if "&ot" "rst" =
160&h1(Appendix &qr_appendix -- Quick Reference)
E. Scott Danielsa3a121c2020-05-06 09:07:08 -0400161 Please refer to the RMR manual pages on the Read the Docs site
162 &space
163 https://docs.o-ran-sc.org/projects/o-ran-sc-ric-plt-lib-rmr/en/latest/index.html
E. Scott Daniels5a9d1752020-04-17 17:07:06 -0400164.ei
E. Scott Danielsa3a121c2020-05-06 09:07:08 -0400165 .im api_qref.im
E. Scott Daniels5a9d1752020-04-17 17:07:06 -0400166.fi
E. Scott Daniels06e85b72019-08-06 16:29:00 -0400167
168.dv mbuf_appendix B
169.pa
170.im mbuf.im
171
172.dv gloss_appendix C
173.pa
174.im glossary.im
175
176.dv code_appendix D
177.pa
178.im code_appendix.im
179
180.** if pfm and index was setup, include it now
181.if index_here
182 .st 8p
183 &index_here
184 .st &textsize
185.fi
186.pa
187
188.** capture all interesting variables to be used as forward references during pass 2
189.ca expand start p1var_setup.ca
190 .** pass 1 variable settings -- do NOT commit to repo
191
192 .dv qr_appendix &qr_appendix
193 .dv mbuf_appendix &mbuf_appendix
194 .dv gloss_appendix &gloss_appendix
195 .dv code_appendix &code_appendix
196.ca end
197
198.qu
199glossary:
200context
201endpoint
202mt/sid
203NNG
204push back
205route table