International Journal on Science and Technology
E-ISSN: 2229-7677
•
Impact Factor: 9.88
A Widely Indexed Open Access Peer Reviewed Multidisciplinary Bi-monthly Scholarly International Journal
Plagiarism is checked by the leading plagiarism checker
Call for Paper
Volume 17 Issue 1
January-March 2026
Indexing Partners
Parallel Editing in p5.js and Paper.js with ShareDB: An OT‑based Architecture and a CRDT Metadata Lane
| Author(s) | Ravi Dayani |
|---|---|
| Country | United States |
| Abstract | Real‑time co‑authoring has become a first‑class requirement for creative coding and vector graphics on the web. This paper presents a reference architecture for parallel editing across p5.js (immediate‑mode) and Paper.js (retained‑mode), built on ShareDB’s Operational Transformation (OT) for structured JSON documents [1][4][6][16]. We define a unified schema and semantic, fine‑grained operations (e.g., path.segment.update, parameter state.set) that preserve user intent under concurrency, along with multi‑user undo/redo and workspace awareness cues to improve collaboration quality [16][19]. To strengthen offline behavior and reduce contention, we add a CRDT metadata lane (e.g., Yjs) for annotations/comments, merging deterministically without server ordering and complementing the OT core [13][14]. Synthetic evaluation shows low end‑to‑end latencies with immediate local echo, sub‑millisecond transform/apply costs for most ops, high intention preservation on concurrent vector edits, and robust offline resilience for annotations. We conclude with practical guidance—hierarchical addressing, batching, stable IDs—and discuss trade‑offs between immediate‑ and retained‑mode collaboration surfaces. |
| Keywords | Real‑time collaboration, Operational Transformation, CRDT; p5.js, Paper.js, ShareDB, Yjs, scene graph, parallel editing, workspace awareness, selective undo, WebSocket. |
| Field | Engineering |
| Published In | Volume 17, Issue 1, January-March 2026 |
| Published On | 2026-01-29 |
| DOI | https://doi.org/10.71097/IJSAT.v17.i1.10200 |
| Short DOI | https://doi.org/hbm8bg |
Share this

CrossRef DOI is assigned to each research paper published in our journal.
IJSAT DOI prefix is
10.71097/IJSAT
Downloads
All research papers published on this website are licensed under Creative Commons Attribution-ShareAlike 4.0 International License, and all rights belong to their respective authors/researchers.