
Google Drive Realtime API - noinput
https://developers.google.com/drive/realtime/
======
pak
Assuming I trust Google with all the data and all my users have Google Drive,
this looks like a super easy way to make documents created in a web app
editable in real time by multiple users.

I'm curious about the details though, which would be ironed out with some more
detailed playground examples. Does the API handle merging of the update events
on the client side, or do I have to do all that work myself from the stream of
insert/removal events? Can I handle them myself if I want? Assuming I want to
extend the UI of these updatable strings, so that people can see other
people's cursors and such, what would I need to do? Is the client-side library
extendable so it can update my UI without hammering my customizations (cursor
position, formatting, embedded data transformed into HTML)? How will that
scale once the document grows to a considerable size (will I be able to update
only changed portions of the DOM created by a large document without doing my
own complex diffing logic on the client side)?

For example, build me a basic rich text editor in this that mimicks some of
the features of Docs, and show me how much extra code that takes. This code
sample by itself doesn't make me confident that the above features would be
simple: [https://github.com/googledrive/realtime-
playground/blob/mast...](https://github.com/googledrive/realtime-
playground/blob/master/js/rtpg.string.js)

It's precisely those richer features of the Google Docs experience that people
crave when they say they want to add "realtime collaboration" to an app, not
just .val()'ing form fields to the latest known value from the server. Right
now this looks like it has the features of a backbone.js + Couch adapter
(e.g., <http://janmonschke.com/projects/backbone-couchdb.html>) except Google
sits on all my data.

------
polskibus
I'm still irritated with Google Reader story. How long is this one going to be
around, year, two? I think Google should start pledging a number of years they
will support a service, why should the developer be taking most of the risk?

~~~
yanw
Reader didn't have a documented API, and the differences between it and this
only begin there. Move on.

~~~
jfoster
But Google has retired quite a few APIs before. Search API, CalDAV, Google
Base Data API, Social Graph API, Translate API, and the list goes on.

Google Docs looks like it has a healthy future, but they very easily could
decide they don't want the API out there. Particularly with Google's newfound
lack of fear of pissing people off.

~~~
Shooti
FWIW CalDAV wasn't "retired" they're just going to start screening its use:
[https://docs.google.com/forms/d/19gOLSlkTzHi-
zub3BkMv7Ot0JML...](https://docs.google.com/forms/d/19gOLSlkTzHi-
zub3BkMv7Ot0JMLPj4YSxJUBseGAMSg/viewform)

~~~
magicalist
And the translate API is still available[1] and the Google Base Data API (sic)
looks like it's just subsumed into other APIs[2].

[1] <https://developers.google.com/translate/>

[2] [http://googlemerchantblog.blogspot.com/2010/12/new-
shopping-...](http://googlemerchantblog.blogspot.com/2010/12/new-shopping-
apis-and-deprecation-of.html)

------
clarle
This is pretty awesome. It seems like the models are similar to the
operational transformation models that they've been using in Wave/Docs (with
the batched client operation submissions). It's definitely much more advanced
than what Meteor does, which is just last-writer-wins.

Still, I'm a bit wary that they're offering this as a API, rather than a
framework. I don't know if I would build an application completely on top of
an external API...

~~~
boucher
Given that it seems to require building everything on the three collaborative
primitives, and that much of Wave and the ideas behind operation
transformations are open, it seems plausible that someone could build an open
source implementation of the server component that the JavaScript library
could then hook into.

~~~
josephg
I'm the developer of ShareJS (sharejs.org) - and we have realtime JSON editing
too.

The technology is compatible, and it should be pretty easy to make ShareJS
compatible with the GDrive client API.

------
resu_nimda
This is slightly off-topic, but since everybody's commenting about it anyway:
Was Google Reader (and Posterous, to a lesser extent) the tipping point for
awareness and activism surrounding the shutdown of free services? This could
be a big thing in 2013.

~~~
brianwillis
The tipping point for me was Twitter's increasingly hostile approach to third
party devs.

I've been racking my brain trying to think of the first service that I used
regularly that was shut down. Pownce maybe? (anyone else remember that?).

I'm currently hunting for a replacement for Gmail that is self-hosted, or at
least a solution where the cost of switching providers is low (i.e. I could
shift my email to a new host without changing my email address or losing my
message history). I'll probably end up using some sort of IMAP provider. There
are a lot of features I'd stand to lose though. Conversation view is hugely
useful, and Gmail's spam filter is just unbeatable.

~~~
xcasex
pownce was indeed awesome.

both twitter and in some part google have recently acted very hostile to the
notion of the open web. (Although referring to corporations as a singular
entity irks me somewhat)

------
sylvinus
I really thought this was an API for the driverless cars!

Slight disappointment after following the link of course :)

------
vineet
The API seems to require users (and not just developers) to have to authorize
the app :-(

This kinda limits you to Google Docs style apps, as opposed to other crazy
ideas I might have. I would also like to have an option to pay so that I can
keep our users data private.

Edit: Added clarification.

~~~
poundy
Is there a way let users collaborate without authorizing the app?

Developers authorize and create API with Google but it will be nice to allow
users to collaborate anonymously like Sharing a Google Doc to the public.

------
sylvainstudiogd
They should fix Google drive before launching an api... I don't understand why
google didn't fix it yet. It's a big issue, bigger than the google reader
thing... People use Google drive for their business (and some pay, like me),
not google reader. WTF Google ! We are waiting so long !

~~~
ChrisClark
Fix what part of it? You're talking as if we all know what is wrong and needs
to be fixed but I don't think we know what you are referring to.

Google Drive works great for everyone I know, are you referring to the short
downtime the other day?

~~~
sylvainstudiogd
Sorry yes I assumed everybody knows because I know many people having problem
around me... The famous unsyncable file, everybody I know including me have
this issue. For some people Google drive use 100% of the cpu until it crashes,
always, whatever they try. I got often disconnected for absolutly no reason.
Well, I have collegueS that just can't make it work on their computers (recent
iMac and macBook). And When I search on google, i find easily many people
having the same problems, even today. I love Google product, but currently
Google Drive is huge fail for me, I hope they fix it soon. They didn't update
their app since a long time I think...

~~~
ChrisClark
I think that seems to be a common problem with Google. It could be only 1% of
people are having the trouble you are having. But that could mean 10,000
people(not sure about real numbers) but at 1% it isn't on Google's priority
list. :(

------
anonfunction
This is really a great API for developers and I can see a lot of different
applications. Let's not let google reader's closing negate all the tools
google provides for free.

------
chenster
More importantly, how does Google ensure me it won't shut it down in 5 years?

------
rtexal
Wondering if Google Keep ([http://www.theverge.com/2013/3/17/4117780/google-
keep-note-t...](http://www.theverge.com/2013/3/17/4117780/google-keep-note-
taking-app-spotted-in-drive-before-disappearing)) is built on top this API ;)
The API realtime capabilities will definitely drive interesting projects if
Google Keep is just the start!

------
anonfunction
Anyone have a good source for a list of all the official and unofficial google
APIs?

A quick search provided this but it does not have any of the unofficial
internal API's that we love so much.

<https://developers.google.com/apis-explorer/>

------
msutherl
Would it be possible, with this, to display files in your Google drive as
read-only to people visiting a website?

I'm thinking this would make a killer back-end for certain kinds of websites.

------
julien
Wasn't Google killing Reader because they had to focus on less products? How
many new products this week alone have they introduced? 3, 4, 5?

~~~
smogzer
Google closing reader was probably something to do with the French un-digital
papers that wanted the interwebs going to their website-o-pages to read
content there.

