rename to smartpack n smartunpack
This commit is contained in:
@@ -54,7 +54,7 @@ msghandler is a cross-platform, bi-directional data bridge that enables seamless
|
||||
|---------|-------------|
|
||||
| Cross-platform interoperability | Seamless data exchange between Julia, JavaScript, Python, Dart, Rust, and MicroPython |
|
||||
| Intelligent transport selection | Direct transport (<0.5MB) vs Link transport (≥0.5MB) based on payload size |
|
||||
| Unified API | Consistent `smartsend()` and `smartreceive()` functions across all platforms |
|
||||
| Unified API | Consistent `smartpack()` and `smartunpack()` functions across all platforms |
|
||||
| Multi-payload support | List of (dataname, data, type) tuples with appropriate handling |
|
||||
| File server integration | Plik one-shot upload and custom HTTP server support |
|
||||
| Reliability features | Exponential backoff retry and correlation ID propagation |
|
||||
@@ -323,10 +323,10 @@ msghandler is a cross-platform, bi-directional data bridge that enables seamless
|
||||
|
||||
## 11. API Contract
|
||||
|
||||
### 11.1 smartsend Signature
|
||||
### 11.1 smartpack Signature
|
||||
|
||||
```julia
|
||||
function smartsend(
|
||||
function smartpack(
|
||||
subject::String,
|
||||
data::AbstractArray{Tuple{String, T1, String}, 1};
|
||||
broker_url::String = DEFAULT_BROKER_URL,
|
||||
@@ -345,12 +345,12 @@ function smartsend(
|
||||
)::Tuple{msg_envelope_v1, String} where {T1<:Any}
|
||||
```
|
||||
|
||||
**Note**: Publishing via the transport layer is the caller's responsibility. `smartsend` returns `(env::msg_envelope_v1, env_json_str::String)`.
|
||||
**Note**: Publishing via the transport layer is the caller's responsibility. `smartpack` returns `(env::msg_envelope_v1, env_json_str::String)`.
|
||||
|
||||
### 11.2 smartreceive Signature
|
||||
### 11.2 smartunpack Signature
|
||||
|
||||
```julia
|
||||
function smartreceive(
|
||||
function smartunpack(
|
||||
msg_json_str::String;
|
||||
fileserver_download_handler::Function = _fetch_with_backoff,
|
||||
max_retries::Int = 5,
|
||||
@@ -359,9 +359,9 @@ function smartreceive(
|
||||
)::JSON.Object{String, Any}
|
||||
```
|
||||
|
||||
**Note**: Pass the payload string from the transport subscription to `smartreceive`. The input is the JSON string payload from the transport message, not the transport message object directly.
|
||||
**Note**: Pass the payload string from the transport subscription to `smartunpack`. The input is the JSON string payload from the transport message, not the transport message object directly.
|
||||
|
||||
**Note**: Pass the payload from the transport subscription to `smartreceive`.
|
||||
**Note**: Pass the payload from the transport subscription to `smartunpack`.
|
||||
|
||||
---
|
||||
|
||||
@@ -411,8 +411,8 @@ function smartreceive(
|
||||
| - | - | Updated all NATS references to generic "transport layer"/"message broker" |
|
||||
| - | - | Removed NATS client packages from dependencies tables |
|
||||
| 2026-05-13 | 1.2.0 | Aligned with ground truth implementation (src/msghandler.jl) |
|
||||
| - | - | Fixed smartsend signature: removed is_publish, NATS_connection; added sender_name |
|
||||
| - | - | Fixed smartreceive signature: takes msg_json_str::String instead of msg::NATS.Msg |
|
||||
| - | - | Fixed smartpack signature: removed is_publish, NATS_connection; added sender_name |
|
||||
| - | - | Fixed smartunpack signature: takes msg_json_str::String instead of msg::NATS.Msg |
|
||||
| - | - | Fixed size_threshold default from 1,000,000 to 500,000 |
|
||||
| - | - | Updated FR-013/FR-014 to reflect caller responsibility for NATS publishing |
|
||||
| - | - | Updated FR-008/FR-009 to include file path upload overload |
|
||||
|
||||
Reference in New Issue
Block a user