| Project LongJump — an Architecture for Low Cost, Secure Internet and Wireless Services | ||
|---|---|---|
| <<< Previous | The LongJump Architecture | Next >>> |
Simplicity is the most powerful tool for achieving software reliability. As a program becomes more complex, the number of bugs tend to increase geometrically — as does the required effort to test the entire system.
Object Oriented techniques — when used correctly — are an effective tool for simplifying software. It is beyond the scope of this document to delve deeply into the general principles of Object Oriented Design. It is possible, however, to state the important technological goal of such activity. Object Oriented interfaces act like firebreaks inside a forest — they stop the uncontrolled propagation programming errors across subsystems. A good Object Oriented architecture also ensures local simplicity throughout the program, even if the overall behavior is globally complex.
When searching for specific local simplification techniques, few areas are as fruitful as hard real-time software design. Hard real-time systems (such as those used in robotics or industrial process control) must meet the heavy requirements of deterministic behavior, often on very limited hardware. Work on these systems teaches many excellent lessons on the value of simplicity — lessons that could be beneficially applied to any software project.
Hard real-time design principles include many ideas for effective hardware utilization, including memory management techniques such as cached and static allocators. These algorithms simplify a program's use of memory, thus increasing performance and predictability. Hard real-time systems also tend to create objects at specific times (usually during startup). Once again, the goal is to simplify the program — at the expense of wasting some resources, the most important operational parts become far more predictable in their behavior. In contrast, a system that creates components "on-the-fly" must deal with the consequences of these operations failing at a critical moment.
To make good use of hard real-time principles, the LongJump architecture specifies a C++ core for the server. The explicit resource utilization strategy made possible by C++, together with its rich Object Oriented feature set, allows a straightforward, extensible implementation of these ideas.
Reliability is further enhanced by allowing Python components to be built around the C++ core. Python enables many complex operations to be expressed with very few, clean lines of code. Less code means fewer chances for programmer error — which improves reliability.
While the interpreted Python incurs a high performance penalty over the compiled C++, it is important to remember that only 20% of a typical program constitutes its bottleneck. Thus, it is logical to use the hard real-time design principles (implemented in C++) to focus on the 20% of the code that requires maximum performance. For the rest of the system, Python's ability to implement complex functionality in a concise and straightforward way can be safely used to further enhance reliability.
| <<< Previous | Home | Next >>> |
| Anatomy of a Request | Up | License |