Middleware for MDSD
Last Updated (Wednesday, 16 June 2010 22:17) Written by Thomas Schütz Monday, 05 April 2010 18:42
In MDSD it doesn't make sense to generate all parts of a system completely. For invariant parts like a communication infrastructure a base layer is needed. Depending on the application domain this can reach from a small C library with a footprint of only a couple of kilobytes in memory to a powerful CORBA based middleware. The development of a middleware for the generated code adds further requirements.
Generated code and runtime environment
A major purpose of MDSD is reaching a higher level of abstraction. As a consequence models are typically more abstract than the implementation languages (e.g. C++, C, Java, …). This gap between a DSL and its implementation language can be closed by the introduction of appropriate frameworks or middleware. Examples are frameworks for state machines or components. The generated code then uses base classes and mechanisms provided by the framework. Sometimes this is also called a runtime environment for the generated code.
The middleware and runtime environment provides mechanisms for a number of typical requirements:
Communication
A major purpose of a middleware is the provisioning of communication mechanisms. Depending on requirements the best suited solution has to be picked from a variety of possibilities (synchronous, asynchronous, message based, function calls, global variables and others).
Debugging / Tracing
Special mechanisms for debugging and tracing allow problem analysis on the model level. Thus the modeller also for this important part of his work doesn't have to leave the most appropriate level of abstraction. Examples are animated state machines, recording of sequence diagrams and data inspection and modification.
Distribution
Essential for a distributed application is an infrastructure which controls the life cycle and connection of all nodes in the system.
Platform abstraction / Portability
Since it doesn't make sense to adapt the code generator for every new platform usually the middleware introduces an easily portable platform abstraction layer.
Compiler / Interpreter
There are several ways to turn a sufficiently formalized model into an executable system:
- code generation, compiling and linking
- code generation and interpretation
- direct interpretation of the model
For some tasks it makes sense to directly interpret the model rather than generating code to be compiled or interpreted. To this end an appropriate interpreter has to be developed which is able to directly interpret the model.




