From 6a78d0ab5324bf1caf7d7f2b79a8eb2b62921933 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 15:07:03 +0800 Subject: Update forge docs --- content/forge/internals/_index.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 content/forge/internals/_index.md (limited to 'content/forge/internals/_index.md') diff --git a/content/forge/internals/_index.md b/content/forge/internals/_index.md new file mode 100644 index 0000000..9d00291 --- /dev/null +++ b/content/forge/internals/_index.md @@ -0,0 +1,32 @@ +--- +title: Internals +--- + +This section describes some of the internals of the forge. + +It is not intended for end users or even system administrators, but only for +developers. + +## Architecture + +The **main forge daemon** handles HTTP requests, SSH connections, incoming +emails, IMAP access, the API, and just about anything that the user might +want to access. It connects to the PostgreSQL database for most of its data, +with the exception of Git repositories. + +The **git2d** daemon is a separate process that handles all Git operations. +Currently, the forge daemon automatically deploys and starts this daemon +when it is started, and connects via UNIX domain sockets. +Note that git2d is currently incomplete, so the forge daemon uses go-git for +many operations. + +Additionally, the main forge daemon currently launches instances of +git-receivv-pack and git-upload-pack for Git network operations. This will be +merged into git2d in the future. + +In the future Git operations may be delegated to multiple nodes by using TCP +instead of UNIX domain sockets and by ensuring all Git operations happen +through git2d. + +In the current architecture, git-receive-pack launches a pre-receive hook, +[hookc](hookc/). -- cgit v1.2.3