| Crates.io | tucano-integration |
| lib.rs | tucano-integration |
| version | 0.1.0 |
| created_at | 2025-08-14 01:59:21.291502+00 |
| updated_at | 2025-08-18 02:48:17.719622+00 |
| description | Web integration framework (HTTP/WebSocket) for venues/exchanges |
| homepage | |
| repository | https://github.com/brbtavares/tucano |
| max_upload_size | |
| id | 1794325 |
| size | 122,066 |
Communication abstractions (channels, protocols) and transformation to connect external sources (WebSocket, HTTP, future FIX) to the ecosystem. All concrete exchange/broker integrations are now implemented as local modules in
dataorintegration. This crate provides only abstractions and building blocks.
The integration crate provides building blocks for data ingestion and request sending: typed channels, snapshots, transformers, validators, and generic metrics โ all reused by data and execution.
| Responsibility | Description |
|---|---|
| Channels | channel/ defines unified Tx/Rx (includes controlled drops) |
| Transformation | protocol/ + de.rs for deserializing and converting payloads |
| Metrics | metric.rs abstracts runtime metric collection |
| Subscription | subscription/ manages subscription lifecycle |
| Snapshot | snapshot.rs structures initial consistency |
| Collection | Auxiliary types (OneOrMany, NoneOneOrMany) for ergonomics |
Tx, ChannelTxDroppable โ Decoupled sending with backpressure.Snapshot<T> โ Value + metadata (timestamp/sequence).Validator, Transformer, Terminal, Unrecoverable โ Robustness contracts.| Depends on | Reason |
|---|---|
| (minimal) | Kept lightweight to be a reusable base |
| Consumed by | Usage |
|---|---|
data |
Builds stream pipelines |
execution |
Propagates account/internal order events |
analytics |
Can receive runtime metrics |
core |
Uses channel abstractions generically |
Metrics: collection still superficial.
Protocols: HTTP/WebSocket placeholders; FIX not started.
Collection types documented but with broken rustdoc links (to fix).
Service layer for automatic reconnection with configurable policy.
Adaptive buffering with memory pressure.
Structured telemetry (latency per pipeline stage).
use integration::channel::mpsc_unbounded; // assinatura ilustrativa
let (tx, rx) = mpsc_unbounded();
tx.send("payload")?;