Communications in computer and information science vol:69
Evaluation of novel approaches to software engineering edition:1 pages:75-90
The Open Services Gateway initiative (OSGi) is a platform for running service-oriented Java applications. OSGi provides a central service registry to allow application components (so-called bundles) to share functionality. From the viewpoint of programming language development, OSGi leaves a lot of room for improvement. Its service query language, for instance, bypasses important compile-time guarantees and it works only for service metadata that never changes during the lifetime of a service. A second problem is that the event notification system requires programmers to write a considerable amount of boilerplate logic for reacting to service events. This obfuscates the business logic, which in turn decreases code comprehension and increases the odds for introducings bugs when implementing client-service interactions.
This paper evaluates OSGi as a platform for programming client-service interactions in Java. After focusing on problems that relate to OSGi’s integrated service query language and its event notification system, we propose a solution based on a programming language extension. We also show how this extension is transformed to regular Java code so as to maintain interoperability with the OSGi specification.