Skip to content

LSIF: RFC127-1: Add API between backend and database

Warren Gifford requested to merge lsif-dump-manager-1 into master

Created by: efritz

This is the first step to reduce the dependency on local disk in lsif-server. Currently lsif-server and lsif-worker share a persistent volume, which makes it impossible to scale or separate either.

RFC 127 (summarized) introduces a dump-manager process with which the two communicate. The dump manager is (currently singleton) service with a persistent volume and will be the only one with persistent disk that is used for anything other than scratch space.

This PR moves a portion of the server responsibilities into the dump manager, but there's still a ways to go. Changes get very large if done in a single PR, so I'm splitting them by behavior.

The resulting APIs are minimally changed but not very nice. These will be reworked in a future PR to minimize data transfer and coupling.

Summary of changes:

  • move server/backend/database.ts (and required cache/location classes) to dump-manager/backend.
  • add HTTP API routes in dump manager to serve the public methods of the database class
  • replace the server's copy of the database class with HTTP GET requests to the dump manager

Merge request reports

Loading