From 7433c147c981256ca36f8a3941350f17174769e9 Mon Sep 17 00:00:00 2001 From: narawat Date: Wed, 18 Feb 2026 20:55:18 +0700 Subject: [PATCH] update --- docs/architecture.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index 2bb2812..65ad9fd 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -36,7 +36,7 @@ The system uses a **standardized list-of-tuples format** for all payload operati [(dataname1, data1, type1), (dataname2, data2, type2), ...] # Output format for smartreceive (always returns a list of tuples) -[(dataname1, data1), (dataname2, data2), ...] +[(dataname1, data1, type1), (dataname2, data2, type2), ...] ``` **Supported Types:** @@ -83,7 +83,7 @@ smartsend( # Receive always returns a list payloads = smartreceive(msg, fileserverDownloadHandler, max_retries, base_delay, max_delay) -# payloads = [("dataname1", data1), ("dataname2", data2), ...] +# payloads = [("dataname1", data1, type1), ("dataname2", data2, type2), ...] ``` ## Architecture Diagram @@ -338,13 +338,13 @@ function smartreceive( # If direct: decode Base64 payload # If link: fetch from URL with exponential backoff using fileserverDownloadHandler # Deserialize payload based on type - # Return list of (dataname, data) tuples + # Return list of (dataname, data, type) tuples end ``` **Output Format:** -- Always returns a list of tuples: `[(dataname1, data1), (dataname2, data2), ...]` -- Even for single payloads: `[(dataname1, data1)]` +- Always returns a list of tuples: `[(dataname1, data1, type1), (dataname2, data2, type2), ...]` +- Even for single payloads: `[(dataname1, data1, type1)]` **Process Flow:** 1. Parse the JSON envelope to extract the `payloads` array @@ -354,7 +354,7 @@ end - If `direct`: decode Base64 data from the message - If `link`: fetch data from URL using exponential backoff (via `fileserverDownloadHandler`) - Deserialize based on payload type (`dictionary`, `table`, `binary`, etc.) -4. Return list of `(dataname, data)` tuples +4. Return list of `(dataname, data, type)` tuples **Note:** The `fileserverDownloadHandler` receives `(url::String, max_retries::Int, base_delay::Int, max_delay::Int, correlation_id::String)` and returns `Vector{UInt8}`. @@ -409,7 +409,7 @@ async function smartreceive(msg, options = {}) - If `direct`: decode Base64 data from the message - If `link`: fetch data from URL using exponential backoff - Deserialize based on payload type (`dictionary`, `table`, `binary`, etc.) -4. Return list of `(dataname, data)` tuples +4. Return list of `(dataname, data, type)` tuples ## Scenario Implementations