Add division of labour
This commit is contained in:
parent
da9d9bf799
commit
972f849703
1 changed files with 38 additions and 0 deletions
38
DIVISION_OF_LABOUR.txt
Normal file
38
DIVISION_OF_LABOUR.txt
Normal file
|
|
@ -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<Operation, ParsingError>
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue