-
Notifications
You must be signed in to change notification settings - Fork 123
Locker API Component Design
rand edited this page May 19, 2011
·
1 revision
The Core Locker API is undergoing specification and design at the API Design page in the wiki. This page is for the overview of the service components that handle API calls in interaction with the Locker.
+----------------+
| PARSER |
+----------------+
| AUTHz |
+----------------+
| ROUTER + |
| QUERY BUILDER |
+----------------+
- PARSER receives API call
- PARSER extracts the following attributes from the query:
- application auth credentials
- type/subtype combinations
- PARSER passes application auth credentials and type/subtype combinations to the AUTHz component
- AUTHz checks the application auth credentials against a list of permitted type/subtype combinations
- if the auth credentials are approved, check the permissions map for those credentials
- if the type/subtype requests are supported by the application's permissions map, pass represented permissions to the QUERY BUILDER
- if the type/subtype requests don't fully match the the permissions map, pass supported permissions to the QUERY BUILDER and emit an error message with details about unsupported requests up the stack
- AUTHz checks the application auth credentials against a list of permitted type/subtype combinations
- PARSER passes type/subtype combinations to ROUTER
- ROUTER identifies which storage engines need to be addressed in order to support the API call
- ROUTER primes the QUERY BUILDER with data around the storage engines for which queries will be built
- PARSER builds an AST from the API call and passes it to the QUERY BUILDER
- QUERY BUILDER creates queries for the Collections and Connectors (and their underlying storage engines)
- QUERY BUILDER composes the responses from the internal queries, and passes the assembled response body to Locker Core to send as an API response