Code vs Functionality

This paper compares two fundamentally different approaches to software design and development: traditional monolithic software architecture versus Snabb’s modular, polylithic approach.

To address the implications of both approaches we focus first on the mathematical relationships of the code and its functionality (info).

Traditional Monolithic Software Architecture

Characteristics:

Large programs with interwoven and entangled functions, making them inseparable and hard to test independently, as they cannot operate autonomously.

As the codebase grows, adding new functionality becomes increasingly complex due to rigid rule-based and functional inter-dependence and code repetition. It leads to exponential growth in code size (bytes) relative to functionality.

The increase in code size is proportional to the total existing codebase, leading to inefficiencies in scalability, performance, and energy use.

Implications:

Debugging is more challenging. Problems often arise from complex inter-dependence and repeated code, as reuse of similar developed software structures by simply jumping to it is limited.

Increased code size degrades performance, which leads to slower throughput and higher energy consumption.

The inherent monolithic nature of traditional software makes modifications difficult, because there is a risk of breaking other parts of the system due to tight coupling.

Snabb Polylithic Software Architecture

Characteristics:

Composed of independent, autonomous components, each encapsulating a specific functionality.

Functional software components can be tested and assembled, similar to industrial manufacturing, e.g., cars or airplanes. They can be modified and reused.

As software grows, the likelihood of reusing existing components increases, which reduces the need for new code. The ability to jump to code and reusing instead of rewriting it increases the code size logarithmically. Therefore, as functionality increases, less and less additional code is required. The change of code is therefore inverse-proportional to its functionality.

Implications:

Highly modular, allowing for pretesting each function, reducing development complexity.

Minimal debugging due to pretested and verified components before integration.

Less code for equivalent functionality results in less memory requirements, faster execution and lower energy use.

The system is inherently highly scalable, because the increase of code (bytes) is inverse-proportional to its functionality.

Mathematical Relationships

Traditional Monolithic Software: Exponential Code Accumulation and Exponential Code Change

Due to the interwoven nature of the functionality throughout the code, added functionality will greatly impact multiple parts of the existing codebase.

Summary

The Snabb software approach illustrates a paradigm shift in how functionality and code efficiency can be achieved through modular design. It enables better performance, scalability, maintainability, and energy efficiency by treating software components like interchangeable parts in a mechanical system.

This modular, or polylithic, approach contrasts sharply with traditional monolithic systems, where adding new features gets exponentially harder and bulkier. It leads to software bloat and increasing inefficiency, and where inter-dependence increases complexity, error-proneness, and maintenance

overhead as these monolithic systems grow.

Conclusion

The Snabb approach represents a modern, component-based software engineering paradigm focused on reuse, testability, and scalability. This modular design leads to exponential efficiency gains as the system grows, contrasting with the exponential complexity increase in traditional systems. It is particularly well-suited for performance-critical applications like Parallel Processing and Artificial Intelligence.

During software development, Snabb instructions are built from the many underlying CPU instructions located in microprocessors from Intel, AMD, Qualcomm, Nvidia and others. However, by implementing Snabb instructions directly into silicon, substantial improvement in speed and energy reduction can be achieved.