From 938098d038400e4dcd3b823cfaba231fa4ce742e Mon Sep 17 00:00:00 2001 From: sczembor Date: Wed, 21 Aug 2024 15:10:03 +0200 Subject: [PATCH] add diagrams to the example --- articles/062-binary-port.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/articles/062-binary-port.md b/articles/062-binary-port.md index ebb8129..1c5dd9d 100644 --- a/articles/062-binary-port.md +++ b/articles/062-binary-port.md @@ -33,6 +33,15 @@ Lets illustrate the workflow of using the binary port with a simplified example ### Flow with Sidecar: +```mermaid +sequenceDiagram + Client->Sidecar: JSON-RPC Request + Sidecar->>Node: Binary Request + Node->>Node: Process Request + Node->>Sidecar: Binary Response + Sidecar->>Client: JSON-RPC Response +``` + 1. **Construct JSON Request:** The client constructs a JSON-RPC request containing the transaction details. 2. **Send to Sidecar:** The request is sent to the sidecar over HTTP. 3. **Sidecar to Node (Binary)**: The sidecar translates the JSON request into a binary request and sends it to the node's binary port. @@ -42,6 +51,13 @@ Lets illustrate the workflow of using the binary port with a simplified example ### Flow with Direct Binary Communication: +```mermaid +sequenceDiagram + Client->>Node: Binary Request + Node->>Node: Process Request + Node->>Client: Binary Response +``` + 1. **Construct Binary Request:** The client directly constructs a binary request containing the transaction details using the appropriate SDK. 2. **Send to Node (Binary)**: The request is sent directly to the node's binary port over TCP. 3. **Node Processing:** The node processes the binary request, executes the transaction, and constructs a binary response.