VisConnect: Distributed Event Synchronization for Collaborative Visualization

Michail Schwab, David Saffo, Yixuan Zhang, Shash Sinha, Cristina Nita-Rotaru, James Tompkin, Cody Dunne, Michelle A. Borkin

In an era of remote work and global research teams, the ability to look at data together is more critical than ever. Yet, most data visualizations are built with a "single-user assumption"—they expect one person, one mouse, and one screen. Turning a standard visualization into a collaborative, multi-user experience usually requires a deep dive into the "dark arts" of distributed systems, involving complex state management and custom network protocols.

A new paper from researchers at Northeastern, Georgia Tech, and Brown University introduces VisConnect, a toolkit designed to bridge this gap. VisConnect allows developers to transform existing web-based visualizations into synchronous, collaborative tools with as little as two lines of code.

TL;DR

VisConnect is a peer-to-peer system that enables remote, multi-user collaboration on web-based visualizations by synchronizing low-level browser events. By replacing standard interaction libraries with collaborative "drop-in" versions, developers can enable simultaneous interaction (like dragging different data points at once) without rewriting their underlying application logic.

What Problem Does This Paper Address?

While we have collaborative text editors (Google Docs) and video conferencing, collaborative visualization remains a "grand challenge." Most current solutions fall into two camps, both of which have flaws:

  1. Screen Sharing: Low-latency but only allows one person to drive at a time.
  2. DOM Synchronization: This involves syncing the actual HTML/SVG elements across browsers. However, as shown in the figure below, this often breaks "data binding"—the link between the data model and the visual representation. If User A moves a circle, User B’s browser sees the circle move but doesn't know why (i.e., the underlying data hasn't updated), leading to a broken state.
Syncing the DOM directly (right) causes the visual state to diverge from the underlying data model.

VisConnect aims to provide a "GENERAL, EASY TO USE, and COMPATIBLE" architecture that supports simultaneous interaction from many collaborators without these pitfalls.

Methods

The core "aha!" moment of VisConnect is Interaction Synchronization. Instead of syncing the result of an action (the changed DOM), it syncs the trigger (the mouse event).

As illustrated in the update cycle below, VisConnect intercepts events like click or mousemove and broadcasts them to all connected peers. Each peer’s browser then executes that event locally, triggering the original application logic and keeping the data and the view in perfect harmony across all clients.

VisConnect targets the "Interactions" layer to ensure the entire update cycle is reproduced on all clients.

Key Technical Components:

  • Peer-to-Peer (P2P) Architecture: Built on WebRTC (via Peer.js), it eliminates the need for a heavy central server, increasing reliability and privacy.
  • Granular Lock Service: To prevent "tug-of-war" scenarios (two people trying to drag the same node), VisConnect uses a lock service. It partitions the visualization by individual SVG elements. If you start interacting with an element, you "own" it for a brief grace period, preventing others from conflicting with your specific action while still allowing them to interact with other parts of the chart.
  • Drop-in Replacements: The authors provide collaborative versions of popular D3.js functions. For example, replacing d3.drag with vc.drag is often all that's needed to enable multi-user dragging.

Datasets

As a systems and toolkit paper, the authors did not train a model on a specific dataset. Instead, they evaluated VisConnect using:

  1. Automated Conflict Tests: Stress-testing the lock service with simultaneous conflicting events.
  2. IDMVis: A real-world diabetes temporal event sequence visualization.
  3. Planarity Party: A custom-built collaborative game used for an educational case study with 22 graduate students.

Key Insights and Ideas

  • Event Syncing > State Syncing: By operating at the event level, VisConnect remains agnostic to the specific visualization library used (D3, Vega, etc.), provided they rely on standard DOM events.
  • The "Single-User" Trap: Many visualizations use Math.random() for initial layouts. In a collaborative setting, this means every user sees a different starting screen. VisConnect provides vc.random, a synchronized random number generator that ensures all collaborators start with the same "random" state.
  • Safety vs. Liveness: The system prioritizes "Safety" (preventing incorrect data states) by requiring a lock before an event is dispatched. However, it maintains "Liveness" (responsiveness) by requesting that lock the moment a user hovers over an element, often hiding the network latency entirely.

Key Results

  • Minimal Code Overhead: The authors demonstrated that complex visualizations could be made collaborative by adding a single script tag and changing just a few lines of D3 code.
  • Educational Success: In the study with 22 students, participants overwhelmingly found the collaborative features helpful for understanding complex network concepts. They noted that being able to "divide and conquer" a problem (e.g., different students untangling different parts of a graph) was highly effective.
  • Telemedicine Utility: The researchers showed how a doctor and patient could use VisConnect to jointly explore glucose data, with both parties able to trigger tooltips and highlight trends in real-time.

Limitations and Future Work

  • Host Dependency: Currently, the "host" (the person who starts the session) manages the lock service. If they disconnect, the session ends. The authors suggest moving to a more robust leader-election algorithm (like PAXOS) in the future.
  • Communication Gaps: While VisConnect syncs actions, it doesn't provide built-in voice or video. Users in the study sometimes felt frustrated when a teammate "ruined their idea" because they couldn't communicate their intent quickly enough.
  • Event Log Bloat: For long sessions, the list of synchronized events (especially high-frequency mousemove events) can become very large, making it difficult for late-joiners to "catch up" quickly.

VisConnect represents a significant step toward making collaborative data exploration the default, rather than a difficult-to-implement exception. You can find the source code and live demos at visconnect.us.

Summary updated

BibTeX
@article{schwab2021visconnect,
  author = {Michail Schwab and David Saffo and Yixuan Zhang and Shash Sinha and Cristina Nita-Rotaru and James Tompkin and Cody Dunne and Michelle A. Borkin},
  title = {{VisConnect: Distributed Event Synchronization for Collaborative Visualization}},
  journal = {IEEE Trans. Vis. Comput. Graph.},
  year = {2021},
  doi = {10.1109/tvcg.2020.3030366},
}
Figure