Optimizing Java Based Web Services by Partial Evaluation * Lin Lin 1 , Linpeng Huang 2 , Yongqiang Sun 2 Dept. of Computer Science Shanghai Jiao Tong University Shanghai, 200030, China 1 linker_lin03@hotmail.com 2 {huang-lp, sun-yq}@cs.sjtu.edu.cn Abstract. Recently, web service is growing more and more popular. Java is a representative language to implement web based services. But its platform independency slows its running speed. Partial evaluation can be used to improve Java bytecode efficiency. In this paper, we present a distributed Java bytecode partial evaluation architecture to accelerate Java based web service running speed by optimizing service according to certain context or, if possible, localizing remote service. Our distributed partial evaluator is based on SOAP message passing. Finally our experiment result of a RMI service shows that the partial evaluator can optimize Java based web services as we have expected. 1 Introduction Partial evaluation is a program optimization technology. Generally speaking, partial evaluation uses a kind of algorithm which, when given a program and some of its input data (called static inputs), produces a residual program. The residual program must meet the constraint that when running it on the remaining input data (called dynamic inputs), we will get the same result as running the original program on all its input data (including both static and dynamic inputs). Though partial evaluation technology has been applied to lots of languages, such as logic languages, imperative languages, etc, it is used in object oriented languages, especially Java, only within a few years. Shultz and Lawall have constructed a partial evaluator called Jspec [1] , which utilizes Harissa and Tempo [2] . Masuhara and Yonezawa from Tokyo University proposed Bytecode Specialization [3] , which specialize program of JVML subset at run-time. In software engineering, many software architectures are presented to aid software developing. They accelerate software development, but lead to low efficiency of software running. By applying partial evaluation to software engineering, software developer can optimize software architecture under certain context so that they can obtain both developing speed and running speed. Because of the great computing potential of network, more and more software applications are based on internet. They * Supported by the National High Technology Development Program of China under Grant No. 2001AA113160