diff --git a/docs/explanations/architecture.rst b/docs/explanations/architecture.rst index 9dd2b0832..6d743b25b 100644 --- a/docs/explanations/architecture.rst +++ b/docs/explanations/architecture.rst @@ -31,58 +31,58 @@ This section talks briefly about various important modules. Main ---- -The starting point of the program is `Main.hs `_. +The starting point of the program is `Main.hs `_. CLI --- -Main then calls `CLI.hs `_, which is in charge of :ref:`cli`. +Main then calls `CLI.hs `_, which is in charge of :ref:`cli`. App --- -`App.hs `_ is then in charge of composing the different modules. +`App.hs `_ is then in charge of composing the different modules. Auth ---- -`Auth.hs `_ is in charge of :ref:`authn`. +`Auth.hs `_ is in charge of :ref:`authn`. Api Request ----------- -`ApiRequest.hs `_ is in charge of parsing the URL query string (following PostgREST syntax), the request headers, and the request body. +`ApiRequest.hs `_ is in charge of parsing the URL query string (following PostgREST syntax), the request headers, and the request body. A request might be rejected at this level if it's invalid. For example when providing an unknown media type to PostgREST or using an unknown HTTP method. Plan ---- -Using the Schema Cache, `Plan.hs `_ generates an internal AST, filling out-of-band SQL details (like an ``ON CONFLICT (pk)`` clause) required to complete the user request. +Using the Schema Cache, `Plan.hs `_ generates an internal AST, filling out-of-band SQL details (like an ``ON CONFLICT (pk)`` clause) required to complete the user request. A request might be rejected at this level if it's invalid. For example when doing resource embedding on a nonexistent resource. Query ----- -`Query.hs `_ generates the SQL queries (parametrized and prepared) required to satisfy the user request. +`Query.hs `_ generates the SQL queries (parametrized and prepared) required to satisfy the user request. Only at this stage a connection from the pool might be used. Schema Cache ------------ -`SchemaCache.hs `_ is in charge of :ref:`schema_cache`. +`SchemaCache.hs `_ is in charge of :ref:`schema_cache`. Config ------ -`Config.hs `_ is in charge of :ref:`configuration`. +`Config.hs `_ is in charge of :ref:`configuration`. Admin ----- -`Admin.hs `_ is in charge of the :ref:`admin_server`. +`Admin.hs `_ is in charge of the :ref:`admin_server`. HTTP ---- @@ -92,4 +92,4 @@ The HTTP server is provided by `Warp `_. Listener -------- -`Listener.hs `_ is in charge of the :ref:`listener`. +`Listener.hs `_ is in charge of the :ref:`listener`.