News: Stay up to date

The Étoilé community is an active group of developers, designers, testers and users. New work is being done every day. Visit often to find out what we've been up to.

News

CoreObject over XMPP

Posted on 15 September 2009 by David Chisnall

One of the best things about hippyware development is when someone else implements something you'd planned to do. If you've been following this blog for a few years, you'll remember that one of the ideas I had very early on when I started working on EtoileSerialize (the low-level part of CoreObject) was to be able to send objects remotely for automatic whiteboarding of arbitrary objects. Today, in SILC, Niels announced:

Niels Grewe: I just send the first object over XMPP :-D

For the past few weeks, Niels has been working on tidying up some of the rough edges of XMPPKit and EtoileSerialize and joining them together. He has rewritten the XML serializer and added a deserializer.

At the hackathon this year, I added an ETXMLWriter class and protocol, which implement a similar set of APIs to the ETXMLParser delegate (this is great for testing, because you can plug the two together and just check that the input matches the output). This is now used by XMPPKit and is also used by Niels' new code in EtoileSerialise. This makes it relatively easy to join the two together, so you can embed serialized objects in an XMPP stream and send them to other users.

Although the code is still quite messy, and Niels is tidying it before committing, it has a lot of potential. Trivial whiteboarding from every Étoilé application is the most obvious use; we can send CoreObject invocations between users so they can both edit the same documents easily. Another exciting possibility is live backups. While you are editing a document, all of the changes you make are recorded to disk by CodeObject, so a power failure won't lose you anything except, maybe, the couple of edits if your OS doesn't commit them to disk fast enough. But what happens if the disk dies, or you drop your laptop? With CoreObject streaming the changes over XMPP (which doesn't take a huge amount of bandwidth), you can start working again exactly where you left off, as soon as you find a new computer to work on.

I hope to put together some demos of this over the next few months. It probably won't make it into 0.4.2, but it should be in 0.5.