This is a preface to the RSC articles on CodeProject.
RSC is an open-source framework for developing robust C++ applications. Its repository contains over 230K lines of code organized into static libraries. Each static library is implemented in its own namespace so that the layer to which code belongs will be clear.
The .zip file attached to an article contains most of the repository but excludes the output directory, which only contains files that are generated when running tests.
An article's .zip file seldom contains RSC's latest release. It is usually updated only when the code that it discusses has evolved.
The Releases page lists stable releases. Unless a release only changed documentation, it includes executables. However, RSC must be properly installed to run them. See the installation guide.
Unless otherwise noted, the code in an article resides in the namespace
NodeBase
, which is implemented in the nb directory. NodeBase
is RSC's lowest layer. It contains about 55K lines of code and provides
base classes for things such as
- initialization/reinitialization
- configuration
- multi-threading
- object pooling
- CLI commands
- logging
- debugging
RSC usually defines a class in a .h of the same name and implements it in a .cpp of the same name. It should therefore be easy to find the code that an article discusses.
RSC can run on either Windows or Linux, which are supported by an abstraction layer that should allow RSC to be ported to other platforms with modest effort. The Windows and Linux targets (in *.win.cpp and *.linux.cpp files) total less than 1600 lines of code each, excluding comments and blanks.
When building on RSC, you'll always use NodeBase
. If your application
uses UDP- or TCP-based protocols, investigate the namespace NetworkBase
in the nw directory, and the namespace SessionBase
in the
sb directory. There are currently no articles about those layers,
but some documents discuss them.
If you don't want to build on RSC, you can copy and modify its code to meet your needs, subject to the terms of its GPL-3.0 license. But because RSC is an integrated framework, you'll have some work to do. Unlike a library, RSC's classes collaborate freely rather than being designed for standalone use.
The code in an article omits details that are irrelevant to the article's purpose. They are nonetheless important and need to be considered if copying and modifying RSC software. These details include
- configuration parameters, logs, alarms, and statistics, as described in Robust C++: Operational Aspects;
- memory types, as described in Robust C++ : Initialization and Restarts; and
- trace tools, as described in Debugging Live Systems.
You probably found your first RSC article because its topic interested you. For an overview of RSC, read Software Techniques for Lemmings, which discusses the rationale behind various aspects of its design.
And if you find RSC useful or interesting, please give this repository a star by clicking on the button at the upper right of this page.