Added documentation for some fuse-operations

master
Ruakij 3 years ago
parent 5ae0474644
commit af45216507

@ -0,0 +1,40 @@
@startuml
autonumber
hide footbox
footer "LTDFS | Ruakij"
title "Allocate space for opened file"
participant Client
control SiteA
boundary SiteB
boundary "Other Sites" as Others
Client -> SiteA ++ : fallocate
SiteA -> SiteA : Check owner
alt SiteA is owner
SiteA -> SiteA : Allocate space
alt No space left
SiteA --> Client : No space left\non device
end
SiteA ->> Others : Section changed
else SiteB is owner
SiteA -> SiteB ++ : Allocate space
SiteB -> SiteB : Allocate space
SiteB ->> Others : Section changed
SiteB --> SiteA -- : Done
SiteA ->> SiteA : Update cache
end
SiteA --> Client -- : Done
@enduml

@ -0,0 +1,22 @@
@startuml
autonumber
hide footbox
footer "LTDFS | Ruakij"
title "Initialize FS"
control SiteA
boundary "Other Sites" as Others
SiteA ++
SiteA -> Others ++ : TCP-Connect
SiteA -> Others : Get Indexes
Others --> SiteA : Indexes
note right
Indexes without
entries from SiteA
end note
@enduml

@ -0,0 +1,19 @@
@startuml
autonumber
hide footbox
footer "LTDFS | Ruakij"
title "Open Read"
participant Client
control SiteA
Client -> SiteA ++ : Open [r]
SiteA -> SiteA : Check availablility
SiteA --> Client -- : File opened
@enduml

@ -0,0 +1,50 @@
@startuml
autonumber
hide footbox
footer "LTDFS | Ruakij"
header "Local\nNot Owner"
title "Open Read&Write"
participant Client
control SiteA
boundary SiteB
boundary "Other Sites" as Others
Client -> SiteA ++ : Open [rw]
SiteA -> SiteA : Check owner
alt SiteB is owner
SiteA -> SiteA : Check availablility
alt File is locally available
SiteA -> SiteB ++ : Transfer ownership
SiteB -> SiteB : Lock file
alt Already locked
SiteB --> SiteA : File is locked
SiteA --> Client : File is locked
else Locked
SiteB ->> Others : File locked &\nOwnership changed
note left
Distribute Info
about Lock & Ownership
end note
SiteB --> SiteA -- : Ready
SiteA --> Client -- : File opened
end
end
end
@enduml

@ -0,0 +1,44 @@
@startuml
autonumber
hide footbox
footer "LTDFS | Ruakij"
header "Local\nOwner"
title "Open Read&Write"
participant Client
control SiteA
boundary "Other Sites" as Others
Client -> SiteA ++ : Open [rw]
SiteA -> SiteA : Check owner
alt Client is owner
SiteA -> SiteA : Lock file
alt Already locked
SiteA --> Client : File is locked
else Locked
SiteA ->> Others : File locked
note left
Distribute Info
about Lock
end note
end
end
SiteA -> SiteA : Check availablility
alt Locally available
SiteA --> Client -- : File opened
end
@enduml

@ -0,0 +1,54 @@
@startuml
autonumber
hide footbox
footer "LTDFS | Ruakij"
header "Not Local\nNot Owner"
title "Open Read&Write"
participant Client
control SiteA
boundary SiteB
boundary "Other Sites" as Others
Client -> SiteA ++ : Open [rw]
SiteA -> SiteA : Check owner
alt SiteB is owner
SiteA -> SiteA : Check availablility
alt File is not locally available
SiteA -> SiteB ++ : Lock file
SiteB -> SiteB : Lock file
alt Already locked
SiteB --> SiteA : File is locked
SiteA --> Client : File is locked
else Locked
SiteB ->> Others : File locked
note left
Distribute Info
about Lock
end note
SiteB --> SiteA -- : Ready
SiteA --> Client -- : File opened
note right
When reading or writing,
data will now be streamed.
> See read.puml for more Info
end note
end
end
end
@enduml

@ -0,0 +1,33 @@
@startuml
autonumber
hide footbox
footer "LTDFS | Ruakij"
title "Read from opened file"
participant Client
control SiteA
boundary SiteB
Client -> SiteA ++ : Read Section
SiteA -> SiteA : Check availablility
alt Not locally available
SiteA -> SiteB ++ : Read Section
SiteB --> SiteA -- : Section-Data
note right
Section-Data is
being streamed
end note
SiteA ->> SiteA ++ : Save in cache
SiteA --
end
SiteA --> Client -- : Section-Data
@enduml

@ -0,0 +1,39 @@
@startuml
autonumber
hide footbox
footer "LTDFS | Ruakij"
title "Write to opened file"
participant Client
control SiteA
boundary SiteB
boundary "Other Sites" as Others
Client -> SiteA ++ : Section-Data
SiteA -> SiteA : Check owner
alt SiteA is owner
SiteA -> SiteA ++ : Save Data
SiteA --> SiteA -- : Done
SiteA ->> Others : Section changed
else SiteB is owner
SiteA -> SiteA ++ : Save in cache
note right : Write-Back Cache
SiteA ->> SiteB ++ : Write Section-Data
SiteB -> SiteB ++ : Save Data
SiteB--
SiteB ->> Others -- : Section changed
SiteA --> SiteA -- : Done
end
SiteA --> Client -- : Done
@enduml

@ -0,0 +1,25 @@
@startuml
autonumber
hide footbox
footer "LTDFS | Ruakij"
header "Every few seconds"
title "Heartbeat"
control SiteA
boundary "Other Sites" as Others
SiteA ++
SiteA -> SiteA : Get latest changes\nin local cache
note right
Changes since
last heartbeat
end note
SiteA ->> Others ++ : Distribute changed\nlocal-cache-indexes
SiteA--
Others -> Others : Apply changes to\navailability-index
@enduml
Loading…
Cancel
Save