redrabbit / git.limo

A Git source code management tool powered by Elixir with easy installation & high extensibility.
https://git.limo
MIT License
497 stars 42 forks source link

Distributed setup #60

Closed redrabbit closed 3 years ago

redrabbit commented 5 years ago

We want to run GitGud on a cluster. Running Phoenix on a multi-node environment works out of the box, same should apply to Absinthe PubSub (need to test this).

In order to distribute Git repositories through the cluster we will need to implement some kind of coordinator responsible for

Now, how Git data is stored completely depends on the configured libgit2 backend. For example if we configure our app to use the experimental :postgres backend, we don't store anything on the local filesystem (and most GitGud.RepoStorage are noops).

Our first implementation should work with the :filesystem backend. Using a consistent hash for distributing repositories among available nodes. We won't support failovers, redundancy, etc. This should be a proof-of-concept more than anything else.

The experimental postgres backend has been removed in commit 33056b3. We should only care about accessing repositories on the right node...

redrabbit commented 3 years ago

We now have support for distributed setup 🥳.

GitGud.RepoStorage and GitGud.RepoPool are both registered using :global using their associated volume.

See commit 8518731 for more details.