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 inA
's proxy preferences, thenP
MAY representA
. -
If
P
is not inA
's proxy preferences, thenP
MAY NOT representA
. -
Each
P
has a (that is, the same) proxy capacityc
and MAY represent up toc
A
s.
https://github.com/cfm/ta-attendance-tools/wiki
Beyond the usual cargo {build,run,test}
invocations, make {build,run}
wrap
docker {build,run}
for convenience.
$ 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
The API is implemented in Rocket and returns an OpenAPI specification at
/openapi.json
.
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.