Saturday, May 30, 2009

sage + google wave

google wave is a new type of web 2.0 hosted communication, presented at google's i/o conference a view days ago. . it is very early to tell what it really is, but it could be big. it is very open and also consists of an open protocol for communication, that can be used (basically) for everything - and that's where i started to think about sage. but first, i explain what i think it does and how sage could play a role in there!

a server (not necessarily google - it's more like jabber/xmpp where everybody could host a server and servers talk to each other if users use different servers) hosts the "communication", called "wave". that's a tree-like structure of data, replies, extensions, meta-info, etc. if someone modifies something or adds a reply, every other participant sees the modification in real-time.

there are also artificial participants, called robots. they can also do things just like a regular user. example: spellchecking! a spellchecker analyzes all text and if something is odd, it annotates/modifies the text.
okay, how works synchronization? basically, all operations happen on the server. i think it is an abelian group so that there are no "destructive" operations - only invertible - that cannot destroy the state-flow and the sum of all state changes is the current state. therefore, there is only one thread of communication for all participants. if something happens (lost connection), everything is re-synced fast.

the interesting point is, there are also gadgets: interactive elements for all participants (an example is a chess game) and that's where i think sage could be used. basically, my idea is to implement a button to create a cell from the notebook. then, you enter the url of a sage server + your credentials. now, input is sent to the server (also, autocomplete ....) and you get the answer back and a new cell is created. if i understand it correctly, the server is actually talking to sage, so it is possible that several users edit at the same time and the actual cell-data is saved inside this "wave".
what's missing is formatting the formulas - but there is also mathml which could do it.

i applied for an early developer sandbox access, once i know more about this i'll tell you more.


  1. I just thought of how great a sage gadget for wave would be! I googled for it and that's how I found your post. I think it's a great idea and it should be doable!

    I am surprised nobodyelse picked up on it!


  2. I am interested in this idea as well. Has any work been done to investigage/implement this feature?

  3. if you search for sage in published waves, there are some about this. my personal "plan" is to wait until a stanalone library for a robot independet of appengine is available - google promised this in the api specs. after that, to enhance sage. since sage already acts as a server, this won't be much work...

  4. Why not write an appengine app? (I'm not familiar with what it takes) ... Is it a hassle?

  5. For me it makes no sense to write an appengine app that serves to be a proxy between sage server and the wave server. You cannot run Sage on appengine and you cannot interface with other wave servers (federation!) from appengine [as far as i know, and for now]. It's just much easier to use the upcoming python library which implements the communication protocol to talk to a wave server. The code itself is more or less the same as for something like the wolfram alpha robot (which is open source BSD) and essentially just some lines of code. Although, authentication like with the twitter robot might be useful, too...

  6. A friend just mentioned to me that they just came out with a python library for robots, then i found this: (cor

  7. Adam, quoting from the page:
    """Note: For this developer preview release, all Wave robots must be implemented as Google App Engine applications. A future release will introduce the ability to host robots with any web host, at any web address."""

  8. no problem ;)
    for google, and probably others too, it doesn't make much sense to build a standalone robots communication lib, because the wave protocol might still change. once it is really stable, it makes sense to build standalone libraries and no development time gets lost ...

  9. So is there hope of this happening? This would be fantastic.