Insights

Build Collaborative Apps: JavaScript Operational Transform

2 min read Joe 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

Top Trends to Engage Your App Users
InsightsSep 27, 20224 min read

Top Trends to Engage Your App Users

Take a look at the top trends that are the most effective in attracting customers and reducing churn, and how you can incorporate...

PubNub Staff

PubNub Staff

Comparing Game Engines: Unity vs Unreal vs the Rest
Real-Time Gaming BlogSep 21, 20225 min read

Comparing Game Engines: Unity vs Unreal vs the Rest

Comparing the major game engines: Unity vs Unreal Engine vs Corona SDK vs GameMaker Studio, including the benefits and cons of...

PubNub Staff

PubNub Staff

Python Socket Programming: Client, Server and Peer Libraries
BuildSep 21, 20226 min read

Python Socket Programming: Client, Server and Peer Libraries

Sockets (aka socket programming) enable programs to send and receive data, bi-directionally, at any given moment. This tutorial...

PubNub Staff

PubNub Staff