based real-time collaborative programming with the support of the RECIPE ... To train customers or to diagnose and resolve software problems, customer support .... Firstly, Haifeng started a debugging session to debug his Java program ...
RECIPE: a prototype for Internet-based real-time collaborative programming Haifeng Shen and Chengzheng Sun School of Computing and Information Technology Griffith University QLD 4111, Australia {Hf.Shen, C.Sun}@cit.gu.edu.au
Abstract Internet-based real-time collaborative programming allows physically dispersed programmers to concurrently and collaboratively design, code, test, debug and document the same program. This technology is more and more demanded in nowadays software development. In this paper, we present an overview of the RECIPE (REal-time Collaborative Interactive Programming Environment) prototype system, which was developed to serve as a vehicle to motivate and evaluate our research in the area of Internet-based real-time collaborative programming environments. A working scenario is used to illustrate Internetbased real-time collaborative programming with the support of the RECIPE prototype system.
I. Introduction Large-scale software development requires more and more programmers to work on the same project. Team programming [2] where a large, complex system is divided into several individual programming tasks to be fulfilled by individual programmers or subgroups is therefore being used for nowadays large-scale software development. Internet-based real-time collaborative programming, on the other hand, allows physically dispersed programmers to work concurrently and collaboratively on the same programming task for design, coding, debugging, testing and documentation. Previous study [2,8] found that collaborative programming can not only accelerate the problem-solving processes, but also improve the quality of the software products.
Internet-based real-time collaborative programming is more and more demanded due to the following reasons:
1
1. For geographically dispersed programmers working on the same project, it is more costeffective to work collaboratively than work separately. 2. To produce high quality software products in a short time, professional programmers working collaboratively can outperform individual programmers working separately [2]. 3. To train customers or to diagnose and resolve software problems, customer support engineers or system administrators need to work remotely and collaboratively with the customers at customers' computers [7].
The goal of our research is to investigate and develop innovative technologies and environments for supporting Internet-based real-time collaborative programming. The RECIPE (REal-time Collaborative Interactive Programming Environment) prototype system was developed to be a vehicle for driving and demonstrating our research in this area.
In this paper, an overview of the RECIPE prototype system is presented. The system architecture and main components of the RECIPE prototype system are described in Section II. Main features of the system are explained in section III. A working scenario of Internet-based real-time collaborative programming with the support of the RECIPE system is illustrated in Section IV. At last, summary of this paper and future work are given in section V.
II. System architecture and main components The RECIPE prototype system employs a centralized architecture. In this architecture, inputs from all cooperative participants are merged and sent to a single instance of the shared application and any output of the shared application is broadcast to all participants. A real-time collaborative programming session should consist of a RECIPE Server and several RECIPE Sites. The RECIPE Server is a Java application responsible for cooperative membership and session management. The RECIPE Sites are Java applets downloaded from the server to run on any machines connected to the Internet. The RECIPE Sites are responsible for sending inputs to and receiving outputs from the RECIPE Server. An Internet-based real-time collaborative programming session with two RECIPE Sites, each RECIPE Site with one sharable Unix shell session and one sharable debugging session, is illustrated in Figure 1.
2
SC
SCH
SCH IMD
VSH
IMD
SHELL
DEBUGGER
OCB
OCB
RECIPE Site
VSH
SHELL
DEBUGGER
OCB
OCB
RECIPE Site
Figure 1 An Internet-based collaborative programming session with two RECIPE Sites, each RECIPE Site with one sharable Unix shell session and one sharable debugging session
The RECIPE Server has a Server Connector (SC) component, which resides at a well-known Internet address, waiting for the connection request from any RECIPE Site over the Internet. Once a connection request is accepted, a thread called Server Connection Handler (SCH) is created by the SC to serve that RECIPE Site while the SC keeps waiting for new connection requests. Each SCH has an Input Merger and Distributor (IMD) component, which is responsible for merging inputs from cooperative RECIPE Sites and distributing the merged inputs to different components. Concretely, Unix shell inputs are forwarded to the Unix shell (SHELL) component, debugging inputs are forwarded to the corresponding debugging (DEBUGGER) components, and the RECIPE built-in commands are forwarded to the Virtual Shell (VSH) component for interpretation. The SHELL component manages a Unix shell process and each DEBUGGER component manages a debugging process. The SHELL component and each DEBUGGER component have the Output Collector and Broadcaster (OCB) components collecting outputs from the Unix shell process and the debugging processes and broadcasting the collected outputs to the cooperative RECIPE Sites.
3
III. Main features of the system The RECIPE prototype system was developed to support Internet-based real-time collaborative programming and serve as a vehicle for driving and demonstrating our research this area. It has the following characteristics: •
Collaboration transparency. Existing single-user compilers and debuggers can be easily converted to multi-user collaborative applications without any change to the applications’ executables.
•
Flexible access control. The RECIPE prototype system deploys a request/authorize access control policy for the multi-user collaborative environment. When a user wants to join a session, he needs to send a joining request to the session chairman who started the session. The session chairman can grant the user with full permissions (i.e., view and participate), grant the user with restricted permission (i.e., view only), or refuse the joining request.
•
Extensibility. Existing real-time cooperative group editors, single-user compilers, and single-user debuggers can be easily plugged into the RECIPE prototype system to support Internet-based real-time collaborative programming.
•
Hierarchical collaboration. The RECIPE prototype system can share the compiling applications, debugging applications, or even the entire Unix shell application for collaboration. There are four types of sharable sessions in the RECIPE prototype system, which are Unix shell session (UXSH), Editing session (EDIT), Compiling session (COMP), and Debugging session (DEBG). The currently supported compiling applications are the GNU C compilers (i.e., gcc and g++) and the Java compiler (i.e., javac). The currently supported debugging applications are the GNU C debugger (i.e., gdb) and the Java debugger (i.e., jdb). The REDUCE (REal-time Distributed Unconstrained Cooperative Editing) system is integrated in the RECIPE prototype system to serve as the real-time cooperative program editor. The REDUCE system was developed by our research group to support realtime cooperative editing. It allows physically dispersed users to view and edit shared documents at the same time. The main features of the REDUCE system are: 1) Concurrent editing any text at any time. 2) Concurrent undoing any operation at any time [3]. 3) Instant response on distant editing over the Internet. 4) Optimistic concurrency control by operational transformation [4]. 5) Convergence, causality-preservation and intentionpreservation [5]. 6) Optional and responsive locking support [6].
4
IV. A working scenario with RECIPE A working scenario is presented here to illustrate how the RECIPE prototype system can facilitate collaborative programming over the Internet. Haifeng is a PhD student at Griffith University, Australia. He is implementing the undo module for the REDUCE system designed by his supervisor Professor Sun who is on leave in Singapore. Haifeng found a major bug when testing. But he couldn’t trace out the root of the bug. So he invited Prof. Sun to concurrently and collaboratively debug his program.
Firstly, Haifeng started a debugging session to debug his Java program called “RE.class”. Prof. Sun then requested to join this session and Haifeng granted full permissions to him upon receiving his joining request. Haifeng set a breakpoint at the method called “anyUndo” and then ran this program. When the program stopped at the breakpoint, Haifeng printed the value of a global variable “HB” which he thought was not correct. Prof. Sun had seen all of Haifeng’s actions and the program’s outputs. He then set another breakpoint at the method called “undo” before Haifeng’s breakpoint and re-ran this program. When the program stopped at his breakpoint, he printed the value of the variable “HB” and found it was correct at this stage. So he concluded that there was something wrong between the method “undo” and “anyUndo”. Prof. Sun and Haifeng then continued to trace the program step by step interactively. When they made a decision that the bug was probably in the method called “skipMS”, Haifeng started an editing session to edit the program source code “RE.java” using the REDUCE real-time cooperative editor and made a compiling group. Prof. Sun then joined the editing session with full permissions and the compiling group in order to receive compiling outputs. Prof. Sun and Haifeng continuously edited the program source code and compiled it until the compilation was passed and the revision was finished. After then, they were back to the debugging session, reloading and re-debugging the revised program. They kept collaboratively debugging, editing and compiling until the bug was finally fixed.
V. Summary and future work In this paper, we present an overview of the RECIPE prototype system, which was developed to serve as a vehicle to motivate and evaluate our research in the area of Internet-based real-time collaborative programming environments. A working scenario is illustrated to concretize Internet-based real-time collaborative programming with the support of the RECIPE prototype system.
5
However, because RECIPE is just an initial prototype system for Internet-based real-time collaborative programming, some further work needs to be done in the future. For instance, floor control should be used to avoid potential problems caused by interleaving inputs from multiple participants. Mutual exclusion is currently used for concurrency control, but more sophisticated concurrency control mechanism is expected in the future. The current access control policy is static, which means once the permission to a participant is granted, it cannot be dynamically changed by the session chairman during the lifetime of the session. A dynamic access control policy, which allows the session chairman to change the permissions at any time during the lifetime of the session, will be applied in the future.
References 1. P. Dewan and J. Riedl, Towards Computer-Supported Concurrent Software Engineering, IEEE Computer, Vol. 26, No. 1 (Jan. 1993). 2. John T. Nosek, The Case for Collaborative Programming, Communications of the ACM, Vol. 41, No. 3 (March 1998). 3. C. Sun, Undo any operation at any time in group editors, to appear in Proceedings of ACM 2000 Conference on Computer Supported Cooperative Work, December 2 - 6, 2000, Philadelphia, Pennsylvania, USA. 4. C. Sun and C. A. Ellis, Operational Transformation in Real-Time Group Editors: Issues, Algorithms, and Achievements, Proceedings of ACM Conference on Computer Supported Cooperative Work, pp.59-68, Seattle, USA, Nov 14-18, 1998. 5. C. Sun, X. Jia, Y. Zhang, Y. Yang, D. Chen, Achieiving convergence, causalitypreservation, and intention-preservation in real-time cooperative editing systems, ACM Transactions on Computer-Human Interaction, Vol. 5, No. 1 (March, 1998). 6. C. Sun and R. Sosic, Optional Locking Integrated with Operational Transformation in Distributed Real-Time Group Editors, Proceedings of the 18th ACM Symposium on Principles of Distributed Computing, pp.43-52, Atlanta, GA, USA, May 4-6, 1999. 7. John C. Tang, Nicole Yankelovich, and James Begole, SharedShell: A shared terminal for collaborative system administration, Network Communities Report, June 1999. 8. Laurie A. Williams and Robert R. Kessler, All I really need to know about pair programming | learned in kindergarten, Communications of the ACM, Vol. 43, No. 5 (May 2000).
6