GSOC

21 posts tagged with "GSOC" (See all categories)

Atom Category Atom Feed

Matrix Visualisations final report (GSoC 2019)

2019-09-09 — GSOCEisha Chen-yen-su

The Google Summer of Code 2019 is coming to an end for me, so it means that it’s time for the final report.

🔗The work done

I’ve been taking care of the project “Matrix Visualisations” during these past months. This project aimed at initiating the development of a tool which allows the real-time visualisation of the events DAG of a given Matrix room, as seen from the perspective of one or more homeservers (HS’s).

Regarding my initial proposal, I’ve completed every task proposed and even implemented some additional functionalities. The application is not finished yet and there could be a lot of improvements added to it (especially regarding the design of the UI) but the core functionalities have been implemented.
I am going to precise what has been accomplished and then give some ideas of features to improve.

During GSoC, I have used two separate repositories for the frontend and the backend. I will keep both of them because I’m referencing PRs from them (as PRs are easier to link than lengthy lists of commits).
However, this is the repository regrouping these two parts and this one will be moved to matrix-org for the continuation of this project.

🔗Complete the implementation of the CS API backend

During the application period, I wrote a prototype for this project. This prototype implemented some requests to the CS API (like /login, /logout or /sync) but there were more requests to implement in order to be able to fully use this API:

  • In order for the application to automatically join (and leave at the end) a room if the provided account hasn’t already joined it, I implemented the requests to /joined_rooms, /join and /leave.
  • The request /messages has been implemented to allow the application to fetch previous messages.
  • For retrieving in real-time new events, I used the field from in the /sync request.

I also did a lot of clean up in the source code from the prototype during this task. You can have more details in this PR.

🔗Implement the first UI to interact with the DAG

First of all, a lot of work had to be made in order to properly update the displayed DAG when adding new events to it. At this point, I previously used the setData method of the Network object of the visjs library (which is used for displaying the graph and interacting with it) each time a node was added, but it was resetting the display each time it was called.
The proper solution was to progressively add nodes and edges to the DataSet object passed to the constructor of the network (see the documentation of DataSet and Network for more details).

The DAG has been set to be displayed vertically, the events with the same depth are at the same level, the deepest events are at the bottom. The events which origin is the HS on which we are making the observation are in green, those which are coming from other servers are in orange. Here is a picture of what it looks like: Events display

In the graph, there is a special node just after the earliest event which allows us to ask the application to load more events. Here is what it looks like: More Events button

When you double click on the node of an event, there is a text area on the right which displays its complete JSON body, like this: JSON body display

I’ve also implemented the possibility to choose which particular fields of the event can be directly displayed in the labels of the nodes of the displayed graph: Fields selection

🔗Synapse PostgreSQL backend

Next, I implemented a backend for retrieving events from the PostgreSQL database of a Synapse HS. It is a small HTTP server which receives requests from the frontend application and then makes queries to the Synapse database to get the requested events.
You can find details about the API for using this backend in this readme, in the “HTTP REST API” section.
You can find more details about this initial implementation: here, here, here (my mentor helped me on this one, thanks to him), and here.
I’ve added the support of this backend in the frontend application, as well as a way to choose which backend to use (between this one and the CS API) in this PR.

🔗Multiple views

I implemented the ability to observe the same DAG of a room from multiple HS’s. This is done with “views”.

View selection

In the picture above, you can see that there is a drop down menu from which you can select the view. The fields under this line are used to control the selected view: indicate where it will be connecting, for which room (you could as well observe a different room in a different view), etc…
By default, there is only one view but you can add as many as you want by clicking “Add a view”.

All the DAGs from the different views are displayed side-by-side within the same canvas, like this: Multiple DAGs

You can have a look at the details of the implementation in this PR.

🔗Add Federation API support

The next major task I had to do was the implementation of a backend for retrieving events via the Federation API. I thought a lot about the possible options for the location of this backend and I decided to extend the web server created for the PostgreSQL Synapse backend, so that we could launch it in a “postgres mode” or “federation mode”. But the backend would offer the same HTTP API in both modes.

The backend uses the Federation API in the following way:

  • Before being able to retrieve events from a certain room, the backend must join it with /make_join and /send_join requests, it creates an “imaginary user” in this room. The join event created during this process will be the one returned by the endpoint /deepest.
  • To get earlier events, the backend uses /backfill requests.
  • In order to get new events, the backend listens for pushed events from other HS’s with the /send request.
  • When the observation is done, the backend makes the “imaginary user” leave the room by sending /make_leave and /send_leave requests.

