GLA Summit 2021/Application Messaging Manager – an intuitive and simple solution for modular and scalable software
Application Messaging Manager - an intuitive and simple solution for modular and scalable software by Alex Bugnar
The key to be able to design modular and scalable software is the way information is exchanged between its components (e.g., data acquisition module, data logging module, user interfaces etc). Essentially, it is the answer to the question: What information is available where and when? This need for information exchange also creates dependencies or coupling between the components. Such issues are commonly resolved through the use of queues, notifiers or user events but these implementations are often specific to the software being developed and have to be recreated for each new software. An alternative tool is the Actor Framework, which is a great generic solution but it's also quite hard to master and has a steep learning curve. I will be presenting a much simpler and more intuitive alternative to the Actor Framework, called the Application Messaging Manager or AMM, which is based on the principle of a network with star topology and addressing using the nodes' names. It comes in the form of a library which contains a single class through which all functionality is implemented. Each component of a software instantiates an object of this class and specifies an AMM name. All components which specify the same AMM name will become nodes in the same network, managed by that AMM. Each component goes live in the network by registering with the AMM and specifying its own name and optionally, a list of notifications to which it wants to subscribe. After this, each component can perform point-to-point communication by using another component's name (Command and Response messages), send Broadcast messages intended for all registered components or send Notification messages intended for all registered components which have subscribed to a particular notification. The communication protocol (attributes of messages, including type of data they carry) is completely user defined. Using the Application Messaging Manager, it's possible to easily create fully independent components which can work as part of a software, without them having to be aware of what other components are part of that software. This allows for modularisation of the software and ease of adding additional components when new functionality is required.