{"title":"A framework for constructing peer-to-peer overlay networks in Java","authors":"Rui Shen, Ji Wang, S. Zhang, Siqi Shen, Pei Fan","doi":"10.1145/1596655.1596662","DOIUrl":"https://doi.org/10.1145/1596655.1596662","url":null,"abstract":"Peer-to-peer emerges as a better way for building applications on the Internet that require high scalability and availability. Peer-to-peer systems are usually organized into structured overlay networks, which provide key-based routing capabilities to eliminate flooding in unstructured ones. Many overlay network protocols have been proposed to organize peers into various topologies with emphasis on different networking properties. However, applications are often stuck to a specific peer-to-peer overlay network implementation, because different overlay implementations usually provide very different interfaces and messaging mechanisms. In this paper, we present a framework for constructing peer-to-peer overlay networks in Java. First, networking is abstracted by the interfaces that use URIs to uniformly address peers on different underlying or overlay networks. Then, asynchronous and synchronous messaging support is built upon these interfaces. Finally, overlay networking interfaces are sketched to handle specific issues in overlay networks. We have constructed several overlay networks in this framework, and built peer-to-peer applications which are independent of overlay implementations.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"30 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132958543","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
A. Villazón, Walter Binder, Philippe Moret, Danilo Ansaloni
{"title":"MAJOR: rapid tool development with aspect-oriented programming","authors":"A. Villazón, Walter Binder, Philippe Moret, Danilo Ansaloni","doi":"10.1145/1596655.1596675","DOIUrl":"https://doi.org/10.1145/1596655.1596675","url":null,"abstract":"The use of low-level techniques, such as bytecode instrumentation to develop tools for profiling, debugging, testing, and reverse engineering is error-prone, time-consuming, and therefore costly. As a solution to these problems, we promote high-level aspect-oriented programming for rapid tool development so as to hide low-level instrumentation details from the developer. We show that our aspect-based approach yields concise tools that are easy to develop and extend, hence reducing development and testing costs. As enabling technology, we rely on MAJOR, a new tool for comprehensive aspect weaving, which ensures that aspects are woven into all methods executing in a Java Virtual Machine (after an initial bootstrapping phase), including methods in the standard Java class library. MAJOR also supports efficient access to a complete and customizable calling context representation thanks to the pluggable module CARAJillo. Both comprehensive aspect weaving and efficient access to calling context information are of paramount importance in the aforementioned domains.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"35 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127806665","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Philippe Moret, Walter Binder, Martin Schoeberl, A. Villazón, Danilo Ansaloni
{"title":"Analyzing performance and dynamic behavior of embedded Java software with calling-context cross-profiling","authors":"Philippe Moret, Walter Binder, Martin Schoeberl, A. Villazón, Danilo Ansaloni","doi":"10.1145/1596655.1596674","DOIUrl":"https://doi.org/10.1145/1596655.1596674","url":null,"abstract":"Prevailing approaches to analyze embedded software performance either require the deployment of the software on the embedded target, which can be tedious and may be impossible in an early development phase, or rely on simulation, which can be extremely slow. We promote cross-profiling as an alternative approach, which is particularly well suited for embedded Java processors. The embedded software is profiled in any standard Java Virtual Machine in a host environment, but the generated cross-profile estimates the execution time on the target. We implemented our approach in the customizable cross-profiler CProf, which generates calling-context cross-profiles. Each calling-context stores dynamic metrics, such as the estimated CPU cycle consumption on the target. We visualize the generated calling-context cross-profiles as ring charts, where callee methods are represented in segments surrounding the caller's segment. As the size of each segment corresponds to the relative CPU consumption of the corresponding calling-context, the visualization eases the location of performance bottlenecks in embedded Java software, revealing hot methods, as well as their callers and callees, at one glance.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"117 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116625719","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Christoph Kerschbaumer, Gregor Wagner, Christian Wimmer, A. Gal, C. Steger, M. Franz
{"title":"SlimVM: a small footprint Java virtual machine for connected embedded systems","authors":"Christoph Kerschbaumer, Gregor Wagner, Christian Wimmer, A. Gal, C. Steger, M. Franz","doi":"10.1145/1596655.1596678","DOIUrl":"https://doi.org/10.1145/1596655.1596678","url":null,"abstract":"The usage of cellular phones, PDAs, and other mobile devices has increased dramatically over the past ten years. Java is targeted to be one of the most popular execution environments on such systems. However, since mobile devices are inherently limited in terms of local storage capacity and Java requires large amounts of library code to be present on each client device, it is crucial to reduce the code and memory footprint to ensure Java's success on such systems. SlimVM's approach eliminates all unnecessary code and meta information on mobile devices.\u0000 We present a solution for the next generation of mobile computing environments for persistent connected embedded systems where all code resides on a network server and is requested at run time by the Java virtual machine on the client. All application and library code is analyzed on the server prior to execution on the mobile device, and only code essential for execution is sent to the client on demand. Java bytecode is manipulated and transferred to the client in the form of pre-linked basic blocks. Measurements show a reduction of the memory footprint of up to 70%.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"121 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131729828","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Java for high performance computing: assessment of current research and practice","authors":"G. L. Taboada, J. Touriño, R. Doallo","doi":"10.1145/1596655.1596661","DOIUrl":"https://doi.org/10.1145/1596655.1596661","url":null,"abstract":"The rising interest in Java for High Performance Computing (HPC) is based on the appealing features of this language for programming multi-core cluster architectures, particularly the built-in networking and multithreading support, and the continuous increase in Java Virtual Machine (JVM) performance. However, its adoption in this area is being delayed by the lack of analysis of the existing programming options in Java for HPC and evaluations of their performance, as well as the unawareness of the current research projects in this field, whose solutions are needed in order to boost the embracement of Java in HPC.\u0000 This paper analyzes the current state of Java for HPC, both for shared and distributed memory programming, presents related research projects, and finally, evaluates the performance of current Java HPC solutions and research developments on a multi-core cluster with a high-speed network, InfiniBand, and a 24-core shared memory machine. The main conclusions are that: (1) the significant interest on Java for HPC has led to the development of numerous projects, although usually quite modest, which may have prevented a higher development of Java in this field; and (2) Java can achieve almost similar performance to native languages, both for sequential and parallel applications, being an alternative for HPC programming. Thus, the good prospects of Java in this area are attracting the attention of both industry and academia, which can take significant advantage of Java adoption in HPC.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"9 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117021118","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Christian Wimmer, M. Cintra, Michael Bebenita, Mason Chang, A. Gal, M. Franz
{"title":"Phase detection using trace compilation","authors":"Christian Wimmer, M. Cintra, Michael Bebenita, Mason Chang, A. Gal, M. Franz","doi":"10.1145/1596655.1596683","DOIUrl":"https://doi.org/10.1145/1596655.1596683","url":null,"abstract":"Dynamic compilers can optimize application code specifically for observed code behavior. Such behavior does not have to be stable across the entire program execution to be beneficial for optimizations, it must only be stable for a certain program phase. To specialize code for a program phase, it is necessary to detect when the execution behavior of the program changes (phase change). Trace-based compilation is an efficient method to detect such phase changes. A trace tree is a collection of frequently executed code paths through a code region, which is assembled dynamically at run time as the program executes. Program execution tends to remain within such a trace tree during a stable phase, whereas phase changes cause a sudden increase in side exits from the trace tree. Because trace trees are recorded at run time by observing the interpreter, the actual values of variables and expressions are also available. This allows a definition of phases based not only on recurring control flow, but also on recurring data values. The compiler can use constant values for variables that change their value rarely and rely on phase detection to handle the case when the variable value actually changes. Our evaluation shows that phase detection based on trace trees results in phases that match the intuitive expectation of a programmer and that are also useful for compiler optimizations.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"30 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121088086","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Solve & evaluate with informa: a Java-based classroom response system for teaching Java","authors":"Matthias Hauswirth, Andrea Adamoli","doi":"10.1145/1596655.1596657","DOIUrl":"https://doi.org/10.1145/1596655.1596657","url":null,"abstract":"This paper describes the use of clickers in a Java programming course. However, instead of using ordinary hardware clickers, we use software clickers, implemented in Java, that allow for much richer problem types than the traditional multiple-choice question. The problem types we introduce in this paper give students a much higher degree of freedom in solving a problem, and thus more opportunities for making mistakes. We look at mistakes as learning opportunities, and we introduce a pedagogical approach that allows students to learn from mistakes of their peers. We finish with a case study and evaluation of our implementation of these ideas in an undergraduate Java programming course.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"4 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133914424","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"A discipline of tree processing","authors":"A. Schreiner, J. Heliotis","doi":"10.1145/1596655.1596668","DOIUrl":"https://doi.org/10.1145/1596655.1596668","url":null,"abstract":"This paper discusses a set of new tools to facilitate the implementation of language processors in Java. First, by decoupling recognition based on grammars from tree building based on semantic actions we can choose to represent grammars in BNF or EBNF, and to parse based on LL, LR, or functional engines, and still completely control how trees represent structured input. Second, we use a Java custom annotation to generate tree factories, thus encouraging a more functional approach to backend processing by tree transformation. Third, we replace the traditional visitor design pattern in the backend by a more rule-oriented approach using inheritance on tree node classes for pattern matching. Taken together, language implementation turns into a problem of tree creation and transformation with concise, Java-based notations to focus on the algorithms.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123030786","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Stack allocation of objects in the CACAO virtual machine","authors":"P. Molnár, A. Krall, F. Brandner","doi":"10.1145/1596655.1596680","DOIUrl":"https://doi.org/10.1145/1596655.1596680","url":null,"abstract":"Stack allocation of objects reduces the cost of object allocation and garbage collection and can thus lead to large reductions in runtime. Escape analysis can statically determine which objects are eligible to stack allocation by examining the escape behavior of allocation sites. If objects created at a particular allocation site do not escape, i.e., are guaranteed not to leave the scope of the allocation site, stack allocation instead of expensive heap allocation can be applied.\u0000 We have implemented a lightweight and fast escape analysis within the CACAO Java Virtual Machine to enable stack allocation. The analysis proceeds in two stages: an intraprocedural analysis computes escape information for each allocation site within a single method and builds call-context agnostic summary information for the method. The summary information is then used during interprocedural analysis to capture the escape behavior of method arguments. The computed escape information is finally used to allocate a subset of thread-local Java objects on the call stack.\u0000 The implementation has been evaluated using the SPEC JVM98 and the dacapo benchmark suites. For the SPEC benchmarks up to 90% of all objects allocated at runtime can be allocated on the call stack, leading to a speed up of up to 69%. The more complex dacapo benchmarks still show speedups of up to 10%, with up to 20% of all objects being allocated on the stack.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"58 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126895908","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Tracking performance across software revisions","authors":"Nagy Mostafa, C. Krintz","doi":"10.1145/1596655.1596682","DOIUrl":"https://doi.org/10.1145/1596655.1596682","url":null,"abstract":"Repository-based revision control systems such as CVS, RCS, Subversion, and GIT, are extremely useful tools that enable software developers to concurrently modify source code, manage conflicting changes, and commit updates as new revisions. Such systems facilitate collaboration with and concurrent contribution to shared source code by large developer bases. In this work, we investigate a framework for \"performance-aware\" repository and revision control for Java programs. Our system automatically tracks behavioral differences across revisions to provide developers with feedback as to how their change impacts performance of the application. It does so as part of the repository commit process by profiling the performance of the program or component, and performing automatic analyses that identify differences in the dynamic behavior or performance between two code revisions.\u0000 In this paper, we present our system that is based upon and extends prior work on calling context tree (CCT) profiling and performance differencing. Our framework couples the use of precise CCT information annotated with performance metrics and call-site information, with a simple tree comparison technique and novel heuristics that together target the cause of performance differences between code revisions without knowledge of program semantics. We evaluate the efficacy of the framework using a number of open source Java applications and present a case study in which we use the framework to distinguish two revisions of the popular FindBugs application.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"79 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-08-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130638821","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}