Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Peer-to-peer Collaborative Editing Using Yjs & WebRTC

Parent Feed: 

WebRTC, a protocol that facilitates peer-to-peer communication between two clients via the browser, is now supported by all modern browsers. Since its introduction it has mainly been used for web conferencing solutions, but WebRTC is ideal for a variety of other use cases as well. Because of its wide platform support, creating peer-to-peer applications for the web is now more straightforward than ever. But how do you manage many people working together at the same time on the same data? After all, conflict resolution for peer-to-peer applications remains a challenging problem. Fortunately, with Yjs, an open-source framework for real-time collaboration, developers can now combine WebRTC and Yjs to open the floodgates to a range of future-ready collaborative use cases.

Thanks to WebRTC and Yjs, anyone can build collaborative editing into their web application, and this includes more than just text Yjs enables collaborative drawing, drafting, and other innovative use cases. The advantage of such a peer-to-peer model (in lieu of a client–server model) in the CMS world is that collaborative editing can be added to any editorial interface without significant overhead or a central server handling conflict resolution. By integrating with y-webrtc, the Yjs connector for WebRTC, CMS communities can easily implement collaborative editing and make it natively available to all users, whether on shared hosting or in the enterprise. The future of Drupal, WordPress, and other CMSs is collaborative, and, together, WebRTC and Yjs enable collaborative editing out of the box.

In this deep dive into how Yjs enables peer-to-peer collaboration, join Kevin Jahns (Real-Time Collaboration Systems Lead at Tag1 and creator of Yjs), Fabian Franz (Senior Technical Architect and Performance Lead at Tag1), Michael Meyers (Managing Editor at Tag1), and Preston So (Editor in Chief at Tag1 and author of Decoupled Drupal in Practice) for a closer look at how you too can build peer-to-peer collaboration into your decentralized application.

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web