Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 12f22f2

Browse files
jyecuschdavemooreuws
authored andcommitted
update storage sequence diagrams
1 parent 09bcffb commit 12f22f2

File tree

1 file changed

+40
-17
lines changed

1 file changed

+40
-17
lines changed

docs/architecture/buckets.mdx

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,28 +85,51 @@ classDef edgeLabel line-height:2;
8585

8686
## 2. Sequence
8787

88+
### Build Sequence
89+
90+
Below is a sequence diagram showing the sequence of events that occur when a developer registers a bucket with Nitric. Including, optionally registering event handlers for file change events.
91+
8892
```mermaid
8993
sequenceDiagram
90-
participant Client as Client
91-
participant NitricSDK as Nitric SDK
92-
participant NitricRuntime as Nitric Runtime
93-
participant CloudStorage as Cloud Storage (e.g., S3, GCS)
94-
95-
Client->>NitricSDK: Perform storage operation (e.g., write, read, delete)
96-
NitricSDK->>NitricRuntime: Forward storage API call
97-
NitricRuntime->>CloudStorage: Execute storage operation
98-
99-
alt Successful Operation
100-
CloudStorage-->>NitricRuntime: Return result (e.g., data or success status)
101-
NitricRuntime-->>NitricSDK: Return result
102-
NitricSDK-->>Client: Return result to client
103-
else Failure
104-
CloudStorage-->>NitricRuntime: Return error
105-
NitricRuntime-->>NitricSDK: Forward error
106-
NitricSDK-->>Client: Return error response
94+
participant Worker as App Worker(s)
95+
participant SDK as Nitric SDK
96+
participant Nitric as Nitric CLI
97+
participant Provider as Nitric Provider
98+
participant IAC as IaC
99+
100+
Worker->>SDK: Register Bucket
101+
SDK->>Nitric: Register Bucket
102+
103+
opt Notifications
104+
Worker->>SDK: Register Event Callback
105+
SDK->>Nitric: Register Event Handler
106+
end
107+
108+
Nitric->>Provider: Forward Nitric Spec
109+
Provider->>IAC: Provision Bucket
110+
111+
opt Notifications
112+
Provider->>IAC: Provision Event Rule(s)
107113
end
108114
```
109115

116+
### Runtime Sequence
117+
118+
Below is a sequence diagram showing the runtime flow of a storage operation in a Nitric application, using the Nitric SDK. The SDK forwards the request to the Nitric runtime, which converts the request and forwards it to the cloud storage API. The plugin nature of the Nitric runtime allows for seamless integration with different cloud providers.
119+
120+
```mermaid
121+
sequenceDiagram
122+
participant Client as App Code
123+
participant SDK as Nitric SDK
124+
participant Nitric as Nitric Runtime
125+
participant CloudAPI as Cloud Storage (e.g. S3)
126+
127+
Client->>SDK: Read
128+
SDK->>Nitric: Forward Request
129+
Nitric->>Nitric: Convert Request
130+
Nitric->>CloudAPI: Storage API Request
131+
```
132+
110133
## 3. Component
111134

112135
### Bucket Module

0 commit comments

Comments
 (0)