{"id":26506880,"url":"https://github.com/chenquan/arkflow","last_synced_at":"2025-10-13T02:25:44.662Z","repository":{"id":280072180,"uuid":"940905405","full_name":"chenquan/arkflow","owner":"chenquan","description":"High-performance Rust stream processing engine, providing powerful data stream processing capabilities, supporting multiple input/output sources and processors.","archived":false,"fork":false,"pushed_at":"2025-03-24T15:33:16.000Z","size":693,"stargazers_count":406,"open_issues_count":8,"forks_count":12,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T16:34:47.161Z","etag":null,"topics":["datafusion","flow","rust","rust-lang","sql","stream"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chenquan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-01T03:02:55.000Z","updated_at":"2025-03-24T15:33:20.000Z","dependencies_parsed_at":"2025-03-24T16:38:51.031Z","dependency_job_id":null,"html_url":"https://github.com/chenquan/arkflow","commit_stats":null,"previous_names":["chenquan/rtflow","chenquan/rsflow","chenquan/xflow","chenquan/arkflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenquan%2Farkflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenquan%2Farkflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenquan%2Farkflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenquan%2Farkflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenquan","download_url":"https://codeload.github.com/chenquan/arkflow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245314131,"owners_count":20595200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datafusion","flow","rust","rust-lang","sql","stream"],"created_at":"2025-03-20T22:57:41.479Z","updated_at":"2025-10-13T02:25:44.639Z","avatar_url":"https://github.com/chenquan.png","language":"Rust","readme":"# ArkFlow\n\n\u003cp align=\"center\"\u003e\n\u003cimg align=\"center\" width=\"150px\" src=\"./logo.svg\"\u003e\n\u003cp align=\"center\"\u003e\n\nEnglish | [中文](README_zh.md)\n\n[![Rust](https://github.com/arkflow-rs/arkflow/actions/workflows/rust.yml/badge.svg)](https://github.com/arkflow-rs/arkflow/actions/workflows/rust.yml)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n\n\u003ca href=\"https://www.producthunt.com/posts/arkflow?embed=true\u0026utm_source=badge-featured\u0026utm_medium=badge\u0026utm_souce=badge-arkflow\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=942804\u0026theme=light\u0026t=1743136262336\" alt=\"ArkFlow - High\u0026#0045;performance\u0026#0032;rust\u0026#0032;stream\u0026#0032;processing\u0026#0032;engine | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n\nHigh-performance Rust stream processing engine, providing powerful data stream processing capabilities, supporting\nmultiple input/output sources and processors.\n\n## Features\n\n- **High Performance**: Built on Rust and Tokio async runtime, offering excellent performance and low latency\n- **Multiple Data Sources**: Support for Kafka, MQTT, HTTP, files, and other input/output sources\n- **Powerful Processing Capabilities**: Built-in SQL queries, JSON processing, Protobuf encoding/decoding, batch\n  processing, and other processors\n- **Extensible**: Modular design, easy to extend with new input, buffer, output, and processor components\n\n## Installation\n\n### Building from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/arkflow-rs/arkflow.git\ncd arkflow\n\n# Build the project\ncargo build --release\n\n# Run tests\ncargo test\n```\n\n## Quick Start\n\n1. Create a configuration file `config.yaml`:\n\n```yaml\nlogging:\n  level: info\nstreams:\n  - input:\n      type: \"generate\"\n      context: '{ \"timestamp\": 1625000000000, \"value\": 10, \"sensor\": \"temp_1\" }'\n      interval: 1s\n      batch_size: 10\n\n    pipeline:\n      thread_num: 4\n      processors:\n        - type: \"json_to_arrow\"\n        - type: \"sql\"\n          query: \"SELECT * FROM flow WHERE value \u003e= 10\"\n\n    output:\n      type: \"stdout\"\n    error_output:\n      type: \"stdout\"\n```\n\n2. Run ArkFlow:\n\n```bash\n./target/release/arkflow --config config.yaml\n```\n\n## Configuration Guide\n\nArkFlow uses YAML format configuration files, supporting the following main configuration items:\n\n### Top-level Configuration\n\n```yaml\nlogging:\n  level: info  # Log level: debug, info, warn, error\n\nstreams: # Stream definition list\n  - input:      # Input configuration\n    # ...\n    pipeline:   # Processing pipeline configuration\n    # ...\n    output:     # Output configuration\n    # ...\n    error_output: # Error output configuration\n    # ...\n    buffer:     # Buffer configuration\n    # ... \n```\n\n### Input Components\n\nArkFlow supports multiple input sources:\n\n- **Kafka**: Read data from Kafka topics\n- **MQTT**: Subscribe to messages from MQTT topics\n- **HTTP**: Receive data via HTTP\n- **File**: Reading data from files(Csv,Json, Parquet, Avro, Arrow) using SQL\n- **Generator**: Generate test data\n- **Database**: Query data from databases(MySQL, PostgreSQL, SQLite, Duckdb)\n- **Nats**: Subscribe to messages from Nats topics\n- **Redis**: Subscribe to messages from Redis channels or lists\n- **Websocket**: Subscribe to messages from WebSocket connections\n- **Modbus**: Read data from Modbus devices\n\nExample:\n\n```yaml\ninput:\n  type: kafka\n  brokers:\n    - localhost:9092\n  topics:\n    - test-topic\n  consumer_group: test-group\n  client_id: arkflow\n  start_from_latest: true\n```\n\n### Processors\n\nArkFlow provides multiple data processors:\n\n- **JSON**: JSON data processing and transformation\n- **SQL**: Process data using SQL queries\n- **Protobuf**: Protobuf encoding/decoding\n- **Batch Processing**: Process messages in batches\n- **Vrl**: Process data using [VRL](https://vector.dev/docs/reference/vrl/)\n\nExample:\n\n```yaml\npipeline:\n  thread_num: 4\n  processors:\n    - type: json_to_arrow\n    - type: sql\n      query: \"SELECT * FROM flow WHERE value \u003e= 10\"\n```\n\n### Output Components\n\nArkFlow supports multiple output targets:\n\n- **Kafka**: Write data to Kafka topics\n- **MQTT**: Publish messages to MQTT topics\n- **HTTP**: Send data via HTTP\n- **Standard Output**: Output data to the console\n- **Drop**: Discard data\n- **Nats**: Publish messages to Nats topics\n\nExample:\n\n```yaml\noutput:\n  type: kafka\n  brokers:\n    - localhost:9092\n  topic:\n    type: value\n    value:\n      type: value\n      value: test-topic\n  client_id: arkflow-producer\n```\n\n### Error Output Components\n\nArkFlow supports multiple error output targets:\n\n- **Kafka**: Write error data to Kafka topics\n- **MQTT**: Publish error messages to MQTT topics\n- **HTTP**: Send error data via HTTP\n- **Standard Output**: Output error data to the console\n- **Drop**: Discard error data\n- **Nats**: Publish messages to Nats topics\n\nExample:\n\n```yaml\nerror_output:\n  type: kafka\n  brokers:\n    - localhost:9092\n  topic:\n    type: value\n    value: error-topic\n  client_id: error-arkflow-producer\n``` \n\n### Buffer Components\n\nArkFlow provides buffer capabilities to handle backpressure and temporary storage of messages:\n\n- **Memory Buffer**: Memory buffer, for high-throughput scenarios and window aggregation.\n- **Session Window**: The Session Window buffer component provides a session-based message grouping mechanism where\n  messages are grouped based on activity gaps. It implements a session window that closes after a configurable period of\n  inactivity.\n- **Sliding Window**: The Sliding Window buffer component provides a time-based windowing mechanism for processing\n  message batches. It implements a sliding window algorithm with configurable window size, slide interval and slide\n  size.\n- **Tumbling Window**: The Tumbling Window buffer component provides a fixed-size, non-overlapping windowing mechanism\n  for processing message batches. It implements a tumbling window algorithm with configurable interval settings.\n\nExample:\n\n```yaml\nbuffer:\n  type: memory\n  capacity: 10000  # Maximum number of messages to buffer\n  timeout: 10s  # Maximum time to buffer messages\n```\n\n## Examples\n\n### Kafka to Kafka Data Processing\n\n```yaml\nstreams:\n  - input:\n      type: kafka\n      brokers:\n        - localhost:9092\n      topics:\n        - test-topic\n      consumer_group: test-group\n\n    pipeline:\n      thread_num: 4\n      processors:\n        - type: json_to_arrow\n        - type: sql\n          query: \"SELECT * FROM flow WHERE value \u003e 100\"\n\n    output:\n      type: kafka\n      brokers:\n        - localhost:9092\n      topic:\n        type: value\n        value: test-topic\n```\n\n### Generate Test Data and Process\n\n```yaml\nstreams:\n  - input:\n      type: \"generate\"\n      context: '{ \"timestamp\": 1625000000000, \"value\": 10, \"sensor\": \"temp_1\" }'\n      interval: 1ms\n      batch_size: 10000\n\n    pipeline:\n      thread_num: 4\n      processors:\n        - type: \"json_to_arrow\"\n        - type: \"sql\"\n          query: \"SELECT count(*) FROM flow WHERE value \u003e= 10 group by sensor\"\n\n    output:\n      type: \"stdout\"\n```\n\n## Users\n\n- Conalog(Country: South Korea)\n\n## ArkFlow Plugin\n\n[ArkFlow Plugin Examples](https://github.com/arkflow-rs/arkflow-plugin-examples)\n\n## License\n\nArkFlow is licensed under the [Apache License 2.0](LICENSE).\n\n## Community\n\nDiscord: https://discord.gg/CwKhzb8pux\n\nIf you like or are using this project to learn or start your solution, please give it a star⭐. Thanks!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenquan%2Farkflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenquan%2Farkflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenquan%2Farkflow/lists"}