The full details of the implementation are in this PR. My mentor also helped me get the usage of the Futures right thanks to this PR.
There has been a small modification in the frontend too, because of the addition of the /stop endpoint in the backend’s HTTP API, these modifications are in this PR.

🔗Display the state of the room for a given event

For each event, there is a state of the room associated with it, which describes what was the state of the room at the moment this event was accepted (the name of the room, its topic, its members and parameters, etc…).
So I’ve added a way to display this: when you have selected and displayed the JSON body of a given event, you can also request the associated room’s state. I have made it possible to use this feature with every backends: the CS API, the PostgreSQL database and the Federation API. You can have the full details of the implementation here (for the backend) and here (for the frontend).

You can see the result of this feature in the picture below (there is a button “Room state at the selected event”, which allows to ask the application to fetch the state, and the text area under this button where the state is displayed): Room's state display

🔗Additional fixes

Lastly, I’ve applied small fixes to the code of the backend, you can see them in this PR.

🔗Possible improvements

The objective of this project was to develop the core functionalities of this application, however there are a lot of improvements to bring to it, like:

  • Adding the possibility to start the observation of a room from any events (provided that we have the ID of this events) instead of the latest one.
  • These hasn’t been any UI/UX work design, the CSS style sheet is minimal and the overall look isn’t beautiful or correctly organised. So there would be a lot of work to be done in this area by people with better knowledge in this field than me.
  • The timestamps of the events are not displayed in a human readable format and would be written as dates and hours to greatly improve the readability.
  • The application has been tested a lot, especially in situations of misusage. I’ve fixed some bugs which occurred when I was testing it but it was far from being an exhaustive testing, so there could be many improvements regarding the overall robustness of this software.
  • The backend supports HTTPS connections but has no mechanism for controlling the access of the data behind it (in particular, it means that if you should not run on a production database as it would basically allow anyone to access any data on it). So more work would be needed to make it secure.

🔗Conclusion

This experience has been really rewarding for me. I could discover more about the Matrix community and how the Matrix ecosystem works (on a technical point of view). I want to thank my mentor, Erik Johnston, for his guidance during these past months, and the people in this community who gave me advice.

GSoC has also allowed me to further improve my programming skills in general and discover many various things: the WASM technology, how to use Rust in this context thanks to the various existing libraries/frameworks available, the practical usage of SQL requests as well as TLS certificates and how to apply cryptographic signatures.
It was sometimes challenging to use such experimental technologies (due to the lack of clear documentation) but also very exiting!

Mid-September, I will start my class for my second and final year of my master degree (software engineering, specialised in distributed systems and applications) at Sorbonne Université so I will definitely have less free time. So I don’t think I’ll be able to actively continue to contribute but I will do my best to help other people to continue the work I’ve initiated.

Welcome to the 2019 GSoC Participants!

2019-05-07 — GSOCAndrew Morgan

It’s that time of year again! Matrix.org is once again participating in the Google Summer of Code program. We have been allocated four student slots by Google this year, and narrowing the 18 proposals we received down to just four was a very difficult task.

In the end, we have decided on the following four students and their proposed projects:

Alexey Andreyev’s proposal involves adding end-to-end encryption to libQMatrixClient for future support in Qt/libQMatrixClient-based clients such as Quaternion and Spectral. They will be mentored by kitsune, lead developer of libQMatrixClient, and our own end-to-end encryption expert, uhoreg.

Kai Hiller’s proposal for more reliable third-party protocol bridges includes adding the ability to notify the user when a message fails to reach its final destination despite being accepted by the bridge. Half-Shot.

Eisha Chen-yen-su’s proposal for Matrix Visualisations aims to “develop a tool which will visualise the event Directed Acyclic Graph data structure which describes the conversation history in a room. It will be a real-time visualisation of the DAG of a given Matrix room, as seen from the perspective of one or more HomeServers (HSes).” They state that “this tool will be useful for debugging or administration of Matrix HSes by making people able to easily see how the federation process works”. They have already posted prototypes of their tool in #gsoc:matrix.org, and it’s all written in Rust! Which makes their mentor, erikj, very happy.

And finally, Cnly’s proposal for working towards completion of Dendrite’s Client-Server API. The proposal also touches on general improvements to the codebase and increasing test coverage. Cnly will be mentored by babolivier and anoa.

Congratulations to the selected students. We look forward to participating with you on completing your project over the course of the summer holidays.

If your proposal was not selected, do not give up hope! Being an active member of the Matrix community and having a deep understanding of the ecosystem and its projects is a big part of what we look for when choosing candidates. If you stick around, you have a strong chance of being chosen in a subsequent year.

We will not be sharing individual’s proposal documents, but students are free to share them as they please.

