CodeR: Real-time Collaborative Code Editor - Key Points
Abstract
CodeR is a real-time, web-based collaborative code editor and execution environment.
Enables writing, running, displaying terminal results, and real-time collaboration with other users.
Supports C, C++, and Java; includes chat and collaboration features within a project workspace.
1. Introduction
Software industry trend: IDEs moving from desktop to web to reduce configuration time and enable ubiquitous access.
Real-time collaboration (RTC) combines communication and collaborative editing in a single environment.
RTC building blocks: Unified Communications, Presence Information, Contextualization, and E-Collaboration Portfolio.
RTC enables two- or multi-person editing, sharing, and synchronization of code changes in real time.
1.2 State of the Art
Goal: an online code editor with real-time collaboration, syntax checking, run/build through a terminal, and chat.
Features include workspace creation, editing, running/building, auto-complete (C, C++, Java), and import/export of projects.
Aims to improve programmer collaboration and project development efficiency.
2. Related Research
2.1 Real-time Collaborative Programming
Real-time text editing allows multiple programmers to work on the same document/file and see updates immediately.
Web-based editors/components for embedding in IDEs: Ace and CodeMirror; examples of collaborative systems include EtherPad and Google Docs.
Collaboration involves joining/leaving sessions; a join protocol includes JOIN, START, READY, and FINISH messages to synchronize new participants.
2.2 Integrating Collaborative Program Development and Debugging within a Virtual Environment
IDEs with real-time collaboration for coding, compiling, running, and debugging (e.g., Idaho Collaborative IDE, ICI).
Applications enable teachers/students to collaborate remotely and share development tasks in real time.
2.3 Real-Time Collaborative Coding in a Web IDE
Collabode: a web-based IDE for Java with real-time collaboration; uses EtherPad for editing and integrates with Eclipse features.
Models of collaboration: test-driven programming, micro-outsourcing, and mobile instructor.
3. Design & Method
3.1 CodeR Features
Login via the Facebook plugin for easy access; supports C, C++, and Java.
Run/build, download source code with folders, real-time collaboration, and chat.
Email for bug reports; after login, users see a workspace with projects/folders/files; real-time updates with auto-save (inactive for 1 minute).
Collaboration is project-based: invite coworkers, set access restrictions, and communicate via chat.
3.2 Operational Transform Algorithm
Real-time collaboration relies on Operational Transformation (OT) to maintain data consistency across users.
Components: integration algorithm (receives/transmits/executes operations) and transformation functions (combine concurrent operations).
Transformation example: when op2 arrives after op1, op2 must be transformed to op2' so that applying op1 then op2' equals applying op2 then op1.
Case distinctions: Update vs. Insert/Delete.
Insert/Delete changes the linear address space; Update does not.
If an update is transformed against an insert, its position may shift (e.g., the update position increases if it occurs after the insert).
OT in CodeR supports concurrent editing, ensuring consistency across all collaborators.
4. Result
4.1 Application Architecture
User authentication leads to loading of workspace data; the Facebook friends list is used to add collaborators.
Chat and collaboration are integrated into the workflow; collaboration data is exchanged via socket.io.
The project/file tree is displayed; actions include create, delete, rename, move, open, download, and upload.
4.2 Collaboration Features
Real-time collaboration: invite friends from a friend list; anonymous users can still connect with other anonymous users.
Chat supports the display of user names and dates and search functionality for inviting specific friends.
5. Discussion
Evaluation used Apache Benchmark to measure HTTP server performance under load.
Test setup: a URL tested with -n 1000 requests and -c 1000 concurrency (i.e., ).
Hardware test specifications:
SPEC 1: Pentium Dual Core E2180 with GB RAM.
SPEC 2: Core i7-2600 with GB RAM.
Results (SPEC 1):
Total data transferred: bytes; Time: s; Requests per second:Time per request (for 1000 concurrent): ms; Transfer rate:KB/s.
Results (SPEC 2):
Total data transferred: bytes; Time: s; Requests per second:; Time per request: ms; Transfer rate:KB/s.
Overall, the average load times and throughput improved with higher-spec hardware; mean/max values reported for each test indicate response-time behavior under load.
6. Conclusion
CodeR provides a web-based, real-time collaborative coding environment with a terminal for execution results, chat, and project management.
Supports languages:Main features include workspace creation, real-time collaboration, chat, and terminal execution.
Future work suggested: automatic UML design generation from code, multi-file editing across projects, and repository-like features akin to GitHub.