Skip to content

How it maps onto Orbit

For a game on Saturn Rings.

  • A folder is such a game when it has .saturn/head. Beside it are state (the work the folder is on and where each piece of work stands), journal (what the folder’s files were when Saturn last looked), seen (what the server last said) and log (what was done here). One verb at a time changes them: each holds .saturn/busy while it runs.
  • While files are moved to another version, moving in .saturn says from which to which. If that is cut off, the next verb puts the folder right before it looks at it.
  • Files are cut into chunks, which are kept once on each computer, in ~/.saturn/cas, and on Orbit in Packframes. A tree of files is a Prolly tree. Its nodes travel in Packframes too, each named by its own hash, so a save asks Orbit which it lacks from the top of the tree down and sends only those.
  • refs/main is a line of commits, one for each ship. A piece of work is refs/works/<name>, and each commit of it says which commit of main it has in it, so a newer main is combined with no history to walk. A commit that has a clash in it says whose each of the three versions is.
  • save makes its commit on this computer first, combines in what others did as a commit of its own, and then moves the work’s ref on Orbit, which takes it only from where this folder last saw it. The same step takes and gives back locks.
  • ship makes a commit of main whose files are exactly what the checks ran on, and moves refs/main with it. Orbit takes it only if main has not moved, nothing it changes is held by other work, no clash is in it, and an agent’s work has been looked over. Then Orbit lets go of what the work held, and of its ref, unless more was saved to it from another folder in that moment: that part stays, unshipped.
  • undo of a ship is main, less the ship, plus what was there before it, combined three ways like anything else. The work goes back to its ref on top of that. Backing out of a clash makes a commit on this computer of the work as it was before the clash came in, with whatever else was saved since. The work’s ref on Orbit stays where it is, so the clash comes back with the next save.
  • A channel is refs/releases/<channel>, at a commit whose tree is the build’s files. It was made from the commit of main that was built, and from the channel’s build before it. Whoever plays it is told that tree, asks for the nodes of it and then the chunks that are not here by their hashes, and checks each against the hash it asked for. Orbit tells someone with no key of the channels anyone may play, and of nothing else.
  • A server on this computer is spoken to with plain sockets, and any other over HTTPS with curl. The key is given to curl on its input, not on its command line. Nothing that comes back is kept before it has been checked against the hash it was asked for by. A computer that has joined nothing, such as one that builds the game, can be given a link in SATURN_ORBIT_LINK: the key in it goes to the one game the link names.
  • What an engine makes is kept as a file is: chunks, and the nodes that lead to them, in ~/.saturn/cas and in Packframes. What it is kept under is a record of a few hundred bytes under the hash of the engine’s own names for it, in a folder for each game in ~/.saturn/ddc and on Orbit (/cache/ddc). The record is sent only once Orbit has all that it names, and it is sent again until Orbit takes it, unless Orbit says of that one record or its content that it will not have it. What is looked for on Orbit is asked for a few hundred kilobytes at a time, more on a quick line, and each chunk is kept as it comes. saturn ddc speaks to Unreal as a Cloud DDC does, as far as that is public, and to Unity as its cache server does; src/ddc/zen.rs and src/ddc/unity_cache.rs list which of it is from where.
  • A check that passed is written down in a folder for each game in ~/.saturn/checks and on Orbit (/cache/check) under the hash of the command, the root of the tree of what it read, Saturn’s version, the kind of computer, the tool’s version and whether a person or an agent ran it. It has all of that in it, with who and when, and is not believed under any other key. It is written once the ship has seen that the folder still holds what was checked, and that no file the check reads was written to since it began, as the disk tells it. Nothing an engine asks of saturn ddc reaches either place.