KN4CK3R - got funding for working on federation

https://matrix.to/#/!bXIgKPtRdSXHBnVBaz:osgeo.org/$sDD-bfTV39WvUm172_pRyW2z82JcJ3u9JpkVZS-Yhks?via=libera.chat&via=t2bot.io&via=matrix.org

KN4CK3R got funding to work on federation for Gitea:

I announced this only in the internal channels but I applied for the german Prototype Fund in september and got selected for funding some weeks ago. Funding starts in march for 6 months. Topic is federation of Gitea too

1 Like

Yep, that’s right. As stated above I applied for the german Prototype Fund and got accepted for funding.

The following is the application text (in german):

# Prototypefund-Bewerbung Gitea

## Projekttitel

Gitea im Fediverse

## Projektbeschreibung

Gitea ist eine Anwendung zur Softwareentwicklung und stellt eine leichtgewichtige Alternative zu Quellcodehostern wie GitHub und Gitlab dar, da sie sich sehr leicht selbst hosten lässt. Das Gitea-Projekt gehört zu den Top 500 Projekten auf GitHub und ist mit über 100 Mio. Docker-Pulls ausgesprochen populär. Es eignet sich für Teams unterschiedlichster Größe zur Quellcodeverwaltung. Hierbei wird den Benutzern ermöglicht eigene Git-Repositories anzulegen und über ein eingebautes Ticket-System zu verwalten.

Eine Herausforderung fĂĽr die Zukunft stellt die Vernetzung einzelner Instanzen dar, die in diesem Projekt behandelt werden soll.

## Welche gesellschaftliche Herausforderung willst du mit dem Projekt angehen?

Bestehende proprietäre Anbieter wie GitHub und Bitbucket hosten ihre Angebote üblicherweise in Rechenzentren und bieten dem einzelnen Nutzer kaum Möglichkeiten zu überprüfen, was mit seinen Daten dort geschieht. Einen Ausweg hiervon bietet die Migration der eigenen Daten zu einer selbstgehosteten Gitea Instanz. Hierbei verliert der Nutzer aber den "Community-Faktor" der Plattform, über die er auch Projekte anderer Nutzer betrachten und an diesen beispielsweise durch Codeänderungen teilhaben kann. Durch die Zentralisierung müsste sich ein Benutzer im Extremfall bei jedem Projekt neu registrieren, um mit diesem zu interagieren.

Um diesen Nachteil auszugleichen, sollen Gitea Instanzen die Möglichkeit erhalten untereinander vernetzt zu werden. Dazu soll Gitea ein Teil des Fediverse werden und hierbei über standardisierte Protokolle Daten mit anderen Quellcodehostern austauschen. Dies würde es einem Benutzer ermöglichen mit seiner lokalen Gitea Instanz Projekte anderer Nutzer zu finden und diese zu nutzen. Fediverse ist als dezentrales Netzwerk konzipiert und führt damit nicht zu dem anfangs beschriebenen Vendor-Lock-in.

## Wie willst du dein Projekt technisch umsetzen?

