Inspirel banner

Programming Distributed Systems with YAMI4

1.2.6 Small Size

Some of the existing communication solutions are built with very elaborate protocols in mind, which tends to significantly increase their source and binary size.

It might be interesting to note that communication frameworks and libraries are a bit different from typical function or class libraries, where users naturally expect that the parts which are not used are not linked into the final application - this assumption means that a small subset of the used functionality contributes as a small increase in binary size of the whole application. Communication libraries very often do not support this assumption, because they have to be prepared at run-time for all possible cases that are defined in their respective protocols. This run-time dependency means that even if the final system does not rely on some particular feature of the given protocol, that feature still needs to be supported and included in the system. The reason for this is that the communication framework has no knowledge of how extensive is the protocol usage in the given application and therefore every possible path needs to be covered ``just in case''. It is not uncommon to see very simple programs that are huge in terms of binary size - this is particularly problematic on embedded systems with limited memory.

YAMI4 is small.

The YAMI4 libraries are small as a result of very simple protocol definition and due to the careful construction, which is also related to the lack of dependencies described above. A program using YAMI4 can be as much as 20 times smaller than the comparable program built with another messaging library.

The difference in size can be crucial for programs that run on limited platforms or for programs like diagnostic agents, which should be as small as possible in order not to interfere with what they are supposed to diagnose.