Skip to content

Locker API Component Design

rand edited this page May 19, 2011 · 1 revision

Core Locker API

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  |
+----------------+

Process Flow

  1. PARSER receives API call
  2. PARSER extracts the following attributes from the query:
    • application auth credentials
    • type/subtype combinations
  3. PARSER passes application auth credentials and type/subtype combinations to the AUTHz component
    1. 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
  4. PARSER passes type/subtype combinations to ROUTER
    1. ROUTER identifies which storage engines need to be addressed in order to support the API call
    2. ROUTER primes the QUERY BUILDER with data around the storage engines for which queries will be built
  5. PARSER builds an AST from the API call and passes it to the QUERY BUILDER
  6. QUERY BUILDER creates queries for the Collections and Connectors (and their underlying storage engines)
  7. QUERY BUILDER composes the responses from the internal queries, and passes the assembled response body to Locker Core to send as an API response
Clone this wiki locally