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

Commit 909d705

Browse files
jyecuschdavemooreuws
authored andcommitted
update kv sequences
1 parent 12f22f2 commit 909d705

File tree

2 files changed

+39
-18
lines changed

2 files changed

+39
-18
lines changed

docs/architecture/buckets.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ sequenceDiagram
9898
participant IAC as IaC
9999
100100
Worker->>SDK: Register Bucket
101+
Worker->>SDK: Register Access Requirements
101102
SDK->>Nitric: Register Bucket
103+
SDK->>Nitric: Register Access Requirements
102104
103105
opt Notifications
104106
Worker->>SDK: Register Event Callback
@@ -107,9 +109,11 @@ sequenceDiagram
107109
108110
Nitric->>Provider: Forward Nitric Spec
109111
Provider->>IAC: Provision Bucket
112+
Provider->>IAC: Provision IAM
110113
111114
opt Notifications
112115
Provider->>IAC: Provision Event Rule(s)
116+
Provider->>IAC: Provision IAM
113117
end
114118
```
115119

docs/architecture/keyvalue.mdx

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,43 @@ classDef edgeLabel line-height:2;
7070

7171
## 2. Sequence
7272

73+
### Build Sequence
74+
75+
Below is a sequence diagram showing the sequence of events when a developer registers a Key/Value store with Nitric.
76+
77+
```mermaid
78+
sequenceDiagram
79+
participant Worker as App Worker(s)
80+
participant SDK as Nitric SDK
81+
participant Nitric as Nitric CLI
82+
participant Provider as Nitric Provider
83+
participant IAC as IaC
84+
85+
Worker->>SDK: Register Key/Value Store
86+
Worker->>SDK: Register Access Requirements
87+
SDK->>Nitric: Register Key/Value Store
88+
SDK->>Nitric: Register Access Requirements
89+
90+
Nitric->>Provider: Forward Nitric Spec
91+
Provider->>IAC: Provision Key/Value Store
92+
Provider->>IAC: Provision IAM
93+
```
94+
95+
### Runtime Sequence
96+
97+
Below is a sequence diagram showing the runtime flow of a key/value store operation using Nitric. The example shows a Get operation, which reads a value by its key.
98+
7399
```mermaid
74100
sequenceDiagram
75-
participant Client as Client
76-
participant NitricSDK as Nitric SDK
77-
participant NitricRuntime as Nitric Runtime
78-
participant DynamoDB as DynamoDB
79-
80-
Client->>NitricSDK: Request to set/get/delete a key-value
81-
NitricSDK->>NitricRuntime: Forward API call with key, value, or operation
82-
NitricRuntime->>DynamoDB: Perform operation (GetItem, PutItem, DeleteItem, Scan)
83-
84-
alt Successful Operation
85-
DynamoDB-->>NitricRuntime: Return result (e.g., value, success status)
86-
NitricRuntime-->>NitricSDK: Return result
87-
NitricSDK-->>Client: Return result to client
88-
else Failure
89-
DynamoDB-->>NitricRuntime: Return error (e.g., AccessDenied, NotFound)
90-
NitricRuntime-->>NitricSDK: Forward error
91-
NitricSDK-->>Client: Return error response
92-
end
101+
participant Client as App Code
102+
participant SDK as Nitric SDK
103+
participant Nitric as Nitric Runtime
104+
participant CloudAPI as Document DB
105+
106+
Client->>SDK: Get(key)
107+
SDK->>Nitric: Forward Request
108+
Nitric->>Nitric: Convert Request
109+
Nitric->>CloudAPI: Key/Value API Request
93110
```
94111

95112
## 3. Component

0 commit comments

Comments
 (0)