Build collaborative apps with Google Drive Realtime API

Tuesday, March 19, 2013 | 9:01 AM

Labels:

Google Drive lets users create Docs, Sheets, and Slides, collaborate on them in real time, and have their changes saved instantly and automatically. With the new Google Drive Realtime API, you can now easily add the same real-time collaboration that powers Google Drive to your own apps. This new API handles network communication, storage, presence, conflict resolution, and other collaborative details so you can focus on building great apps.

Developing for the Drive Realtime API is almost as simple as working with local objects. The API provides collaborative versions of familiar data objects such as maps, lists, strings, and JSON values and automatically synchronizes and stores modifications to these objects. Your application reads from and writes to these objects like any other local object. Change event handlers can be added to collaborative objects so that your app can react to changes from other collaborators.

Because the Drive Realtime API is based on operational transformation (OT), local changes are reflected instantly, even on high-latency networks. The Drive Realtime API automatically transforms changes to the data model so that every collaborator stays in sync.

If basic collections aren't enough for your application, the Drive Realtime API supports custom objects and references, including trees and arbitrary graph structures. As with other collaborative objects, the Drive Realtime API automatically synchronizes these objects with other collaborators and stores them in Drive.

Because presence is important in collaborative applications, the Drive Realtime API also keeps track of who is connected to your application and provides your app with events for when collaborators join, leave, or make changes.


Widget using the Drive Realtime API and showing the collaborators on a document

Neutron Drive, Gantter and draw.io have enabled realtime collaboration in their apps using the Google Drive Realtime API. Check out these apps to see the Drive Realtime API in action.

Collaborative code editing with Neutron Drive

Neutron Drive is an online editor for text and source code files stored in Google Drive. You can now collaboratively edit any text or source code files stored in Drive and get a collaboration experience similar to Google Docs — shared typing, a view of active collaborators, cursor positioning, and selected text. This all comes in addition to the syntax highlighting and other advanced features offered by Neutron Drive. To learn more, watch the video below:


Collaborative project scheduling with Gantter

Gantter is a free online project scheduling tool and Gantt diagram editor. It now allows you to collaboratively — and in real time — work on your project schedules. It even features an embedded chat powered by the Drive Realtime API. Watch the video below to see Gantter’s new realtime collaboration features in action.


Collaborative diagraming with draw.io

draw.io is a diagraming application that enables you to draw a wide variety of diagrams such as flowcharts, UML diagrams and even electronic circuits. You can now see updates from other collaborators instantaneously, with colored visual cues indicating who has changed the diagram and where that change occurred. Try the new draw.io collaborative beta at rt.draw.io and watch the video below.

Learn more about the Drive Realtime API

We also built a collaborative colored cube puzzle so you can have some fun while trying out the Drive Realtime API and a Drive Realtime API Playground to take you through the API step-by-step. Both apps are open source so check out our Github repos.

Have a look at the Google Drive Realtime API technical documentation and start making your app realtime-enabled!

Brian Cairns   profile

Brian joined the Google Drive team in 2011 and lives in Boulder, Colorado. He is currently the lead software engineer for the Drive Realtime API.





7 comments:

Alfonso E.M. said...

Awesome! I can see a LibreOffice plugin in a close future!

Martin said...

Great, i wonder if Google plans to extend existing Google Drive API as there is still many missing features e.g. document merging, format conversion within gDrive (without need to download and upload document) or possibility to modify content of documents.

Ali Afshar said...

@Martin Google are always looking to improve the Drive API. Format conversion using the Drive API without download/upload can be done using drive.files.copy with the convert parameter.

https://developers.google.com/drive/v2/reference/files/copy

Alex Walker said...

Very useful information...keep sharing!!!

Useful Link-Gmail Support

Thanks

android app making software said...

This posting is marvelous and what a fantastic research that you have done. It has helped me a lot. thank you very much. Feel free to visit my buy portfolio lighting site. Personal statement writers
android app making software

prem singh said...

googe all time think impro his srvice make very esy and devplomet very nice thank you goole !

Julia Robert said...

Thanks for sharing this information.