When reengineering a monolithic application to be a distributed one, programmers always have to decide how many distributed parts the application should be partitioned, and write many codes related to where a part will be placed on network nodes and how these parts communicate with each other through the network. These codes usually have nothing to do with the business functions of the application, and they are laborious to write. In addition, as the distribution architecture of the application is finalized beforehand, it may not adapt well to the everchanging execution environment. In this paper, we propose DPartner, an automatic partitioning system, to help programmers create a distributed Java application without explicitly writing the distribution-related codes. Unlike the other partitioning systems, DPartner does not partition an application directly into the coarse-grained client and server. Instead, it first partitions the application into several modules where each module performs a relatively independent business function of the application. Then it makes these modules be distributable through automatic bytecode rewriting. These modules can distribute in different nodes and cooperate to work just as the original monolithic application. Such a module-based partitioning approach enables a relatively easy reshaping of the distribution architecture of an application, which facilitates the application adapt to the environmental changes without manual recoding or repartitioning with regard to distribution. This paper gives the detailed design of DPartner, and evaluates it using real-world applications. The evaluation results demonstrate the effectiveness and efficiency of DPartner.
目前,浏览器已经成为人们接入互联网最主要的入口。HTML5、JavaScript和CSS等Web技术的发展,也极大地增强了Web应用的功能并丰富了用户的交互体验。但是,随着Web应用逻辑日益复杂,人们既要经常完成过程繁琐且需重复执行的任务,也要完成操作复杂且难以记忆的任务。因此,基于目前流行的Chrome浏览器,设计实现了一个动作捕捉与回放工具Scratch(Smart Capture-and-Replay at Chrome),以实现对Web应用操作正确、一致的捕捉与回放,并允许其他用户对已有操作记录进行定制。