-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Internal] Documentation: Adds SDK and Gateway Sequence Diagram. #4287
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,69 @@ | ||||||
# Sequence Diagram for .NET v3 SDK and Gateway Interactions | ||||||
|
||||||
## Table of Contents | ||||||
|
||||||
* [Scope.](#scope) | ||||||
* [Sequence Diagram to Read Database and Collection Information.](#sequence-diagram-to-read-database-and-collection-information) | ||||||
* [Sequence Diagram to Read PkRange and Address Information.](#sequence-diagram-to-read-pkRange-and-address-information) | ||||||
|
||||||
## Scope | ||||||
|
||||||
The scope of this sequence diagram is to capture the compute/ routing gateway interactions with the `CosmosClient` configured in `Direct` mode. | ||||||
|
||||||
## Sequence Diagram to Read Database and Collection Information. | ||||||
|
||||||
```mermaid | ||||||
sequenceDiagram | ||||||
participant A as Cosmos .NET <br> v3 SDK | ||||||
participant B as GatewayAccountReader <br> [v3 Code] | ||||||
participant C as ClientCollectionCache <br> [v3 Code] | ||||||
participant D as PartitionKeyRangeCache <br> [v3 Code] | ||||||
participant E as GatewayAddressCache <br> [v3 Code] | ||||||
participant F as GatewayStoreModel <br> [v3 Code] | ||||||
participant G as CosmosHttpClient <br> [v3 Code] | ||||||
participant H as Routing Gateway <br> [Deployed on each Region] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
A->>B: Get Database <br> Account | ||||||
B->>G: HttpRequestMessage <br> (ResourceType = DatabaseAccount) | ||||||
G->>H: HttpRequestMessage <br> (ResourceType = DatabaseAccount) | ||||||
H-->>G: DatabaseAccount <br> Metadata Properties | ||||||
G-->>B: DatabaseAccount <br> Metadata Properties | ||||||
B-->>A: DatabaseAccount <br> Metadata Properties | ||||||
A->>C: Read Collection <br> Information | ||||||
C->>F: DocumentServiceRequest <br> (OperationType = Read) <br> (ResourceType = Collection) | ||||||
F->>G: DocumentServiceRequest | ||||||
G->>H: HttpRequestMessage <br> (ResourceType = Collection) | ||||||
H-->>G: Collection <br> Metadata Information | ||||||
G-->>F: Collection <br> Metadata Information | ||||||
F-->>C: Collection <br> Metadata Information | ||||||
C-->>A: Collection <br> Metadata Information | ||||||
``` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not just read database and container, this is client initialization, right? |
||||||
|
||||||
## Sequence Diagram to Read PkRange and Address Information. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When do these happen? Should we explain? Or link to the docs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
|
||||||
```mermaid | ||||||
sequenceDiagram | ||||||
participant A as Cosmos .NET <br> v3 SDK | ||||||
participant B as GatewayAccountReader <br> [v3 Code] | ||||||
participant C as ClientCollectionCache <br> [v3 Code] | ||||||
participant D as PartitionKeyRangeCache <br> [v3 Code] | ||||||
participant E as GatewayAddressCache <br> [v3 Code] | ||||||
participant F as GatewayStoreModel <br> [v3 Code] | ||||||
participant G as CosmosHttpClient <br> [v3 Code] | ||||||
participant H as Routing Gateway <br> [Deployed on each Region] | ||||||
A->>D: Get PkRange Call | ||||||
D->>F: DocumentServiceRequest <br> (OperationType = ReadFeed) <br> (ResourceType = PartitionKeyRange) | ||||||
F->>G: DocumentServiceRequest | ||||||
G->>H: HttpRequestMessage <br> (ResourceType = PartitionKeyRange) | ||||||
H-->>G: PartitionKeyRange <br> Metadata Information | ||||||
G-->>F: PartitionKeyRange <br> Metadata Information | ||||||
F-->>C: PartitionKeyRange <br> Metadata Information | ||||||
C-->>A: PartitionKeyRange <br> Metadata Information | ||||||
A->>E: Get Address <br> Information | ||||||
E->>F: DocumentServiceRequest <br> (OperationType = Read) <br> (ResourceType = Address) | ||||||
F->>G: DocumentServiceRequest | ||||||
G->>H: HttpRequestMessage <br> (ResourceType = Address) | ||||||
H-->>G: Partition Address <br> Metadata Information | ||||||
G-->>F: Partition Address <br> Metadata Information | ||||||
F-->>E: Partition Address <br> Metadata Information | ||||||
E-->>A: Partition Address <br> Metadata Information | ||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.