Towards Highly Optimized Real-time Middleware for Software Product-line Architectures

Arvind S. Krishna^{†}, Aniruddha Gokhale^{†} and Douglas C. Schmidt^{†}, Venkatesh Prasad Ranganath^{‡} and John Hatcliff^{‡}

†Dept. of Electrical Engineering and Computer Science, Vanderbilt University, Nashville, TN ‡Dept. of Computing and Information Sciences, Kansas State University, Manhattan, KS

Abstract

This paper provides the following contributions to the study of middleware optimization techniques for product line architectures in real-time systems. First, we identify different dimensions of generality in standards based middleware implementations. Second, we describe how specialization approaches used in other domains including OS, compiler and programming languages can be applied to address middleware generality challenges. Third, we present preliminary results from the application of our specialization techniques. Our results illustrate that specialization techniques represent a promising approach for minimizing time/space overheads in middleware.

1. INTRODUCTION

Emerging trends and challenges. Product-line architectures (PLA-

s) [?] are a promising technology for systematically addressing the challenges of large-scale software systems. In contrast to conventional software processes that produce separate point solutions, PLA-based processes create families of product variants [?] that share a common set of capabilities, patterns, and architectural styles. PLA based development processes are also desirable for Distributed Real-time and Embedded (DRE) systems [?, ?] that are characterized by their multiple, simultaneous constraints across different quality of service (QoS) dimensions (such as memory footprint, weight, and performance), which often makes them harder to develop, maintain, and evolve than mainstream desktop and enterprise software.

DRE systems QoS challenges have hitherto led developers to (re)invent custom applications that are tightly coupled to specific hardware/software platforms, which is tedious, error-prone, and costly to evolve over product lifecycles. During the past decade, therefore, a key technology for alleviating the tight coupling between applications and their underlying platforms has been middleware, which (1) functionally bridges the gap between applications and platforms, (2) controls many aspects of end-to-end QoS, and

(3) simplifies the integration of components developed by multiple technology suppliers.

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for pro�t or commercial advantage and that copies bear this notice and the full citation on the �rst page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior speci�c permission and/or a fee. Copyright 2001 ACM X-XXXXX-XX-X/XX/XX ...$5.00.

However, key challenges must be overcome before middleware can be applied broadly to support the QoS needs of PLA-based DRE systems. In particular, R&D is needed to help resolve the tension between (1) the generality of standards-based middleware platforms, which benefit from reusable architectures designed to satisfy a broad range of application requirements, and (2) applicationspecific product variants, which benefit from highly-optimized, custom middleware implementations. In resolving this tension, solutions should ideally retain the portability and interoperability afforded by standard middleware.

Specialization techniques for resolving middleware generality challenges. A promising solution approach to alleviate middleware generality for PLAs is the use of specialization techniques such as partial evaluation (PE). Jones et.al [?], define partial evaluation as a technique that creates a specialized version of a general program, which is more optimized for speed and size than the original program. Specialization techniques draw from and have characteristics of language mechanisms such as program optimization techniques [?], compilers [?] and program generation [?] and generative programming techniques [?].

2. OVERVIEW OF SPECIALIZATION TECH-NIQUES

Specialization approaches tailor code based on ahead of time known invariant assumptions. Consider a given program p, and inputs arg1 and arg2 as shown below.

                                                        pow (n,m): /* Computes n power m */
                                                          pre (n >= 0, m >= 0)
                                                        begin
                                                         i := 1
                                                         result = n
                                                         while (i <=m)
                                                         begin
                                                          result := result * n
                                                          i++
                                                         end
                                                         return n
                                                        end

Now given that arg2 is know a priori (the value of m is 2), i.e., it is an invariant, specialization techniques can be used to produce a corresponding program p_{spl}. The code snippet below illustrates one such specialization of p that takes only input argument arg1.

                                                        spl_pow (n): /* Computes n * n */
                                                          pre (n >= 0, m >= 0)
                                                        begin
                                                          return n * n
                                                        end

The program spl pow is called the specialization of program pow with respect to the invariance m = 2. For a given program p and