The second major version of diaspora’s federation protocol has been released

Let’s first take a step back and look at why this is huge news.

tl;dr: The next major version of diaspora* (0.7.0.0) will include a new major version (0.2.0) of diaspora*’s federation protocol. The release of this version demonstrates that the ‘cleaning’ phase has been finished and that the community is now able to develop this protocol further. Under an AGPL 3.0 licence and proven by many years of production, the protocol and its implementation are both reliable and robust. We encourage projects seeking to create the federated social web to take an interest in this protocol, and we will push its wider adoption by providing support and an automatic tool to test its implementation in other languages. Apart from the reference implementation in Ruby, there are currently two implementations in PHP, one in Python and one in Go, which are at various stages of development.

The evolution of the protocol since 2012

The diaspora* community has been working on the diaspora* federation protocol (based on the Salmon standard) since the withdrawal from the project of the founders in August 2012. At this time, the code managing the diaspora* protocol was integrated deep in diaspora*’s core software. Such architecture has major defects. For the diaspora* project first: it makes the isolation and fixing of bugs far more difficult, and it complicates the development of the protocol by increasing the risk of regressions. In order for the decentralized social web to adopt the protocol, it would have been necessary first to retro-engineer diaspora*’s complex code to understand its operation. To directly reuse this code in other projects was therefore almost impossible.

A protocol which is difficult both to extend and to implement more widely is guaranteed to become obsolete. It thus very quickly became essential in the eyes of the community to extract the protocol into a separate library. This would make it easier to maintain and extend, could be taken and included in other projects which wish to adopt it, and could be used as a reference implementation for those wishing to create a new implementation of the protocol in language other than Ruby. The work of extraction started in August 2014. The amount of refactorization was so great that it became easier to restart with a new implementation of the protocol almost from scratch. Florian Staudacher (Raven24) and later Benjamin Neff (SuperTux88) worked on it for more than one year. It was the first big stage in the project: to understand all the code written by the founders, and to rewrite it in a separate project, so that it is more stable and easier to reuse.

Once the library had evolved sufficiently, the work of integrating it with diaspora* started. This second stage was even more difficult. Step by step, the old code in diaspora* was replaced by calls to the new library. This process began with the discovery of contacts on other pods (servers running the diaspora* software), done using the WebFinger and HCard standards. It was implemented in July 2015 and in August 2015. Much work followed and long story short, the clean-up of the old code and the integration of the new were finished in June 2016. Finally, with the release of major version 0.6.0.0 of diaspora*, all this work officially became available for all, on August 27th, 2016, 4 years to the day after the departure of the founders.

Why today is a great day!

All this work done during these 4 years was essential to provide solid foundations. It even did a lot of good for servers running diaspora*, as the new implementation was more robust and, being better tested, was less buggy. But for end-users, there was no visible new functionality. And this is why this second major version of the protocol is exciting: with the clean-up phase complete, Benjamin could, helped by Senya (cmrd-senya), attack a far more interesting part: the evolution the protocol itself. And of development, since last August, there has been plenty! The list of changes is impressive! One example is the addition of a timestamp to federated comments, which means they can always be displayed in their proper order, thus correcting a several-years-old bug! It is possible to send your biography to other servers. You can also see that the protocol is now able to manage events, which means that this feature can finally be written into diaspora*’s software. But the most important innovation is the introduction of the concept of account migration, which will make it possible for users to move their account entirely to a different diaspora* server while keeping their contacts, messages, comments... One of the headline promises of the diaspora* project was to give complete power to the user by enabling them to move from one pod to another at will. Thanks to the release of version 0.2.0 of the protocol, this is now closer than ever to becoming a reality!

Backwards compatibility and adoption

All these changes are important and have a consequence: diaspora* version 0.7.0.0 is not backwards-compatible with version 0.6.2.0 or lower. Any servers still running a version of diaspora* older than 0.6.3.0 will no longer be able to communicate fully with servers running the latest software. This is why it is extremely important for podmins to update their server regularly, which is in any case essential in order to fix security breaches.

This version also shows that, strengthened through 4 years of experience, the diaspora* community can today provide a reliable and evolving social networking protocol. Its specifications are, of course, public. The Ruby gem, the reference implementation used by diaspora*, is available under an AGPL 3.0 licence (documentation). Its source code, and that of many other implementations, such as that in PHP used by Friendica, that in python used by SocialHome, or that in Go used by Ganggo are all available. Note that these other implementations are not officially supported by the diaspora* project and at various stages of development. If you wish to use it or to take part in the development of the protocol, do not hesitate – come and discuss it on Github, discourse or #diaspora-dev on IRC! We encourage projects seeking to create the federated social web to take an interest in this protocol, and we will push its wider adoption by providing support and an automatic tool to test its implementation in other languages.

Keep rocking the free social web!