From 972f849703e92b6659c7282e79a7b035ab0344d7 Mon Sep 17 00:00:00 2001 From: Yuriy Dupyn <2153100+omedusyo@users.noreply.github.com> Date: Mon, 30 Oct 2023 22:43:16 +0100 Subject: [PATCH] Add division of labour --- DIVISION_OF_LABOUR.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 DIVISION_OF_LABOUR.txt diff --git a/DIVISION_OF_LABOUR.txt b/DIVISION_OF_LABOUR.txt new file mode 100644 index 0000000..c7c2043 --- /dev/null +++ b/DIVISION_OF_LABOUR.txt @@ -0,0 +1,38 @@ + +Communication with client (mainly processing client's input) + * understand and implement the postgres protocol + * setup of concurrent connections + * when client sends a query, we send it to the parser "component" + +Parsing can be started now + basically a function + String -> Result + +Validation of operation + When parsing gives you an operation, it need not make sense (e.g. table doesn't exist) + So we need to validate the operation. + The output of the validation is + * relevant table + * an "augmented" operation (e.g. operation with type operation) + * reject when e.g. table doesn't exist, condition refers to non-existent column etc + * This phaze doesn't need access to rows nor indices, just table meta-data. + +==========Locking of tables should happen here======== + +Interpretation: + Change the state of the table given the validated operation + +Responding to the client + * with error messages + * with success message (after insert/delete etc) + * with rows + +==========Lock on the table should be dropped here=========== + +Serialization/Desearilization to disk + * There are two approaches, one is incremental (and very hard) + the other is: when the server is shut down. + + + +