💾 Archived View for gemini.complete.org › gitsync-nncp-over-filespooler captured on 2024-08-18 at 17:44:17. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-07-09)
-=-=-=-=-=-=-
You can use gitsync-nncp[1] (a tool for Asynchronous[2] syncing of git[3] repositories) atop Filespooler[4]. This page shows how. Please consult the links in this paragraph for background on gitsync-nncp and Filespooler.
2: /asynchronous-communication/
How you will set up Filespooler depends, of course, on what kind of transport you are using. These examples assume a directory synchronization as with, for instance, Using Filespooler over Syncthing[5]. Of course, other transports are available.
5: /using-filespooler-over-syncthing/
There are two things to consider with gitsync-nncp: sending and receiving. Let's discuss sending first.
gitsync-nncp commands like `push_full` take a command (with optional parameters) to use to send data. After that command (and parameters), gitsync-nncp adds its own additional parameter: a branch name. This is a perfect fit for Filespooler. Here's an example script you might use. Let's call it `gitsync-send-fspl`:
#!/usr/bin/env bash set -euo pipefail fspl prepare -s ~/statefile -i - -- "$@" | \ fspl queue-write -q ~/queuedir
Now, call gitsync-nncp like this:
gitsync-nncp push ~/bin/gitsync-send-fspl
Easy! Of course, your `send-fspl` script could just as easily run over some other transport, add compression or encryption, etc.
Now, the counterpart: receiving. We can use the loosely-ordered mode here to allow us to receive from many machines in a Many-To-One with Filespooler[6] or many-to-many configuration.
6: /many-to-one-with-filespooler/
fspl queue-process -q ~/queuedir --allow-job-params --order-by=Timestamp \ --on-error=Leave gitsync-nncp -- receive ~/repopath
This will cause the parameter given to prepare -- the branch name -- to be appended after `gitsync-nncp receive ~/repopath`.
That's it!
--------------------------------------------------------------------------------
gitsync-nncp is a tool for using Asynchronous Communication[8] tools such as NNCP[9] or Filespooler[10], or even (with some more work) Syncthing[11] to synchronize git[12] repositories.
8: /asynchronous-communication/
13: /many-to-one-with-filespooler/
Since Filespooler[14] is an ordered queue processor by default, it normally insists on a tight mapping between the sequence numbers in job files and execution order in a queue.
15: /one-to-many-with-filespooler/
In some cases, you may want to use Filespooler[16] to send the data from one machine to many others. An example of this could be using gitsync-nncp over Filespooler[17] where you would like to propagate the changes to many computers.
17: /gitsync-nncp-over-filespooler/
Filespooler lets you request the remote execution of programs, including stdin and environment. It can use tools such as S3, Dropbox, Syncthing[19], NNCP[20], ssh, UUCP[21], USB drives, CDs, etc. as transport; basically, a filesystem is the network for Filespooler.
Filespooler is particularly suited to distributed and Asynchronous Communication[22].
22: /asynchronous-communication/
(c) 2022-2024 John Goerzen