Project

General

Profile

Controller architecture » History » Version 3

Tom Clegg, 01/14/2019 09:46 PM

1 1 Tom Clegg
h1. Controller architecture
2
3
**arvados** (Apache2) defines a DBClient interface with the Arvados database operations, like CollectionList(Context, ListOptions) (CollectionListResponse, error). It also defines a Context interface that adds permission context to context.Context.
4
5
**rpc** (Apache2) implements arvados.DBClient by calling an Arvados controller's http service. It also provides an implementation of arvados.Context that wraps a token so it can be forwarded to the remote.
6
7
**pgdb** implements arvados.DBClient by doing PostgreSQL queries. Enforces permissions, validations, model integrity. It also implements a database-backed arvados.Context.
8
9 2 Tom Clegg
**pgdb/container** implements the Container/ContainerRequest methods of pgdb.DBClient. Also: pgdb/collection, pgdb/user, etc.
10
11
**pgdbrow** provides generic functions (used by pgdb/container et al.) to translate between object fields/transformations and SQL rows/statements.
12
13 1 Tom Clegg
**federation** implements arvados.DBClient by fanning out to multiple arvados.DBClient backends (typically one local and several remotes, to suit cluster config). Federation-unaware APIs fall through to a default pgdb.DBClient.
14
15
**router** maps HTTP requests to actions by checking auth scope and calling the appropriate arvados.DBClient method.
16
17
**server** listens on a port and serves http requests. Handler gets an arvados.Context from the (caller-provided) arvados.DBClient, and passes the request to a Router.
18
19
**controller** reads a cluster config file and starts a server backed by a federation.DBClient.
20 3 Tom Clegg
21
Diagram: https://docs.google.com/drawings/d/1Qsj7Re4kE1tNMy7RaNR_dc9U5t6vswMJOhCI2YlbsCM/edit?usp=sharing