A high-performance, extremely flexible, and easily extensible universal workflow engine.
Uniflow efficiently handles a wide range of tasks from short-term jobs to long-term processes. It allows for declarative definition and dynamic modification of data flows, leveraging built-in extension capabilities to easily implement complex workflows. Moreover, it offers flexibility to expand functionality by adding new nodes or removing existing ones as needed.
Provide a personalized experience through your service and consistently expand its capabilities.
- Performance: Achieve optimal throughput and minimal latency across various environments.
- Flexibility: Dynamically modify and adjust workflows in real-time.
- Extensibility: Extend system functionality through new components.
Go 1.22 or higher is required. Follow these steps to build the source code:
git clone https://github.com/siyul-park/uniflow
cd uniflow
make init
make build
After building, the executable will be located in the dist
directory.
Let's run a basic HTTP request handler example provided in 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 execute the workflow, use the following command:
uniflow start --from-nodes example/ping.yaml
To verify it's working, call the HTTP endpoint:
curl localhost:8000/ping
pong#
You can configure settings through the .uniflow.toml
file or system 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 |
Here are the benchmark results conducted on a Contabo VPS S SSD (4 cores, 8GB) environment using the Apache HTTP server benchmarking tool. The benchmark measures the performance of the ping.yaml workflow, consisting of 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: 13.760 seconds
Complete requests: 102400
Failed requests: 0
Total transferred: 12288000 bytes
HTML transferred: 409600 bytes
Requests per second: 7441.92 [#/sec] (mean)
Time per request: 137.599 [ms] (mean)
Time per request: 0.134 [ms] (mean, across all concurrent requests)
Transfer rate: 872.10 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 3.1 0 34
Processing: 0 136 58.2 137 550
Waiting: 0 135 58.2 137 550
Total: 0 137 58.0 139 553
Percentage of the requests served within a certain time (ms)
50% 139
66% 162
75% 174
80% 181
90% 202
95% 223
98% 264
99% 295
100% 553 (longest request)
- Getting Started: Introduces CLI installation and workflow management.
- Key Concepts: Explains the fundamental concepts such as nodes, connections, ports, and packets.
- Architecture: Details the process of loading node specifications and executing workflows.
- User Extensions: Guides on adding new features and integrating with existing services.
For questions or support regarding the project, use the following channels:
- Discussion Forum: Share questions and feedback.
- Issue Tracker: Submit bug reports and feature requests.
This project is distributed under the MIT License. You are free to use, modify, and distribute it under the terms of the license.