, Federal University of Pernambuco
, Federal University of Pernambuco
Nowadays, mobile-device applications operate in a virtual sandbox that runs each application in a tightly constrained environment. The applications don't share code and can't communicate with each other. This environment offers more security by preventing users from downloading buggy, malicious, or virus-infected code, but it lacks the flexibility, changeability, and maintainability that mobile-device applications require. The industry needs an open standard to integrate these application models in a device middleware that provides the applications' shared components.
We've created D-Mid (Device Middleware) to support mobile applications built on different programming languages but running on the same device. D-Mid lets the applications communicate with each other. In a typical scenario, it can integrate a Java application—well known for its ability to manipulate interfaces—with a C++ application executing in the same device to improve that application's performance. You can also dynamically customize D-Mid components.
We implemented D-Mid in Java, building it on top of the OGSi framework. 1 It addresses typical embedded application problems, such as runtime updates, component orientation, and execution-environment heterogeneity. It also addresses the interoperability of heterogeneous applications, satisfying the following requirements:
To achieve these requirements, our architecture leverages the OSGi framework, creating a bridge between Java and C++ application-model sandboxes to enable their communication (see figure 1).
Figure 1 A general overview of D-Mid.
We considered three basic issues when designing D-Mid. First, we wanted to provide a language-independent communication mechanism, so D-Mid uses intradevice peer-to-peer communication based on IPC (InterProcess Communication) to integrate the Java and C++ sandboxes. To overcome IPC mechanisms' portability constraints, the details of the communication channels (marshalling and unmarshalling) are hidden from the peers, encapsulating the middleware-specific functionality.
Second, to perform reconfiguration tasks, D-Mid contains a context that changes with time. The Java component contains information that describes D-Mid's services and managed components.
Finally, D-Mid contains a lightweight Inversion of Control mechanism that can discover registered OSGi services based on the requested service name. At each C++ application request, the OSGiBridge identifies the received command ( remove, update, install, or invoke), creates a JMessage, and calls the proper BridgeContext action for the command.
D-Mid brings adaptation to mobile-device software by giving Java applications access to native codes. It also lets C++ applications evolve and adapt at runtime by letting them change the middleware's software components and add and invoke new services.
Next-generation mobile applications will bring scalable, complex, and collaborative enterprise solutions into the market, which will require a middleware layer. A mobile enterprise-resource-planning system is a good example of an end-user application suitable for D-Mid. The system client running on a Symbian device with a native look-and-feel could leverage D-Mid by having all the business components on an OSGi framework, so the business process could evolve or even fix bugs at runtime.
Cite this article: André Elia Assad and Nelson Souto Rosa, "Device Middleware for Mobile Applications," IEEE Distributed Systems Online, vol. 8, no. 8, 2007, art. no. 0708-mds20070800012.