Fluvio Documentation

repository·master·Indexed 26 days ago

https://github.com/fluvio-community/fluvio

A distributed, high-performance data streaming engine written in Rust. Fluvio provides a unified paradigm for data streaming and stateful stream processing via Stateful DataFlow. The documentation covers the Fluvio CLI for managing Streaming Controllers (SC) and Streaming Processing Units (SPU), the Rust API for producing and consuming records, and the development of SmartModules (filter, map, aggregate, and array_map). It also includes details on the fluvio-compression library, Fluvio Hub package formats (.ipkg), and connector deployment via Docker.

Tokens
46.4K
Snippets
116
Records
383
Agent score
90%

What's inside Fluvio

  1. Overview of Fluvio Hub package format

    master

    The fluvio-artifacts-util crate provides utilities for accessing SmartModule hub packages. A Fluvio hub package uses the .ipkg extension (e.g., package-x.y.z.ipkg) and contains the following components:

    • package-meta: Metadata file for the package.
    • manifest.tar.gz: A compressed archive containing the SmartModule build files.
    • Signature files: Files used for verifying the package integrity and authenticity.
  2. Overview of Fluvio Compression

    master

    The fluvio-compression library provides handlers for compressing and uncompressing data within the Fluvio protocol.

    Workflow:

    1. Producer side: Data is compressed before being sent.
    2. Consumer/SPU side: Data is uncompressed using compression metadata found in the batch attributes.

    Supported Compression Codecs:

    • None (default)
    • Gzip
    • Snappy
    • Zstd
    • LZ4
  3. Understand Fluvio Kubernetes Chart Types

    master

    Fluvio uses two types of Helm charts for Kubernetes deployment, which are compiled into the Cluster installer as inline resources:

    • Sys Chart: Contains Custom Resource Definition (CRD) definitions. Because CRDs are cluster-scoped, you can only deploy one sys chart per Kubernetes cluster.
    • App Chart: Contains definitions for Kubernetes objects like Deployments, Services, and Pods. These are name-scoped and can be deployed to multiple namespaces for multi-tenant configurations.
  4. Understand Fluvio CLI Components

    master

    The Fluvio Command Line Interface (CLI) is the primary way to communicate with a Fluvio cluster. A cluster is composed of two main components that you run using the following commands:

    • Streaming Controller: Run using fluvio run sc.
    • Streaming Processing Unit (SPU): Run using fluvio run spu.

    To simplify communication with the SC, SPU, or Kafka environments, the CLI uses Profile files to store common parameters.

  5. Deploy Kubernetes Dashboard components

    master

    To deploy the Kubernetes dashboard and a customized metric server (which disables TLS certificate checks for kind), run the following commands:

    1. Apply the customized metric server configuration.
    2. Apply the recommended Kubernetes dashboard deployment.
    3. Apply the user configuration.
    kubectl apply -f metric-server.yaml
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
    kubectl apply -f user.yaml
  6. Build Fluvio with Release Profile

    master

    By default, builds use the Rust debug profile, which is faster to build but results in larger and slower binaries. To generate optimized binaries for production environments, use the RELEASE=true flag with the Makefile.

    To clean up build artifacts and generated files, use the make clean command.

    $ make build-cluster RELEASE=true
    $ make clean