Skip to content

Design: Packages

Eric Hanson edited this page Oct 24, 2024 · 1 revision

This page discusses the design of the packaging system built on top of pg_delta for release and publications.

Pho Packages

A Pho Package is a commit tree, sub-selected from a Delta repository by a pho filter.

Pho Packages are distributions of software built in PostgreSQL and PostgreSQL data. They can be exported to file for download, or pushed and pulled from one computer to another.

A Pho Package contains one or more commits from a delta repository, meant for distribution, often versioned releases of a project. They're filtered from a delta repository by a Pho Filter, that selects a subset of commits from the repository and organizes them in a new tree, containing only commits suitable for release. They're often filtered and selected by, say, major version numbers, but can also be filtered based on time or any other criteria.

For example, a package could contain:

  • version 0.3 of a project
  • all major project versions in a single package
  • a snapshot of a repository every hour since June

.pho files

Under the hood, each release in contains:

  • tree of commits, each with a parent except the first commit
  • the row data for each commit, along with each field's value hash
  • a blob hash table containing all field values in the commit
  • dependency information

It's represented as a JSON object, and saved to files with the .pho extension.

pho CLI

The pho command-line package management system.

# pho get [ --latest-major | --head | --all | --all-major | --filter='1h' ] { *package_name* }

pho get pizzahut/toppings

# pho sources list
# pho sources add { *some_server_locator* }

pho sources add 192.168.1.22 # by IP? URL? hostname?

pho Server

Long-running daemon that serves and downloads content from other servers, a bi-directional publication and subscription system.

pho hub

Central package hub peer registry. phohub.com ?

Clone this wiki locally