github.com/rohankumardubey/proxyfs@v0.0.0-20210108201508-653efa9ab00e/docs/source/architecture/uml/create-file.uml (about) 1 @startuml 2 participant Client 3 participant ProxyFS 4 participant "Namespace\nDistributed\nLock Manager" as DLM 5 participant "Swift Proxy\nsupporting\nHTTP PATCH" as SP 6 participant "Object\nServer" as OBJ 7 participant "Container\nServer" as CONT 8 9 Client->ProxyFS: create("/tmp/foo/cat.jpg") 10 11 ProxyFS->DLM: shared-lock-request([/]) 12 DLM->ProxyFS: shared-lock-grant([/]) 13 loop until "tmp" found 14 ProxyFS->SP: GET([/] to find "tmp" dirent) 15 loop 16 SP->OBJ: GET(BTree nodes in [/] LogSegments) 17 OBJ->SP: GET Response 18 end 19 SP->ProxyFS: GET Response 20 end 21 ProxyFS->DLM: shared-lock-release([/]) 22 DLM->ProxyFS: shared-lock-released([/]) 23 24 ProxyFS->DLM: shared-lock-request([/tmp/]) 25 DLM->ProxyFS: shared-lock-grant([/tmp/]) 26 loop until "foo" found 27 ProxyFS->SP: GET([/tmp/] to find "foo" dirent) 28 loop on "read plan" 29 SP->OBJ: GET(BTree nodes in [/tmp/] LogSegments) 30 OBJ->SP: GET Response 31 end 32 SP->ProxyFS: GET Response 33 end 34 ProxyFS->DLM: shared-lock-release([/tmp/]) 35 DLM->ProxyFS: shared-lock-released([/tmp/]) 36 37 ProxyFS->DLM: exclusive-lock-request([/tmp/foo/]) 38 DLM->ProxyFS: exclusive-lock-grant([/tmp/foo/]) 39 loop until "cat.jpg" known to be missing 40 ProxyFS->SP: GET([/tmp/foo/] to not find "cat.jpg" dirent) 41 loop on "read plan" 42 SP->OBJ: GET(BTree nodes in [/tmp/foo/] LogSegments) 43 OBJ->SP: GET Response 44 end 45 SP->ProxyFS: GET Response 46 end 47 48 ProxyFS->SP: PUT([/tmp/foo/cat.jpg]'s "zeroth" LogSegment (no content)) 49 ProxyFS->SP: PUT([/tmp/foo/cat.jpg]'s empty "zeroth" LogSegment) 50 SP->OBJ: PUT([/tmp/foo/cat.jpg]'s empty "zeroth" LogSegment) 51 OBJ->CONT: Add([/tmp/foo/cat.jpg]'s "zeroth" LogSegment) 52 CONT->OBJ: Add request queue'd 53 OBJ->SP: PUT OK 54 SP->ProxyFS: PUT OK 55 56 ProxyFS->SP: PATCH([/tmp/foo/] with dirent mapping "cat.jpg" to [/tmp/foo/cat.jpg]) 57 SP->OBJ: PUT([/tmp/foo/]'s "next" LogSegment) 58 OBJ->CONT: Add([/tmp/foo/]'s "next" LogSegment) 59 CONT->OBJ: Add request queue'd 60 OBJ->SP: PUT OK 61 SP->ProxyFS: PATCH OK 62 ProxyFS->DLM: exclusive-lock-release([/tmp/foo/]) 63 DLM->ProxyFS: exclusive-lock-released([/tmp/foo/]) 64 65 66 ProxyFS->Client: create("/tmp/foo/cat.jpg") successful 67 @enduml