Overview

During GSoC 2019, I participated in and pushed forward the development of Dendrite, a high-performance, scalable Matrix homeserver implementation written in Go.

Like many others passionate about Dendrite, I’ve been eager to see the day when it finally joins the decentralised, federated Matrix network, so I worked on the project to see how much I could do to bridge the gap between it and the current reference homeserver implementation, Synapse, in terms of feature completeness.

Working on Dendrite in just one area would be insufficient to propel it, so my work covers various components in the project, including the Client/Server API, Sync Server, Room Server, and Federation Component. I also spent time refining the project’s documentation, improving its testing/continuous integration process, as well as reviewing pull requests from Matrix.org members and the community.

Below is the major portion of my work presented as pull requests, categorised by the components they belong to; a list of links to all the pull requests I created/reviewed is also available at the end of this report.

Work in Component: Client/Server API

This component is the main handler of HTTP requests from the clients, except for /sync requests - see next part.

Work done:

Work left:

Work in Component: Sync Server

The Sync Server is responsible for handling the long polling notification requests (/sync requests) and some other related requests from the clients.

Work done:

Work left:

  • Support for other types of EDUs

Work in Component: Room Server

The Room Server is, as its name suggests, where room events, state, etc. are handled.

Work done:

Work left:

  • Support for alias deletion by admins
  • Discussion on and implementation of event retention policies

Work in Component: Federation

The Federation Component sends requests to and receives requests from other Matrix homeservers.

Work done:

Work left:

  • Implementation of a “Most Recent Transaction Sender” In-Memory Cache
    • There is a delay in this part of work because some dependency problems took longer than expected to resolve, but this has been planned and will be worked on after GSoC.
  • Implementation of a component that handles backoff/retries for federation requests

General Fixes, Improvements, Maintenance Work

Here is a list of links to all the pull requests I have created/reviewed (by 26 Aug, 2019):

Repository Pull Requests
matrix-org/dendrite Created (36) / Reviewed (27)
matrix-org/gomatrixserverlib Created (12) / Reviewed (1)
matrix-org/sytest Created (5)

Appendix: On Dendrite Being a GSoC Project

I believe that Dendrite is a pretty special project to work on in the GSoC program.

At its current state, Dendrite isn’t a complete homeserver yet. This has left a large portion of work on Dendrite wide open: As I worked on Dendrite, more than often I’d find myself in a place to answer questions related to topics like design or project architecture which, if not thoroughly thought through, might have consequences in the future development of the project. For this reason, I think working on Dendrite involves a set of challenges quite different from what attempting to improve an already functioning piece of software would have presented.

For the same reason, I think what Dendrite has taught me during the summer was less about how to become more fluent in Go or more familiar with various tools, but more about developing the mindset that powers software projects behind the scenes. But this mindset, to myself, seems more valuable than the former, indeed.

And at the end of this report, I’d like to thank my mentors anoa and Brendan, as well as everyone else at Matrix who has answered my questions, discussed with me, and helped me understand the code, and at the same time being super responsive. Without your help, my GSoC experience wouldn’t have been this enjoyable! :)