Expand description
╔════════════════════════════════════════════════════════════════╗
║ T I G H T B E A M ║
║ Efficient Exchange-Compute Interconnect ║
╚════════════════════════════════════════════════════════════════╝
┌─────────────┐
│ CLUSTER │
│ Controller │
└──────┬──────┘
│
┌───────────────┼───────────────┐
│ │ │
┌─────▼─────┐ ┌────▼────┐ ┌─────▼─────┐
│ HIVE │ │ DRONE │ │ HIVE │
│ Orchestr. │ │ Morpher │ │ Orchestr. │
└─────┬─────┘ └────┬────┘ └────┬──────┘
│ │ │
┌──────────┼──────────┐ │ ┌─────────┼──────────┐
│ │ │ │ │ │ │
┌────▼───┐ ┌───▼────┐ ┌───▼────▼────▼───┐ ┌───▼────┐ ┌───▼────┐
│Servlet │ │Servlet │ │ Active │ │Servlet │ │Servlet │
│ :8001 │ │ :8002 │ │ Servlet │ │ :8003 │ │ :8004 │
└────┬───┘ └────┬───┘ └────────┬────────┘ └───┬────┘ └───┬────┘
│ │ │ │ │
┌─────┴─────┬─────┴─────┬─────┬──┴──┬─────┬─────┴─────┬────┴┬─────┐
│ │ │ │ │ │ │ │ │ │ │ │
┌─▼──┐┌─▼──┐┌─▼──┐┌─▼──┐┌─▼──┐┌─▼──┐┌─▼──┐┌─▼──┐┌─▼──┐┌─▼──┐┌─▼──┐┌─▼──┐
│Wrkr││Wrkr││Wrkr││Wrkr││Wrkr││Wrkr││Wrkr││Wrkr││Wrkr││Wrkr││Wrkr││Wrkr│
└────┘└────┘└────┘└────┘└────┘└────┘└────┘└────┘└────┘└────┘└────┘└────┘
┌──┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐┌──┐
│Wr││W││W││W││W││W││W││W││W││W││W││W││W││W││W││W││W││W││W││W││W││W││W││Wr│
└──┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└─┘└──┘
╔════════════════════════════════════════════════════════════════════════╗
║ Protocol-Agnostic • Zero-Copy • Zero-Panic • ASN.1 DER • RustCrypto ║
╚════════════════════════════════════════════════════════════════════════╝
┌──────────────────────────────────────────────────────┐
│ 🔐 Security Model: Sign-Then-Encrypt │
│ ├─ Hash: Integrity verification on plaintext │
│ ├─ Sign: Non-repudiation & authentication │
│ └─ Encrypt: Confidentiality of transmitted data │
└──────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────┐
│ 📦 Protocol Versions │
│ ├─ V0: Core metadata (id, order, message) │
│ ├─ V1: + integrity, confidentiality, signature │
│ ├─ V2: + priority, TTL, previous_frame chaining │
│ └─ V3: + matrix control │
└──────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────┐
│ 🕸️ Efficient Exchange-Compute Interconnect (EECI) |
│ ├─ Hives: Multi-servlet orchestrators │
│ ├─ Drones: Single-servlet morphers │
│ ├─ Servlets: Self-contained message processors │
│ └─ Cluster: Centralized control & routing │
└──────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────┐
│ ⚡ Features │
│ ├─ Protocol-agnostic transport layer │
│ ├─ Dynamic port allocation (OS-managed) │
│ ├─ Policy-driven message gates │
│ ├─ Lifecycle management (start/stop/join) │
│ └─ Service discovery & health monitoring │
└──────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────┐
│ Quick Start Example │
├────────────────────────────────────────────────────────────────┤
│ use tightbeam::{Message, Beamable, compose}; │
│ use tightbeam::der::Sequence; │
│ │
│ #[derive(Beamable, Clone, Debug, Sequence)] │
│ struct MyMessage { value: u64 } │
│ │
│ let frame = compose! { │
│ V0: id: "msg-001", order: 1, message: MyMessage { .. } │
│ }?; │
│ │
│ let decode: MyMessage = tightbeam::decode(&frame.message)?; │
└────────────────────────────────────────────────────────────────┘§TightBeam Protocol
A lightweight, versioned messaging protocol with cryptographic primitives built on ASN.1 DER encoding.
Re-exports§
pub use utils::decode;pub use utils::encode;pub use crate::error::TightBeamError;pub use rayon;pub use zeroize;pub use cms;pub use der;pub use paste;pub use pkcs12;pub use spki;pub use x509_cert as x509;pub use time;pub use asn1::*;pub use crate::core::*;
Modules§
- asn1
- builder
- colony
- Colony framework for distributed servlet orchestration
- compress
- constants
- core
- crypto
- error
- flags
- Flags utilize the Matrix to create Flat World.
- helpers
- instrumentation
- Instrumentation subsystem (feature = “instrument”).
- macros
- matrix
- mpsc
- A multi-producer, single-consumer queue for sending values between asynchronous tasks.
- oids
- ASN.1 Object Identifiers (OIDs) for TightBeam
- policy
- prelude
- Prelude module for convenient imports
- random
- router
- runtime
- Async runtime abstraction layer
- standards
- testing
- Testing module orchestrator
- trace
- Trace collection and logging subsystem
- transport
- Transport layer for TightBeam protocol
- utils
- Utility modules and functions
Macros§
- __
tightbeam_ server_ protocol_ bind_ handle - __
tightbeam_ server_ protocol_ bind_ policies_ handle - __
tightbeam_ server_ protocol_ channels_ handle - __
tightbeam_ server_ protocol_ channels_ policies_ handle - __
tightbeam_ server_ protocol_ handle - __
tightbeam_ server_ protocol_ policies_ assertions_ handle - __
tightbeam_ server_ protocol_ policies_ handle - __
tightbeam_ servlet_ common_ methods - Common methods shared by all servlets (addr, stop, join)
- absent
- at_
least - at_most
- between
- cert
- This macro provides a convenient way to construct X.509 certificates with various profiles and configurations.
- client
- Client macro - creates a configured transport for multiple emit calls
- cluster
- Macro for creating clusters with pre-configured settings
- compose
- compress
- csr
- Create an X.509 Certificate Signing Request using the builder pattern
- deadline
- Helper macro for deadline timing constraint Usage: deadline!(duration: 100ms, slack: 5ms) (parentheses) deadline! { duration: 100ms, slack: 5ms } (curly braces) deadline!(duration: 100ms) (without slack) Events come from the key in grouped syntax.
- decompress
- define_
oid_ wrapper - Macro to define OID wrapper types with
AssociatedOidimplementation. - emit
- Emit macro - one-shot message send
- equals
- Helper macro to wrap values for equality assertions in specs
- exactly
- falsy
- Helper macro for boolean false assertions in specs Checks that the value is falsy (zero, false, empty)
- flags
- flagset
- guard
- Helper macro for timing guard expressions in tb_process_spec!
- hex
- Converts a sequence of hexadecimal string literals to a byte array at compile time.
- hive
- Macro for creating hives that orchestrate dynamically registered servlets.
- impl_
error_ display - Macro to implement
DisplayandErrorfor error enums whenderivefeature is disabled. - impl_
from - Macro to implement From trait for both reference and owned types
- impl_
tcp_ common - Macro to generate common transport implementation for both sync and async.
- impl_
try_ from - Macro to implement TryFrom trait for extracting optional fields
- jitter
- Helper macro for jitter timing constraint Usage: jitter!(5ms) (default MinMaxJitter calculator) jitter!(5ms, calculator) (custom calculator) Event comes from the key in grouped syntax.
- job
- mutex
- notarize
- Macro to sign a document and insert the signature
- pem
- policy
- present
- ratio
- Helper macro for ratio limits (numerator / denominator)
- relay
- Relay - A simple MPSC relay for any Beamable type
- routes
- rwlock
- server
- servlet
- Servlet macro for creating containerized tightbeam applications
- sign
- Create a SignatureInfo by signing data
- tb_
assert_ spec - tb_
compose_ spec - Define a CSP Process Composition with declarative syntax.
- tb_
gen_ process_ types - Generate States enum and Event wrapper for a CSP process.
- tb_
process_ spec - Define a CSP Process with declarative syntax.
- tb_
scenario - tb_scenario! macro - MVP implementation
- test_
builder - Generic builder test macro
- test_
drone - Async test macro for hives
- test_
job - test_
servlet - Async test macro with worker setup
- test_
worker - Async test macro with worker setup
- truthy
- Helper macro for boolean true assertions in specs Checks that the value is truthy (non-zero, true, non-empty)
- urn_
spec - Define a URN specification with validation and NSS structure
- wcet
- Helper macro for WCET (Worst-Case Execution Time) timing constraint Usage: wcet!(10ms) (simple case, backward compatible) wcet!(10ms, percentile: P99) (with percentile) wcet!(10ms, analyzer: my_analyzer) (with analyzer) wcet!(10ms, percentile: P99, analyzer: my_analyzer) (with both, order-independent) wcet!(10ms, analyzer: my_analyzer, percentile: P99) (same as above) Event comes from the key in grouped syntax.
- worker
Type Aliases§
- Zeroizing
Array - Zeroizing
Bytes - Secure bytes type
Derive Macros§
- Beamable
- Derive macro for implementing
Message - Errorizable
- Derive macro for implementing error traits with automatic Display and From implementations
- Flaggable
- Derive macro for implementing flag enum traits