This Week In Matrix – 2018-04-27

2018-04-27 — GSOC, This Week in MatrixBen Parsons

🔗Big News

🔗GSoC students

Google Summer of Code acceptees were announced, and we're really excited to have FIVE Matrix-related projects to look forward to!

Three of the students will be mentored by matrix.org folk, and two more will work on Fractal under the GNOME org.

🔗Fractal Hackfest 2018

Fractal Hackfest 2018 will take place next month in Strasbourg, hosted by Epitech. They'll be planning a roadmap for the year, and working on their current focus areas.

https://wiki.gnome.org/Hackfests/Fractal2018

🔗Coverage of French Matrix adoption

After the blog post on matrix.org yesterday, lots of attention developed around the news. Take a look at this Hacker News thread with lots of discussion, which has stayed on the front page for nearly 24 hours, and a megathread on Reddit/r/linux: nearly 1000 upvotes and growing.

🔗Project Updates

🔗Clients

🔗libqmatrixclient

kitsune reports a new release of libqmatrixclient, v0.2.1, this is mostly a bugfix release, fully backwards-compatible with v0.2. Check out the release notes for details.

kitsune - https://github.com/QMatrixClient/libqmatrixclient - #qmatrixclient:matrix.org

🔗Quaternion

Staying in QMatrix-land, there is a pre-release of Quaternion available. Take a look at v0.0.9, improvements include "redactions, file downloading, room creation and settings editing, better timeline visualisation and much more"!

kitsune - https://github.com/QMatrixClient/Quaternion - #qmatrixclient:matrix.org

🔗neo

f0x has been beavering away on neo, and has announced that Alpha 0.01 is available now. neo is a webclient in React, it feels really light and fast. I asked f0x about the uptick in work, and he mentioned he got started with React recently, but likes it a lot.

f0x - https://github.com/f0x52/neo/ - #neo_client:matrix.org

🔗Fractal

Fractal released 0.1.27 with many new features and bugfixes. Lot's going on but I'm most excited to see Markdown support land.

https://gitlab.gnome.org/World/fractal - #fractal-gtk:matrix.org

🔗Bots

🔗matrix-trello-bot

Says TravisR: "I've whipped together a simple Trello notification bot for matrix: matrix-trello-bot. Future plans include the ability to create/update/delete cards and more granular control of what is notified about. Currently it acts very similar to how the Github notifications bot works."

TravisR - https://github.com/turt2live/matrix-trello-bot - #trellobot:t2bot.io

🔗Others

🔗Matrix DSL

MTRNord is working on a "matrix DSL", basically a config file language that generates a project Template in multiple languages. The project is just now at the discussion stage, so join #matrix_dsl:matrix.ffslfl.net to check out what's going on. (DSL = Domain Specific Language.)

MTRNord - #matrix_dsl:matrix.ffslfl.net

🔗urllib-requests-adapter

Says Coffee: "urllib-requests-adapter has been updated to work with matrix-python-sdk 0.2.0. urllib-requests-adapter is a lightweight replacement for requests and its dependencies, currently standing at 126 SLOC."

Coffee - https://github.com/Matrixcoffee/urllib-requests-adapter

🔗mxisd

mxisd, the Identity Server from kamax, saw a v1.0.2 release, following the big one-point-zero last week. Changes include de-duplicated directory search results, plus bugfixes.

Max - https://github.com/kamax-io/mxisd

🔗matrix-stfu

Missed this one last week, but matrix-stfu from xwiki is a message filtering tool released recently, it can "mass remove everything which was said by a particular user in a particular room". XWiki use matrix as their internal chat system for the ~30 people at the company.

xwiki - https://github.com/xwiki-labs/matrix-stfu - #xwiki:matrix.xwiki.com

🔗Riot/Web

  • We're committing to 2-weekly releases come what may, to avoid another massive gap like the one between 0.13 and 0.14.
  • RCs will get cut starting from Wednesday; actual release then happens on the Monday having given folks a chance to test the RC on /staging (and to iterate on the RCs).
  • Obviously this is flexible if we need to rush out fixes sooner.
  • On that note, 0.14.2-rc1 was cut on Wednesday! Please test it at riot.im/staging. It's mainly bugfixes but also the full relayering between riot-web and matrix-react-sdk.
  • Dave's working on finally hooking in Jitsi as the default conferencing system
  • t3chguy's been working on Replies, which continue to look awesome
  • Next up: E2E cross-signing (at last!!!!)

