github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/design/archive/0/requests-0.0.1/request-serializable.md (about) 1 # Request Handling 2 3 ```mermaid 4 sequenceDiagram 5 participant B as Bus 6 participant SH as ishandler 7 participant BaH as ibatch 8 participant RH as RequestHandler 9 participant BaDB as ibatchstate 10 participant PDB as ipdb 11 participant iappdb as iappdb 12 participant idb as idb 13 14 15 B -->> SH: Request 16 opt Batch is small 17 SH-->> BaH: Request 18 BaH-->> BaH: Find Request Handler 19 loop Until PLogEntry is applied well 20 BaH->> BaH: Remember Batch Position 21 BaH->> RH: Request 22 opt Read-only requests 23 RH ->> BaDB: Get* 24 opt Not in-cache 25 BaDB ->> PDB: Get* 26 end 27 end 28 RH ->> BaH: PLogEntry 29 BaH ->> BaDB: Apply PLogEntry, Batch Position 30 BaDB ->> BaDB: Check conflicts starting from Batch Position 31 32 end 33 34 end 35 opt Batch is enough or timeout 36 SH->> BaH: Get PLogEntries 37 BaH->>BaH: Wait 38 SH->> PDB: Apply PLogEntries 39 PDB ->> iappdb: rw 40 iappdb ->> idb: rw 41 end 42 43 ``` 44 45 # Recovering 46 47 - During recovering PLogEntries are read and re-applied 48