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 from source:
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 handling example, 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 run the workflow, use the following command:
uniflow start --filename 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 | Example |
---|---|---|
database.url |
DATABASE.URL |
mem:// or mongodb:// |
database.name |
DATABASE.NAME |
- |
collection.nodes |
COLLECTION.NODES |
nodes |
Below are benchmark results performed on a Contabo VPS S SSD (4 cores, 8GB) environment. We used the Apache HTTP server benchmarking tool to measure 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: 0 bytes
Concurrency Level: 1024
Time taken for tests: 14.951 seconds
Complete requests: 102400
Failed requests: 0
Total transferred: 11878400 bytes
Requests per second: 6849.06 [#/sec] (mean)
Time per request: 149.510 [ms] (mean)
Time per request: 0.146 [ms] (mean, across all concurrent requests)
Transfer rate: 775.87 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 2 4.7 0 55
Processing: 0 146 62.2 148 528
Waiting: 0 145 62.2 147 528
Total: 0 148 62.3 150 559
Percentage of the requests served within a certain time (ms)
50% 150
66% 174
75% 188
80% 196
90% 223
95% 248
98% 282
99% 307
100% 559 (longest request)
- Getting Started: Introduction to CLI installation and workflow management.
- Key Concepts: Explanation of basic concepts such as nodes, connections, ports, and packets.
- Architecture: Detailed explanation of node specification loading and workflow execution process.
- User Extensions: Guide on adding new features and integrating existing services.
For questions about the project or if you need support, please 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 according to the license terms.