Late Demarshalling: A Technique for Efficient Multi-language Middleware for Embedded Systems
- Author(s): Schirner, Gunar
- Harmon, Trevor
- Klefstad, Raymond
- et al.
Published Web Locationhttp://springerlink.com/link.asp?id=u18d5eq7cq4h80p2
A major goal of middleware is to allow seamless software integration across programming languages. CORBA, for example, supports multiple languages by specifying communication standards and language-specific bindings. Although this approach works well for desktop systems, it is problematic for embedded systems, where strict memory limits discourage multiple middleware implementations.
A common memory-efficient alternative allows sharing of middleware by exposing functionality through language-specific wrappers; for instance, middleware may be implemented in C++ but exposed to Java through the Java Native Interface (JNI). Like most language wrappers, however, JNI degrades performance, especially with aggregate data types.
We present “late demarshalling”: a fast, memory-efficient technique for multi-language middleware. By passing arguments at the middleware message level as a packed stream and unpacking them after crossing the language boundary, we obtain both high performance and reduced memory footprint. We provide a proof-of-concept implementation for Java and C++ with measurements showing improved performance and footprint.