Zur technischen Umsetzung der Vernetzung muss ein Daten-Protokoll auf Basis von ActivityPub (https://w3c.github.io/activitypub/) implementiert werden. Hierzu soll mit dem ForgeFed-Projekt (https://forgefed.peers.community/) zusammengearbeitet werden, das einen ersten Entwurf einer solchen Erweiterung für ActivityPub erstellt hat. Der Entwurf definiert unterschiedliche Entitäten für die Vernetzung von Quellcodehostern.

Umzusetzen sind folgende Punkte:
- Um das Protokoll nutzen zu können, müssen die internen Gitea Strukturen an die im Protokoll verwendeten Entitäten angepasst werden bzw. ein Mapping zwischen diesen erstellt werden.
- Für alle Aktoren (Benutzer, Repositories, Tickets) müssen ein- und ausgehende Schnittstellen (inbox, outbox) erstellt werden, mit denen sich fremde Instanzen verbinden können. Zu beidem müssen Möglichkeiten zur Zwischenspeicherung der Daten in der Datenbank geschaffen werden.
- Das Senden von Aktivitäten (Speichern in der outbox eines Aktors) muss mit den entsprechenden Funktionen in Gitea verbunden werden.
- Das Empfangen von Aktivitäten (Lesen aus der inbox eines Aktors) muss entsprechende Aktionen in Gitea auslösen (z.B. das Erstellen eines Tickets oder Kommentars).

## Welche ähnlichen Ansätze gibt es schon und was wird dein Projekt anders bzw. besser machen?

Um Quellcode zwischen Instanzen auszutauschen, können die Git Funktionen Push und Pull verwendet werden, die es per Skript erlauben, ein fremdes Repository zu spiegeln. Die Spiegelung bezieht sich hierbei üblicherweise nur auf den Quellcode und funktioniert nicht bidirektional.

Mit Vervis (https://dev.angeley.es/s/fr33domlover/r/vervis/) existiert eine Referenzimplementierung zum ForgeFed Protokoll, die als Demo-Plattform dient.

## Wer ist die Zielgruppe und wie soll dein Projekt sie erreichen?

Jeder, der bereits jetzt Gitea einsetzt, kann von der Erweiterung zum Vernetzen mit anderen Instanzen profitieren. Sobald eine neue Instanz dem Fediverse beitritt, kann sie auf die Inhalte anderer Nutzer zugreifen und umgekehrt.

Auch private Netzwerke innerhalb einer Organisation lassen sich auf diese Weise bilden und ermöglichen somit den Zusammenschluss verschiedener Standorte oder Bereiche.

## Skizziere kurz die wichtigsten Meilensteine, die im Förderzeitraum umgesetzt werden sollen.

- Evaluation der Protokolle und Planung der anzupassenden Codestellen
- Schnittstellen-Implementierung fĂĽr die Aktoren Benutzer, Repository und Ticket.
- Test-Anbindung von Gitea zu Vervis

There is no tasklist included but some milestones what should be done:

  • Evaluation of the forgefed protocol and how it can be used in Gitea
  • Implementing the protocol for the actors user, repository and ticket
  • Testing with Vervis
3 Likes

Thanks for sharing! Here is an English translation for the archival.


Prototypefund application Gitea

project title

Gitea in Fediverse

Project description

Gitea is a software development application that provides a lightweight alternative to source code hosts like GitHub and Gitlab because it is very easy to self-host. The Gitea project is one of the top 500 projects on GitHub and is extremely popular with over 100 million Docker pulls. It is suitable for teams of various sizes for source code management. Users can create their own Git repositories and manage them via a built-in ticket system.

A challenge for the future is the networking of individual instances, which will be addressed in this project.

What social challenge do you want to address with this project?

Existing proprietary providers such as GitHub and Bitbucket usually host their service in their data centers and offer individual users little opportunity to check what happens to their data there. One way out of this is to migrate one’s own data to a self-hosted Gitea instance. In this case, however, the user loses the “community factor” of the platform, through which they can also view projects of other users and participate in them, for example, by making code changes. Due to centralization, in extreme cases a user would have to register anew for each project in order to interact with it.

To compensate for this disadvantage, Gitea instances should be given the opportunity to be networked with each other. For this purpose, Gitea should become part of the Fediverse and exchange data with other source code forges via standardized protocols. This would allow a user to find and use projects of other users with their local Gitea instance. Fediverse is designed as a decentralized network and thus does not lead to the vendor lock-in problem described at the beginning.

How do you want to implement your project technically?

For the technical implementation of the network, a data protocol based on ActivityPub (ActivityPub) has to be implemented. For this purpose, we will collaborate with the ForgeFed project (https://forgefed.peers.community/), which has created a first draft of such an extension for ActivityPub. The draft defines different entities for the networking of source code forges.

The following points have to be implemented:

  • To be able to use the protocol, the internal Gitea structures have to be adapted to the entities used in the protocol or a mapping between them has to be created.
  • For all actors (users, repositories, tickets), incoming and outgoing interfaces (inbox, outbox) must be created, to which foreign instances can connect. For both, possibilities for intermediate storage of data in the database must be created.
  • Sending activities (storing in the outbox of an actor) must be connected to the corresponding functions in Gitea.
  • Receiving activities (reading from an actor’s inbox) must trigger corresponding actions in Gitea (e.g. creating a ticket or comment).

What similar approaches already exist and what will your project do differently or better?

To share source code between instances, you can use Git’s push and pull functions, which allow you to mirror a foreign repository via script. The mirroring usually only applies to the source code and does not work bidirectionally.

With Vervis (https://dev.angeley.es/s/fr33domlover/r/vervis/) a reference implementation of the ForgeFed protocol exists, which serves as a demo platform.

Who is the target audience and how should your project reach them?

Anyone already using Gitea can benefit from the extension to network with other instances. Once a new instance joins the Fediverse, it can access other users’ content and vice versa.

Private networks within an organization can also be formed in this way, allowing different sites or divisions to join together.

Briefly outline key milestones to be implemented during the grant period.

  • Evaluation of the forgefed protocol and how it can be used in Gitea
  • Implementing the protocol for the actors user, repository and ticket
  • Testing with Vervis
1 Like

@KN4CK3R would you like to make a short presentation (5 minutes) about your future work during the webinar next week?

I did not made a plan until today what should be done. The biggest part will be the evaluation of the federated protocol and how it could be integrated into Gitea. I think I can attend the webinar. Just to be clear, it’s 10:00 UTC+1 in the morning? The title says “AM”, fine.

2 Likes

Yes, it is 10 in the morning. Some people are in mainland China and it would be difficult for them to attend if it was in the evening. Very much looking forward to have you :slight_smile:

The project is now displayed at the Prototype Fund website: Gitea im Fediverse - Prototype Fund

3 Likes

@KN4CK3R: You are kindly invited to join us on the software forge federation Matrix chatroom. Matrix is a lot of fun but should you prefer Discord, the same room is bridged to this Discord server

1 Like

@KN4CK3R in case you did not notice already (it was discussed on the Matrix channel only AFAIK), @fr33domlover brought the vervis server and code back online as of yesterday:

https://dev.openheart.work/s/fr33domlover/r/vervis/s