🔗Riot/Mobile

  • New releases are out! Mainly preparing for sticker viewing and trying to fix the Android push notification situation. PLEASE TELL US IF YOU ARE STILL HAVING ANDROID PUSH NOTIFICATION PROBLEMS!
  • Lots of review of Android by Benoit - adding in Kotlin support as of today and establishing a formal roadmap for Android work (we'll show the blog post when we have it)
  • Lots of Matrix-for-French-Government stuff.

🔗Synapse

  • Synapse 28.0 was released! A major bump mainly thanks to lots and lots of contributions from the wider community.
  • Massive experimental work on GDPR in progress - doing the thought experiment of pseudonymising MXIDs throughout Matrix on a per-room basis so that it's possible to redact MXIDs in the event of a “right-to-erasure” GDPR event. Rich vdH is leading the work.
  • The good news is that introducing an MXID abstraction layer like this could help us enormously with some of Matrix's longest-term architectural issues - i.e. account migration and portability; improving on PERSPECTIVEs for managing server identity; future support for P2P Matrix; solving the domain name reuse problem; etc.
  • The bad news is that it would obviously be a very significant change to the Matrix spec, although we'd be doing it in such a way which minimises impact to client implementers and keep the CS API looking as similar as possible.
  • We're not sure whether we need to rush this through or not yet; still waiting for final GDPR clarification from lawyers, but it feels like this might be a good opportunity to force us to finally tackle some of these harder problems.
  • Meanwhile, Erik's Delta State Resolution algorithm work is continuing well; we're hoping to finish & merge it asap in order to get back headroom on the server.
  • Thankfully the matrix.org synapse itself has been relatively stable this week, other than being completely overloaded causing Freenode to be almost unusable.
  • We've started using Ansible in production, although the playbooks need some iteration before we're fully happy to announce them & recommend folks use them as an official way of running Synapse in production.

🔗try-matrix-now

There is a update out on try-matrix-now, matrix.org's central listing of projects. Try filtering and see whether benpa mangled the metadata for your project. Submit any changes as markdown PRs on the repo.

🔗Spec

benpa is currently working on a Proposals page for the Spec to properly stack spec proposal status, at last!

🔗Articles around the web

🔗Riot: A Distributed Way of Having IRC and VOIP Client and Home Server

uhoreg pointed to some charming coverage over on https://itsfoss.com: Riot: A Distributed Way of Having IRC and VOIP Client and Home Server, by Shirish. The article covers some details about riot-web and the open source ethos of Matrix, but my favourite quote by far:

"Without Matrix, Riot would be like a body without a soul."

Shirish - https://itsfoss.com/riot-desktop/

🔗Service notifs with Matrix

Half-Shot shared an article he wrote, Service notifs with Matrix, about using Matrix and Riot to deliver automated notifications to different types of end-user at his company.

Half-Shot - https://dev.to/halfshot/service-notifs-with-matrix-3fb5

🔗New Rooms roundup

  • #matrix_dsl:matrix.ffslfl.net As mentioned above, MTRNord is looking at creating a DSL for matrix. In his words: "A room to discuss about making a Matrix DSL to allow non coders to write simple as and bots. I would love to see some people discussing about syntax with me as this is my very first DSL and very first time trying JetBrains MSP. Anyone with Ideas what it should allow to do and how to have the syntax a welcome to join (and people who want to follow of course too)"
  • #trellobot:t2bot.io (from above) TravisR: "a discussion/developer room for Matrix Trello Bot (https://github.com/turt2live/matrix-trello-bot). This is a bot that notifies rooms of changes to tracked Trello boards, similar to how the Github bot works. Future enhancements include being able to create, update, and delete cards from within Matrix."

🔗Lastly...

Matrix Live - Season 2, Episode 17: Apr 27th is now available!

This Week in Matrix is printed fresh every week! There will be another post before you know it, so if you'd like to be included join us in #twim:matrix.org and let us know what you've been working on. See you next week!

Google Summer of Code 2017

2017-03-01 — GSOCOddvar Lovaas

We are very happy to again be one of the organisations selected for Google Summer of Code (GSoC)!

Last year we had two students working on Matrix-projects over the summer - you can read the retrospective here - and now we are again offering students to work on Matrix as part of GSoC! Currently we are in the stage where students can propose interesting project ideas to any of the open source organisations picked by Google. Of course, we encourage students to get in touch with us and discuss their ideas before writing their application - please come say hi in the #gsoc:matrix.org room!

We are very eager to see what ideas students come up with. We have added our own ideas here, but students are expected to do some research and come up with their own ideas for projects. We have also written down some general tips on what to include in the application.

Applications can be submitted from March 20th, so there's still plenty of time to have a play with Matrix and come up with a cool project idea!

Good luck!

The Matrix Autumn Special!

2016-11-12 — GSOC, Holiday Special, In the NewsMatthew Hodgson

Another season has passed; the leaves are dropping from the trees in the northern hemisphere (actually, in the time it's taken us to finish this post, most of them have dropped :-/) and once again the Matrix team has been hacking away too furiously to properly update the blog. So without further delay here's an update on all things Matrix!

Continue reading…

The Matrix Summer Special!!

2016-07-04 — GSOC, General, Holiday SpecialMatthew Hodgson

Hi folks - another few months have gone by and once again the core Matrix team has ended up too busy hacking away on the final missing pieces of the Matrix jigsaw puzzle to have been properly updating the blog; sorry about this. The end is in sight for the current crunch however, and we expect to return to regular blog updates shortly! Meanwhile, rather than letting news stack up any further, here's a quick(?) attempt to summarise all the things which have been going on!

Continue reading…

Announcing the Matrix GSoC'ers!

2016-04-25 — GSOCOddvar Lovaas

Congratulations to Aviral Dasgupta and Will "Half-Shot" Hunt who will be working with Matrix for their Google Summer of Code projects!

As mentioned, picking two projects out of all our proposals was no easy task. However, we now look forward to getting started, and we are sure Aviral and Half-Shot will help make Matrix even better over the next few months!

Aviral will be developing a flexible plugin system to facilitate integrating various services such as github/trello/duckduckgo with Matrix. Meanwhile, Half-Shot will be looking at adding features on top of Matrix - infact, he's already built a MPD DJ bot and started working on a .NET SDK. Aviral too, has been committing various enhancements already.

According to Google's GSoC timeline we are currently in the "Community Bonding" phase, which lasts till May 22, 2016 - which is when the projects formally kick off.

We're looking forward to seeing what awesome things Aviral and Half-Shot come up with!

GSoC update

2016-04-22 — GSOCOddvar Lovaas

As previously announced, Matrix is participating in Google Summer of Code (GSoC) 2016. We have had a lot of interest: lots of people joining Matrix to talk to us about their project ideas and a total of 38 project proposals. We have even had some code contributions to our various projects from people who discovered Matrix via GSoC!

It's our first year as a GSoC mentoring organisation and we were only allocated two project slots. This means that we had the tough decision of choosing between some really good projects - and that means a lot of you who applied will unfortunately be left feeling disappointed. Selecting our two projects was very difficult, and we talked it over until we all agreed. Please remember that not being picked does not mean that your proposal was bad.

If you missed out on a GSoC slot this year, that doesn't have to stop you from contributing, either by hacking on your own project or contributing to an existing Matrix project. It's a great way to hone your programming skills and we'll be more than happy to help out and support you - find us in #matrix:matrix.org and #matrix-dev:matrix.org.

All the best from the Matrix team and good luck to everyone in their summer projects, whether GSoC or not!

The Matrix Spring Special!

2016-03-26 — GSOC, General, Holiday SpecialMatthew Hodgson

It's been 3 months since the Matrix Holiday Special and once again we've all been too busy writing code to put anything that detailed on the blog. So without further a do here's a quick overview of how things have progressed so far in 2016!

🔗Home servers

🔗Synapse

Work on Synapse (our reference homeserver) has been primarily focused on improving performance. This may sound boring, but there's been a huge amount of improvement here since synapse 0.12 was released on Jan 4. Synapse 0.13 on Feb 10 brought huge CPU savings thanks to a whole fleet of caching and other optimisation work - the best way of seeing the difference here is to look at the load graph of the server that hosts matrix.org's synapse+postgres over the last few months:

matrix-org-load

Ignoring the unrelated blip during March, you can see an enormous step change in system load (which had a matching decrease in actual CPU usage) at the beginning of Feb when the 0.13 optimisations landed on matrix.org :)

Continue reading…

Matrix in Google Summer of Code!

2016-03-08 — GSOCOddvar Lovaas
GSoC2016Logo

We are very happy to be one of the companies selected for Google Summer of Code (GSoC) 2016!

GSoC is a great, global opportunity for students to work on open source projects during their university summer break. The idea is for students to propose a project for any of the open source organisations picked by Google, and - if accepted - receive a stipend for working on it. We are very eager to see what projects students will propose - we have written up some ideas here, but students are expected to do some research and come up with projects themselves.

If you are a student wanting to participate in GSoC for Matrix, please come talk to us in #gsoc:matrix.org - we are happy to discuss project ideas and review application drafts. We have also added some general tips on what to include in the application here.

Applications can be submitted starting next Monday, so there's still plenty of time to have a play with Matrix and come up with a cool project idea.

Good luck!