github.com/rohankumardubey/proxyfs@v0.0.0-20210108201508-653efa9ab00e/docs/source/architecture/uml/bimodal-get.uml (about) 1 @startuml 2 3 title Bimodal GET API - ReadPlan 4 5 autonumber 6 7 box "Swift WSGI" 8 participant WSGI 9 participant RPCclient 10 end box 11 box "ProxyFS" 12 participant PFSrpcsvr 13 participant PFSfs 14 participant PFSinode 15 end box 16 participant SwiftBE 17 18 ->WSGI:<URI>?GET with list of ranges 19 20 WSGI -> WSGI:Virtual account 21 22 WSGI -> RPCclient:<B><I>proxyfs_get_read_plan(vPATH, array of</I></B>\n<B><I>ranges [start-byte, length][start-byte, length]...)</I></B>\nEmpty range means all. 23 24 RPCclient -> PFSrpcsvr:<B><I>RpcGetReadPlan(vPATH, array of</I></B>\n<B><I>ranges [start-byte, length][start-byte, length]..., number of entries)</I></B>\nEmpty range means all 25 26 PFSrpcsvr -> PFSrpcsvr:Get mapping of vAccount to volumeName 27 28 PFSrpcsvr -> PFSfs:If volume is not mounted for this user,\n<B><I>fs.Mount(volumeName, mountOptions, authUser)</I></B> 29 30 PFSfs -> PFSrpcsvr:Return mountId, rootInodeNumber, err 31 32 33 PFSrpcsvr -> PFSfs:<B><I>fs.Get(mountId, rootInodeNumber, vObjectName)</I></B> 34 PFSfs -> PFSfs:Lookup fileInode of object,\n<B><I>fs.Lookup(mountId, rootInodeNumber, vObjectName)</I></B> 35 36 PFSfs -> PFSfs:Return fileInode 37 38 PFSfs -> PFSfs: Retrieve read plan <B><I>fs.GetReadPlan(fileInode, array of</I></B>\n<B><I>ranges [start-byte, length][start-byte, length]..., number of entries)</I></B>\nEmpty range means all 39 40 PFSfs -> PFSinode: foreach range\n<B><I>inode.GetReadPlan(fileInodeNumber, offset, length)</I></B> 41 42 PFSinode -> PFSfs: Response is read plan for given offset and length 43 44 PFSfs -> PFSrpcsvr:Response is complete read plan 45 46 PFSrpcsvr -> RPCclient:Response for\n<B><I>RpcGetReadPlan(vPATH)</I></B> is\n(pPATH, offset, length) tuples and status 47 48 RPCclient -> WSGI: Response for\n<B><I>proxyfs_get_read_plan(vPATH)</I></B> is\npPATH, offset, length) tuples and status 49 50 WSGI -> SwiftBE:Reads data using read plan. 51 52 SwiftBE -> WSGI:Response to reading is data and status. 53 54 55 WSGI -> RPCclient:<B><I>proxyfs_get_read_plan_done(vPATH)</I></B>\nDone with read plan 56 RPCclient -> PFSrpcsvr:Done with read plan (DETAILS) 57 PFSrpcsvr -> PFSfs:Done with read plan (DETAILS) 58 PFSfs -> PFSinode:Done with read plan (DETAILS) 59 PFSinode -> PFSfs:Response to done with read plan (DETAILS) 60 61 PFSfs -> PFSrpcsvr: Return status 62 PFSrpcsvr -> RPCclient: Return status 63 RPCclient -> WSGI: Return status 64 65 @enduml