+
Skip to content

cfm/quorate

Repository files navigation

proxy-solver-api

A one-trick API for matching a member A absent from a meeting to a member P present at the meeting, according to whether and where P is listed in in A's exclusive proxy preferences.

  • If P is in A's proxy preferences, then P MAY represent A.

  • If P is not in A's proxy preferences, then P MAY NOT represent A.

  • Each P has a (that is, the same) proxy capacity c and MAY represent up to c As.

Architecture

https://github.com/cfm/ta-attendance-tools/wiki

Getting started

Beyond the usual cargo {build,run,test} invocations, make {build,run} wrap docker {build,run} for convenience.

Layout

$ tree -L 1
.
├── bin               # development scripts
├── functions         # → "src/", served as Netlify Functions
├── Cargo.lock
├── Cargo.toml
├── Dockerfile        # → nginx.conf + entrypoint.sh
├── entrypoint.sh     # → proxy-solver-api (from "cargo install")
├── LICENSE
├── Makefile
├── nginx.conf        # for CORS
├── README.md
├── requirements.txt  # for developer scripts in "bin/"
├── resources         # test fixtures
└── src

Usage

The API is implemented in Rocket and returns an OpenAPI specification at /openapi.json.

History

The original prototype of this API attempted to represent this problem as the traversal of the graph of members linked by their proxy preferences. However, it turns out to be much more tractable as an instance of the hospitals/residents problem.

A previous implementation in Python, using py-school-match, worked correctly but wasn't sufficiently performant for @tellurideassociation's dimensions: ~80 members, each of which at any given time has either c = 2 if present or a set of proxy preferences as large as 10 if absent.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载