Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Registry

Diego Ongaro edited this page May 21, 2016 · 4 revisions

Idea: Registry

As more models become available, they should be easy for people to discover and try out on runway.systems.

Scenarios

Scenario 1: Browsing

Alice is interested in learning about coordination in distributed systems and wants to find related Runway models. Today, she searches GitHub, digs through the noise (runway is a commonly used word), scans READMEs, and loads them into Runway.

With the registry, Alice can load up runway.systems, open up a page/dialog, and browse or search through models. Screenshots let her recognize models quickly, and a scoring system brings the best models to the top of the list.

Scenario 2: Sharing

Bob, a developer, creates a model of his open source system. He'd like others to see it. Today, he tweets a link.

With the registry, Bob can register his model easily, and others can find it through runway.systems, expanding his reach.

Design Choices

Registration details in package.json

We could register Runway model packages (a directory containing one or more related models) with an NPM-style package.json file. Runway model packages already use those to describe the models contained within. The registry would only need to be told about a Runway model package, and it would extract the details from the package.json file.

An alternative would be to use a database separate from package.json, but this seems like it'd be harder for model writers to maintain.

Registering

How do we point the registry to a Runway model package containing a package.json file?

  • HTTP request
  • npm publish
  • Otherwise submit a tarball
  • README badge with magic image URL
  • Automatic after someone goes to runway.systems

The README badge has the advantage that if the registry information were somehow completely lost, it'd probably be mostly recreated after a few days. So perhaps you'd include an image at a URL like:

https://registry.runway.systems/badge.svg?repo=github.com/salesforce/runway-model-toomanybananas&branch=master

One issue is what if someone browses a stale Git commit which points the registry to a stale ref?

Do we need a way to force a refresh?

Identifying a Runway model package

We should probably have a nice string format to identify a Runway model package. This should include the protocol (usually Git or GitHub), repo, an optional ref (branch, tag), an optional subdirectory. Showing a particular model will need an ID on top of that.

Is there a de facto standard we can lift for this?

It seems better to use existing namespaces like GitHub's rather than creating a new one like npm did (leftpad fiasco).

Server-side

The registry will need an active server component which grabs the package.json files and indexes them and serves them efficiently. Where should they be stored?

API

What does the npm registry API look like?

Search by keyword, pagination, ranking.

Implementation language

Node? Go? Python?

Clone this wiki locally