Easiest Way to Add Radicle to Fleek

Hey! We’re starting to scope the work to enable Radicle users to deploy thru Fleek onto IPFS and/or the Internet Computer. And we had a few questions that will help us determine best way to do it. Any answers/info/suggestions on the below would be super helpful:

  1. Is there an API you are using to communicate with the default Radicle seed node (from http://seedling.radicle.xyz/)? And if so, is that API to the default Radicle seed node something we could potentially access/use? (this would be easiest solution to start as we wouldn’t even need our own seed node and users wouldn’t need to add another custom seed node)

  2. (in case #1 isn’t possible) Are we able to set up a seed node and peer it to the default radicle seed node? (to get list of projects and search by title or project id without needing the user to add another custom seed node)

  3. Are we able receive notification of new commits of listened projects? (for example how do we know when to trigger a new build - could we listen to new commits from the radicle default seed node)? And is there a way to get info from a local Radicle node peered to the Radicle default seed node (for example list of projects)?

6 Likes

Hey @harrison. It might be a bit early to get all of this working, but I’m curious to learn how Fleek’s overall architecture works, and how you envision it to evolve.

Specifically, I understand that I would currently sign up with Fleek, get an API key, and somehow make a call to the Fleek API (eg. from a GH action). What happens next is that Fleek would fetch my git repo from the URL I previously told it to, is that correct?

So, what we’re talking about is

  1. Users would need to make the API call from their local machine
  2. Instead of a URL, Fleek would fetch the git data from a peer-to-peer network

What this would essentially amount to is that Fleek would run their own seed node, and track the projects (ie. git repositories) of their customers. That seed node would bootstrap through other public seed nodes people might be using. That is, it would conceptually be similar to an IPFS pinning service, with the value-add that Fleek would take care of cross-publishing to other networks.

Since radicle-link is ultimately just git, there is also a different approach: people would continue to host their repositories on GH, but instruct Fleek to publish them onto Radicle on their behalf. Which is closer to what Fleek provides today, but seems to only provide value when there are gateways which know how to render static sites off Radicle git repos in the browser.

Let me know your thoughts.

2 Likes

Thanks for the response @kim! Right now we use GitHub for hosting the code of user’s sites, which we then deploy using various protocols (ipfs, dfinity, handshake, ENS). The idea with Radicle is that we want to use it as an alternative to GitHub. So we don’t want to mirror anything but rather have Radicle as a web3 alternative to GitHub.

This decision would be made by the user upon site creation in our UI.
So the user would select Radicle and would be greeted with a UI like on seedling.xyz. The idea is the user could search for his project ID or input his project ID and from there we “pin” the project and fetch the contents and deploy. And so basically one of the issues we are trying to solve is if the user pushes a commit, we need to be notified so that we can trigger a new deployment.

So as it relates to the question - correct this is not done on a local machine, but by using our current flow through the Fleek backend. So basically what we need is:

  1. Be able to peer with seedling.xyz so we can replicate that experience (hoping we can accomplish this by running a seed node). So we can get the list of projects alongside the name, description and ID, and be able to search by project ID.

  2. Be subscribed to changes in the Radicle project to trigger new deployments by fetching the content of the project.

Let me know if that makes sense and any feedback/suggestions!

1 Like

I wouldn’t be opposed to providing a web API for seed nodes, but that’s not how we’ve been thinking about this so far. The trouble is: when you peer with a specific seed, that seed needs to meet some SLA. That’s still an open question: who operates seeds, and what incentivises to do so?

In theory, gossip about project updates should be disseminated in the network, so a seed you run would eventually be notified, even if it is not currently connected to another seed node. The data would then also be replicated to your seed, provided it tracks the user’s project(s). What’s missing is an equivalent to the post-receive hook in git, which is invoked when the fetch is completed, and can trigger jobs on the seed machine.

In practice, the network and software is potentially not stable enough yet to make this good enough for you to meet your SLAs :innocent:

So another approach would be to have Fleek users configure Fleek’s seed in their list of bootstrap nodes, and Fleek’s seed track the projects those users want to have processed by Fleek. This way, whenever those users would connect, the relevant projects get synced. The difference to standard git hosting being that the server doesn’t need to manage push access.

The hook thing we’ll definitely add to the TODO list.

Ok thank you very much. I think that makes sense. So basically the user needs to add Fleek in their list of nodes before we can track the project. I think that’s fine. We can have instructions for that before allowing the user to search projects.

One thing we just wanted to clarify/confirm: This flow hinges on Radicle adding the hook though correct? But in meantime we can just not have the automatic site update and just use the trigger deploy temporarily, then when they have the hook we can add that feature in. Does that sound right? And do you have any ETA on when that hook might be added?

I would definitely like to use Radicle with Fleek, but even more-so do I love the idea of having hooks for building and deploying right from a seed-node, generally.

@harrison @RMBLRX Perhaps you could chime in here: Feature: post-fetch hooks · Issue #581 · radicle-dev/radicle-link · GitHub

It’s not terribly difficult to intercept these events, but there could be a high volume of them, depending on how exposed the node is. So we’re looking for some kind of pub/sub channel which wouldn’t block/leak when the consumers are slow, and I’m unsure what that could be.

This topic was raised in a more general form Decentralized Devops.

I like it, but it would require some changes to Radicle to enable it. I think those would be features to add to a full node. And I have a few ideas on how that could be implemented in a way that would allow for existing tools to reuse Radicle full nodes as SCM and artifact repositories following existing standards.