6 releases (breaking)

0.6.0 Dec 29, 2023
0.5.0 Jun 25, 2023
0.4.1 May 3, 2023
0.3.0 Apr 28, 2023
0.2.0 Apr 13, 2023

#14 in #composable

Download history 65/week @ 2023-12-23 37/week @ 2023-12-30 12/week @ 2024-01-13 24/week @ 2024-01-20 12/week @ 2024-01-27 105/week @ 2024-02-10 102/week @ 2024-02-17 97/week @ 2024-02-24 41/week @ 2024-03-02 55/week @ 2024-03-09 41/week @ 2024-03-16 27/week @ 2024-03-23 97/week @ 2024-03-30 94/week @ 2024-04-06

275 downloads per month
Used in pallas-upstream

Apache-2.0

49KB
1.5K SLoC

Gasket

An opinionated Rust library for building application using data pipeline semantics. It uses a similar approach to the "Actor model", but fine-tuned for heavy, composable data processing.

Why

  • spliting data processing logic into small stages facilitates development (my own experience)
  • stages are easily composable
  • pipelines are a good abstraction for implementing observability
  • robust loops with error handling, backoff retries, etc are ubiquitous and hard to implement correctly
  • traditional async loops hide too much of the complexity, hard to optimice at scale

Goals

  • zero-cost abstraction (sort of)
  • staticly typed stages, dynamic composition of pipeline at runtime
  • developer has full-control over each work unit
  • robust work loop provided by the library
  • error handling out-of-the-box, with different policies (retry, exit, backoff)
  • fully observable out-of-the-box (metrics, traces)
  • multi-thread pipeline, async option inside stage
  • ergonomic pipeline setup
  • back-pressure out-of-the-box
  • hot swap of stages (add / remove)

Status

Current state of the lib is: "only I understand it". I'm experimenting with the api surface, so there are constant breaking changes happening frequently.

Dependencies

~2.8–4.5MB
~78K SLoC