A high-performance, extremely flexible, and easily extensible universal workflow engine.
Uniflow is designed to manage a wide range of tasks, from short-term jobs to long-term processes. It supports declarative workflow definitions and allows for dynamic changes to data flows. With built-in extensions, you can implement complex workflows and add or remove nodes to expand its functionality as needed.
This system empowers you to deliver customized experiences through your service and continuously enhance its capabilities.
- Performance: Maximize throughput and minimize latency across various environments.
- Flexibility: Modify and adjust workflows in real-time.
- Extensibility: Easily extend functionality with new components.
To begin, install Go 1.23 or later. Then, follow these steps to build the source code:
git clone https://github.com/siyul-park/uniflow
cd uniflow
make init
make build
The executable will be located in the dist
directory after building.
To run a basic HTTP request handler example using ping.yaml:
- kind: listener
name: listener
protocol: http
port: 8000
ports:
out:
- name: router
port: in
- kind: router
name: router
routes:
- method: GET
path: /ping
port: out[0]
ports:
out[0]:
- name: pong
port: in
- kind: snippet
name: pong
language: text
code: pong
To start the workflow, run:
uniflow start --from-specs example/ping.yaml
Verify it's running by calling the HTTP endpoint:
curl localhost:8000/ping
pong#
Settings can be adjusted via the .uniflow.toml
file or environment variables.
TOML Key | Environment Variable Key | Example |
---|---|---|
database.url |
DATABASE.URL |
mem:// or mongodb:// |
database.name |
DATABASE.NAME |
- |
collection.nodes |
COLLECTION.NODES |
nodes |
collection.secrets |
COLLECTION.SECRETS |
secrets |
The benchmark below was conducted on a Contabo VPS S SSD (4 cores, 8GB) using the Apache HTTP benchmarking tool. It measures the performance of the ping.yaml workflow, including listener
, router
, and snippet
nodes.
ab -n 102400 -c 1024 http://127.0.0.1:8000/ping
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Benchmarking 127.0.0.1 (be patient)
Server Hostname: 127.0.0.1
Server Port: 8000
Document Path: /ping
Document Length: 4 bytes
Concurrency Level: 1024
Time taken for tests: 122.866 seconds
Complete requests: 1024000
Failed requests: 0
Total transferred: 122880000 bytes
HTML transferred: 4096000 bytes
Requests per second: 8334.29 [#/sec] (mean)
Time per request: 122.866 [ms] (mean)
Time per request: 0.120 [ms] (mean, across all concurrent requests)
Transfer rate: 976.67 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 2 3.8 0 56
Processing: 0 121 53.4 121 593
Waiting: 0 120 53.4 121 592
Total: 0 123 53.3 123 594
Percentage of the requests served within a certain time (ms)
50% 123
66% 143
75% 155
80% 163
90% 185
95% 207
98% 240
99% 266
100% 594 (longest request)
- Getting Started: Learn how to install the CLI and manage workflows.
- Key Concepts: Understand nodes, connections, ports, and packets.
- Architecture: Explore how workflows are executed and node specifications are loaded.
- Debugging: Learn how to debug workflows, set breakpoints, and start sessions.
- User Extensions: Learn to add features and integrate with external services.
- Discussion Forum: Share questions and feedback.
- Issue Tracker: Submit bug reports and request new features.
This project is released under the MIT License. You are free to use, modify, and distribute it as per the terms of the license.