Insights

Build Collaborative Apps: JavaScript Operational Transform

2 min readJoe Hanson on Oct 24, 2014
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

We should never have to refresh a page or look at stale data. We need our apps to be real-time, always updating, even when we're not using them. Apps should be collaborative, and operational transform...

We should never have to refresh a page or look at stale data. We need our apps to be real-time, always updating, even when we’re not using them. Apps should be collaborative, and operational transform is the way to do that.

Operational Transform Collaborative App

In his talk below from SF JavaScript at PubNub HQ, Joseph Gentle walks through how operation transform works, how to build apps using this technology (with in this case ShareJS and DerbyJS), and what tools we really want that nobody has built yet.

Joseph worked on Google Wave in Sydney, and his heart was broken when it was cancelled. Since all problems can be solved with code, he’s spent the last 3 years rebuilding a lot of Wave’s unique technology as an open source library. The end result is ShareJS, an open source operational transform library for NodeJS and browsers.

Building Collaborative Apps: JavaScript Operational Transform from PubNub on Vimeo.

Operational Transform Overview

Operational Transform (OT) is a technology that enables developers to build collaborative applications. When you think of an OT use case, think collaborative editors: Google Docs, Mockingbird, Zoho Suite, etc. Users can collaborate in an environment and their changes are reflected in real time across all devices connected.

There are 3 benefits to using operational transform:

  1. Your model data gets updated in real time
  2. Seamless online/offline integration
  3. We never accidentally over write our data (F/LWW)

The best kept secret of Google Wave and hackpad is that operational transform (the collaboration algorithms) can be used to edit almost any JSON data. As a result, you can add real-time collaborative features to anything! And you can do it in a way that never loses user data and never needs to lock or add messy conflict markers.

More from PubNub

Can Empathy Exist in the Metaverse
News May 16, 20221 min read

Can Empathy Exist in the Metaverse

A roundtable discussion led by PubNub’s COO, Casey Clegg, exploring the topics of what it means to be human in a virtual world.

PubNub Staff

PubNub Staff

How to Advance Telehealth and Virtual Care Technologies
News May 2, 20221 min read

How to Advance Telehealth and Virtual Care Technologies

Dr. Joe Kvedar, Chair of the Board for the American Telemedicine Association, joins our COO, Casey Clegg, to discuss why...

PubNub Staff

PubNub Staff

Another Step Towards Data Security: ISO-27001 Implementation
BuildMay 2, 20221 min read

Another Step Towards Data Security: ISO-27001 Implementation

Today, we are glad to announce that we are currently in the process of implementing ISO-27001 security standards.

PubNub Staff

PubNub Staff