Vision
Applications are registered on-chain. App store/aggregator is backed by chain for security (think: chain version of signing a binary) & off-chain for storage & distribution of files.
Flows
Publish
- Dev app.
- Compile app.
- Specify metadata re: default configuration of app (e.g., consider file-transfer: we want to start client & server, registering they can start client_worker & server_worker).
- Submit app to signed & distro app. Handles signed app, hashing, sending tx to chain, and advertising our node as distributor of app (i.e. messaging store/aggregator).
- Others should also be able to distribute. For security, always check hashes aginst chain so we can safely DL from alternative sources. This ends up looking something like choosing to seed a torrent. E.g., when you DL you can check a box to seed -> you register with app store/aggregator and now store/aggregator will direct some DL requests to you.
Download
- App store/aggregator provides feed of apps & search.
- Click into app: see app page with images, title, description, distributor, versions(?), payment(?), download button.
- Click download ->
- Get the file from one of the seeders.
- Check files against claims made on chain (hashes, sigs, etc).
- Start files according to default configuration. An alternative here is like app store on phone: a button to "Open" app after DL completes. This indicates (at least) two types of apps: an app that is only "on" when it is displaying stuff on screen and an app that is always "on". file-transfer is an example of "always on". A single player Pokemon-type game is an example of only "on" when displaying.
Tools to build MVP
- PM
- file transfer
- file system
- explorer
- HTTP stuff
What does MVP contain?
Off-chain stuff, built in a stepwise manner.
App distro contains a more general "distribute/download files" flow. E.g., define a "package" of files to distribute, make them available, and then advertise (or not). App distro is just a couple extra steps at the end to confirm files & install according to default configuration.
System components
vfs, documented elsewhere.distributor.- Hooks into PM to make package distro system into app distro system (e.g. call package distro via these hooks, which, when files have been received, check hashes & then install according to default configuration file).
- OTA system.
- Chain hooks, for adding tx asserting about app package & for checking those txs.
distributor uses a vfs_worker
In group call today, 230905, the idea of process-specific VFSs came up.
distributor would be a case where such a vfs_worker would be needed.
Packages are sets of files (perhaps with dir hierarchy) that are distributed as a unit: very natural to be represented within a vfs.