Skip to main content

Module tick

Module tick 

Source
Expand description

Clock domains for batching streaming data into discrete time steps.

In Hydro, a Tick represents a logical clock that can be used to batch unbounded streaming data into discrete, bounded time steps. This is essential for implementing iterative algorithms, synchronizing data across multiple streams, and performing aggregations over windows of data.

A tick is created from a top-level location (such as Process or Cluster) using Location::tick. Once inside a tick, bounded live collections can be manipulated with operations like fold, reduce, and cross-product, and the results can be emitted back to the unbounded stream using methods like all_ticks().

The Atomic wrapper provides atomicity guarantees within a tick, ensuring that reads and writes within a tick are serialized.

The NoTick marker trait is used to constrain APIs that should only be called on top-level locations (not inside a tick), while NoAtomic constrains APIs that should not be called inside an atomic context.

Structs§

Atomic
A location wrapper that provides atomicity guarantees within a Tick.
Tick
Marks the stream as being inside the single global clock domain.

Traits§

DeferTick
Trait for live collections that can be deferred by one tick.
NoAtomic
Marker trait for locations that are not inside an Atomic context.
NoTick
Marker trait for locations that are not inside a Tick clock domain.