Middleware and Multicore Architecture: Challenges and Potential Enhancements from Software Engineering Perspective Saleh M. Alnaeli Department of Computer Science University of Wisconsin-Fox Valley Menasha, Wisconsin, USA saleh.alnaeli@uwc.edu Abstract—An empirical study that examines challenges middleware software systems have to take full advantages of multicore technology is presented. The study is conducted on 9 open source middleware systems containing over 3.39 million lines of code. Each system is analyzed and the inhibitors to parallelization are detected and presented. Additionally, some challenges in analyzing, adapting, and re-engineering middleware systems to better utilize modern multi-core architectures are determined including function side effects. Function side effects categorized based on their types and the complexity they pose in conducting inter-procedural static analysis. The data shows that the most prevalent inhibitor by far is functions called within for- loops that have side effects. Moreover, the study shows that parameters by reference and global variables modification are the most prevalent side effects that poses the greatest challenges in re- engineering middleware systems to improve their parallelizability to better utilize multi-core architectures. That is, conducting accurate program analysis with existing software engineering tools becomes exigent and impractical with those side effects. The study suggests some software engineering techniques (e.g., refactoring) that have the potential to improve the parallelizability of middleware systems. Index Terms—Middleware, software engineering, multicore architecture, parallelization inhibitors, function side effects. I. INTRODUCTION The demand for the distributed systems that run on different machines, operating systems, underlining architectures, and networks, (e.g., the best gamming software, or just about any software “on the cutting edge”) has exploded in recent years. As these applications and systems are getting more complex and sophisticated, middleware is being utilized as major building block for the development of future software systems. Systems and software producers have started relying on middleware as a solution to this demand since it involves minimal programming. Therefore, they can produce cost-effective solutions within a short time and minimal risk [1]. In the software engineering community, middleware has shown to greatly enhance developer’s productivity by hiding much of the intricacy associated with writing complex applications, rather than relying purely on programming language aids and customized library support [2, 3]. Recently, middleware software systems have become available at an ever- increasing rate and have enhanced our way of programming and thinking. No more is middleware just about bringing together different hardware and software components, rather, it is about saving time and helping developers focus on the specific purpose of their application. By allowing them to concentrate on the most important aspects of the systems, developers can save time and still deliver high quality. With the explosion of modern multicore architectures and their omnipresence in today’s devices, middleware software engineers have been pushed to rethink how the code they write can better utilize the underlying hardware toward multicore- capable middleware. Since most of the existing middleware systems were developed with sequential processors in mind, they typically make inefficient use of the multicore technology. The problem gets worse as the number of cores increases, which may reduce individual core speed, causing drastic slowing in sequential software speed. As a result, many developers are starting to feel that they are at the mercy of middleware designers to ensure acceptable performance for their systems when they use middleware. Knowing this is motivating middleware developers to modify their products to enable parallel execution to take advantage of underlying hardware. The process of parallelizing a software system is typically done with one of the standard APIs such as OpenMP. These APIs provide the developer with a set of tools to parallelize loops and take advantage of multiple cores and shared memory [4, 5]. Current C/C++ compilers can do a limited amount of automatic parallelization. That is, loops with fixed iteration bounds (i.e., for-loops) can, in certain situations, be directly parallelized by the compiler. Loops without fixed iteration bounds cannot, in general, be parallelized. The auto-parallelization can also take place via a tool prior to compiling. These tools look for for-loops that do not contain any parallelization inhibitors [6, 7]. For middleware software systems, many obstacles can prevent it from being parallelized. Those challenges vary in their impact and nature. Some difficulties are caused by the way developers write their source code and others are due to the environments the middleware work on. However, in the end, the full potential of multicore processor architectures will require a deeper analysis and assessment of the middleware application to adapt the source code for scalable concurrency. Middleware designers that address these concerns will be able to produce a middleware software system that will benefit the most and take Sam B. Binder Department of Computer Science University of Wisconsin-Fox Valley Menasha, Wisconsin, USA Binds8695@students.uwc.edu Amanda D. Ali Taha Department of Computer Science University of Wisconsin-Fox Valley Menasha, Wisconsin, USA ricea9147@students.uwc.edu