1 .** vim: ts=4 noet sw=4:
3 ==================================================================================
4 Copyright (c) 2019 Nokia
5 Copyright (c) 2018-2019 AT&T Intellectual Property.
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ==================================================================================
23 Mnemonic: config-deploy.xfm
24 Abstract: Source to generate a configuration deployment guide.
26 Author: E. Scott Daniels
31 &h1(RMR Developer Guide)
33 The RIC Message Router (RMR) is a library for peer-to-peer
34 communication. Applications use the library to send and receive
35 messages where the message routing and endpoint selection is based on
36 the message type rather than DNS host name-IP port combinations.
38 This document contains information that developers need to know to
39 contribute to the RMR project.
42 RMR is written in C, and thus a contributing developer to the core
43 library should have an excellent working knowledge of C. There
44 currently is one set of cross-languages bindings supporting Python,
45 and a developer wishing to contribute to the bindings source should be
46 familiar with Python (version 3.7+) and with the Python &ital(ctypes)
50 RMR is designed to provide an insulation layer between user
51 applications and the actual transport mechanism. Initially RMR was
52 built on top of the third-party library Nanosmg, shortly after was
53 ported to the third-party library NNG (Nanomsg Next Generation), and
54 then was ported to an internally developed socket library called SI95.
55 RMR presents the same API to the user application regardless of the
56 underlying transport library, but the resulting output when compiling
57 RMR is always a transport-specific library. As an example,
58 &cw(librmr_nng.a) is the library generated for use with the NNG
61 As such the library source is organised into multiple components:
63 &beg_dlist(.75i : ^&bold_font )
65 &di(common) Source in the common directory is agnostic to the
66 underlying transport mechanism (Nanomsg, NNG, SI95, ..), and
67 thus can be used when generating either library.
69 &di(nano) Source which is tightly coupled with the underlying Nanomsg library.
70 (Nanomsg has been deprecated, but the RMR source remains as an example.)
72 &di(nng) Source which is tightly coupled with the underlying NNG library.
73 (NNG has been deprecated, but the RMR source remains as an example.)
75 &di(si) Source which is tightly coupled with the underlying SI95 library.
80 &h3(Internal Function Exposure)
81 The decision to limit as much as practical the exposure of truly
82 internal RMR functions was made, and as a result most of the RMR
83 functions carry a &cw(static) label. In order to modularise the code
84 as much as possible, this means that the primary module
85 (e.g. rmr_nng.c) directly includes other RMR modules, rather than
86 depending on referencing the internal functions during linking. While
87 this is an infrequently used approach, it does mean that there are
88 very few functions visible for the user application to reference, all
89 of them having the prefix &cw(rmr&{esc}_). This allows internal
90 functions to have shorter names while still being meaningful.
93 There is a list of coding style guidelines in the top level directory,
94 and as such they are not expanded upon here. The general practice is
95 to follow the style when editing an existing module, respect the
96 author's choice where style alternatives are not frowned upon. When
97 creating new modules, select a style that fits the guidelines and is
98 easy for you to work with. There are a few things that the RMR
99 maintainers insist on, but for the most part style is up to the
103 RMR is constructed using CMake. While CMake's project description can
104 be more cumbersome than most typical Makefiles, the tool provides
105 convenience especially when it comes to creating DEB/RPM packages.