tucano-integration

Crates.iotucano-integration
lib.rstucano-integration
version0.1.0
created_at2025-08-14 01:59:21.291502+00
updated_at2025-08-18 02:48:17.719622+00
descriptionWeb integration framework (HTTP/WebSocket) for venues/exchanges
homepage
repositoryhttps://github.com/brbtavares/tucano
max_upload_size
id1794325
size122,066
Bruno Tavares (brbtavares)

documentation

https://docs.rs/tucano-integration

README

Tucano Integration

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 data or integration. This crate provides only abstractions and building blocks.

๐ŸŽฏ Role

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

๐Ÿ”‘ Types / Traits

  • Tx, ChannelTxDroppable โ€“ Decoupled sending with backpressure.
  • Snapshot<T> โ€“ Value + metadata (timestamp/sequence).
  • Validator, Transformer, Terminal, Unrecoverable โ€“ Robustness contracts.

๐Ÿ”— Interdependencies

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

โœ… Completed

  • Operational generic channel abstractions.
  • Basic Snapshot and Subscription structures.
  • Transformation and validation traits defined.

๐Ÿงช Partial

  • Metrics: collection still superficial.

  • Protocols: HTTP/WebSocket placeholders; FIX not started.

  • Collection types documented but with broken rustdoc links (to fix).

๐Ÿšง Pending

  • Service layer for automatic reconnection with configurable policy.

  • Adaptive buffering with memory pressure.

  • Structured telemetry (latency per pipeline stage).

Exemplo (conceitual)

use integration::channel::mpsc_unbounded; // assinatura ilustrativa
let (tx, rx) = mpsc_unbounded();
tx.send("payload")?;
Commit count: 0

cargo fmt