Skip to content

Commit

Permalink
docs: add node documents
Browse files Browse the repository at this point in the history
  • Loading branch information
siyul-park committed Sep 14, 2024
1 parent e77041f commit 08d074e
Show file tree
Hide file tree
Showing 74 changed files with 1,840 additions and 629 deletions.
92 changes: 46 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@

## 📝 Overview

**Uniflow** efficiently manages a wide range of tasks, from short-term jobs to long-term processes. It supports declarative definitions and dynamic modifications of data flows. With [built-in extension capabilities](./ext/README.md), you can easily implement complex workflows and extend functionalities by adding or removing nodes as needed.
**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](./ext/README.md), you can implement complex workflows and add or remove nodes to expand its functionality as needed.

Deliver a personalized experience through your service and continually expand its capabilities.
This system empowers you to deliver customized experiences through your service and continuously enhance its capabilities.

## 🎯 Core Values

- **Performance:** Optimize throughput and minimize latency across diverse environments.
- **Flexibility:** Dynamically modify and adjust workflows in real-time.
- **Extensibility:** Expand system functionality with new components.
- **Performance:** Maximize throughput and minimize latency across various environments.
- **Flexibility:** Modify and adjust workflows in real-time.
- **Extensibility:** Easily extend functionality with new components.

## 🚀 Quick Start

### 🛠️ Build and Install

**[Go 1.23](https://go.dev/doc/install)** or higher is required. Follow these steps to build the source code:
To begin, install **[Go 1.23](https://go.dev/doc/install)** or later. Then, follow these steps to build the source code:

```sh
git clone https://github.com/siyul-park/uniflow
Expand All @@ -35,11 +35,11 @@ make init
make build
```

After building, the executable will be located in the `dist` directory.
The executable will be located in the `dist` directory after building.

### ⚡ Running an Example

To run a basic HTTP request handler example provided in [ping.yaml](./examples/ping.yaml):
To run a basic HTTP request handler example using [ping.yaml](./examples/ping.yaml):

```yaml
- kind: listener
Expand Down Expand Up @@ -68,13 +68,13 @@ To run a basic HTTP request handler example provided in [ping.yaml](./examples/p
code: pong
```
To execute the workflow, use:
To start the workflow, run:
```sh
uniflow start --from-nodes example/ping.yaml
```

Verify it's working by calling the HTTP endpoint:
Verify it's running by calling the HTTP endpoint:

```sh
curl localhost:8000/ping
Expand All @@ -83,18 +83,18 @@ pong#

## ⚙️ Configuration

Settings can be configured through the `.uniflow.toml` file or system environment variables.
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` |
| 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` |

## 📊 Benchmark

Here are benchmark results conducted on a **[Contabo](https://contabo.com/)** VPS S SSD (4 cores, 8GB) environment using the [Apache HTTP server benchmarking tool](https://httpd.apache.org/docs/2.4/programs/ab.html). The benchmark measures the performance of the [ping.yaml](./examples/ping.yaml) workflow, consisting of `listener`, `router`, and `snippet` nodes.
The benchmark below was conducted on a **[Contabo](https://contabo.com/)** VPS S SSD (4 cores, 8GB) using the [Apache HTTP benchmarking tool](https://httpd.apache.org/docs/2.4/programs/ab.html). It measures the performance of the [ping.yaml](./examples/ping.yaml) workflow, including `listener`, `router`, and `snippet` nodes.

```sh
ab -n 102400 -c 1024 http://127.0.0.1:8000/ping
Expand All @@ -108,51 +108,51 @@ Server Port: 8000
Document Path: /ping
Document Length: 4 bytes
Concurrency Level: 1024
Time taken for tests: 13.760 seconds
Complete requests: 102400
Time taken for tests: 122.866 seconds
Complete requests: 1024000
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
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 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
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% 139
66% 162
75% 174
80% 181
90% 202
95% 223
98% 264
99% 295
100% 553 (longest request)
50% 123
66% 143
75% 155
80% 163
90% 185
95% 207
98% 240
99% 266
100% 594 (longest request)
```

## 📚 Learn More

- [Getting Started](./docs/getting_started.md): Introduces CLI installation and workflow management.
- [Key Concepts](./docs/key_concepts.md): Explains fundamental concepts like nodes, connections, ports, and packets.
- [Architecture](./docs/architecture.md): Details the process of loading node specifications and executing workflows.
- [Debugging](./docs/debugging.md): Covers how to start a debugging session, set breakpoints, and inspect states for effective debugging.
- [User Extensions](./docs/user_extensions.md): Guides on adding new features and integrating with existing services.
- [Getting Started](./docs/getting_started.md): Learn how to install the CLI and manage workflows.
- [Key Concepts](./docs/key_concepts.md): Understand nodes, connections, ports, and packets.
- [Architecture](./docs/architecture.md): Explore how workflows are executed and node specifications are loaded.
- [Debugging](./docs/debugging.md): Learn how to debug workflows, set breakpoints, and start sessions.
- [User Extensions](./docs/user_extensions.md): Learn to add features and integrate with external services.

## 🌐 Community and Support

- [Discussion Forum](https://github.com/siyul-park/uniflow/discussions): Share questions and feedback.
- [Issue Tracker](https://github.com/siyul-park/uniflow/issues): Submit bug reports and feature requests.
- [Issue Tracker](https://github.com/siyul-park/uniflow/issues): Submit bug reports and request new features.

## 📜 License

This project is distributed under the [MIT License](./LICENSE). You are free to use, modify, and distribute it under the terms of the license.
This project is released under the [MIT License](./LICENSE). You are free to use, modify, and distribute it as per the terms of the license.

<!-- Go -->

Expand Down
87 changes: 43 additions & 44 deletions README_kr.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
[![check][repo_check_img]][repo_check_url]
[![code coverage][go_code_coverage_img]][go_code_coverage_url]

**고성능과 유연성을 겸비한 확장 가능한 범용 워크플로우 엔진.**
**높은 성능과 뛰어난 유연성을 겸비한 확장 가능한 범용 워크플로우 엔진.**

## 📝 개요

**Uniflow**는 단기 작업부터 장기 프로세스까지 다양한 작업을 효율적으로 처리합니다. 데이터 흐름을 선언적으로 정의하고 동적으로 수정할 수 있으며, [내장 확장 기능](./ext/README_kr.md)활용하여 복잡한 워크플로우도 쉽게 구현할 수 있습니다. 게다가 필요에 따라 새로운 노드를 추가하거나 기존 노드를 제거하여 기능을 유연하게 확장할 수 있습니다.
**Uniflow**는 단기 작업부터 장기 프로세스까지 다양한 작업을 효율적으로 관리할 수 있는 워크플로우 엔진입니다. 데이터 흐름을 선언적으로 정의하며, 동적 수정이 가능해 업무 요구 사항에 맞게 유연하게 조정할 수 있습니다. 또한, [기본 확장 기능](./ext/README_kr.md)통해 복잡한 워크플로우를 구현하고, 필요에 따라 새로운 노드를 추가하거나 제거하여 기능을 확장할 수 있습니다.

여러분의 서비스에 개인화된 경험을 제공하고, 지속적으로 기능을 확장해 나가세요.
서비스에 개인 맞춤형 경험을 제공하고, 지속적으로 발전시킬 수 있는 기반을 마련하세요.

## 🎯 핵심 가치

- **성능:** 다양한 환경에서 최적의 처리량과 최소 지연 시간을 실현합니다.
- **유연성:** 워크플로우를 동적으로 수정하고 실시간으로 조정할 수 있습니다.
- **확장성:** 새로운 컴포넌트를 통해 시스템 기능을 확장할 수 있습니다.
- **성능:** 다양한 환경에서 최대의 처리량과 최소의 지연 시간을 달성합니다.
- **유연성:** 실시간으로 워크플로우를 수정하고 조정할 수 있습니다.
- **확장성:** 손쉽게 새로운 컴포넌트를 추가하여 기능을 확장할 수 있습니다.

## 🚀 빠른 시작

### 🛠️ 빌드 및 설치

**[Go 1.23](https://go.dev/doc/install)** 이상이 필요합니다. 소스 코드를 빌드하려면 다음 단계를 따르세요:
**[Go 1.23](https://go.dev/doc/install)** 이상을 설치한 후, 아래 단계를 통해 소스 코드를 빌드할 수 있습니다:

```sh
git clone https://github.com/siyul-park/uniflow
Expand All @@ -39,7 +39,7 @@ make build

### ⚡ 예제 실행

기본적인 HTTP 요청 처리 예제인 [ping.yaml](./examples/ping.yaml)실행해 보겠습니다:
다음은 HTTP 요청 처리 예제인 [ping.yaml](./examples/ping.yaml)실행하는 방법입니다:

```yaml
- kind: listener
Expand Down Expand Up @@ -68,22 +68,22 @@ make build
code: pong
```
워크플로우를 실행하려면 다음 명령어를 사용하세요:
다음 명령어로 워크플로우를 실행합니다:
```sh
uniflow start --from-nodes example/ping.yaml
```

정상 작동 여부를 확인하기 위해 HTTP 엔드포인트를 호출해 보세요:
정상 작동 여부를 확인하려면 HTTP 엔드포인트를 호출하세요:

```sh
curl localhost:8000/ping
pong#
```

## ⚙️ 구성
## ⚙️ 설정

환경 설정은 `.uniflow.toml` 파일 또는 시스템 환경 변수를 통해 구성할 수 있습니다.
환경 설정은 `.uniflow.toml` 파일 또는 시스템 환경 변수를 통해 관리할 수 있습니다.

| TOML 키 | 환경 변수 키 | 예시 |
|----------------------|--------------------------|---------------------------|
Expand All @@ -94,7 +94,7 @@ pong#

## 📊 벤치마크

**[Contabo](https://contabo.com/)** VPS S SSD (4코어, 8GB) 환경에서 수행된 벤치마크 결과입니다. [Apache HTTP server benchmarking tool](https://httpd.apache.org/docs/2.4/programs/ab.html)을 사용하여 `listener`, `router`, `snippet` 노드로 구성된 [ping.yaml](./examples/ping.yaml) 워크플로우를 측정했습니다.
다음 벤치마크는 **[Contabo](https://contabo.com/)** VPS S SSD (4코어, 8GB) 환경에서 수행되었습니다. [Apache HTTP server benchmarking tool](https://httpd.apache.org/docs/2.4/programs/ab.html)을 사용하여 `listener`, `router`, `snippet` 노드로 구성된 [ping.yaml](./examples/ping.yaml) 워크플로우를 테스트했습니다.

```sh
ab -n 102400 -c 1024 http://127.0.0.1:8000/ping
Expand All @@ -108,51 +108,51 @@ Server Port: 8000
Document Path: /ping
Document Length: 4 bytes
Concurrency Level: 1024
Time taken for tests: 13.760 seconds
Complete requests: 102400
Time taken for tests: 122.866 seconds
Complete requests: 1024000
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
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 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
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% 139
66% 162
75% 174
80% 181
90% 202
95% 223
98% 264
99% 295
100% 553 (longest request)
50% 123
66% 143
75% 155
80% 163
90% 185
95% 207
98% 240
99% 266
100% 594 (longest request)
```

## 📚 자세히 알아보기
## 📚 알아보기

- [시작하기](./docs/getting_started_kr.md): CLI 설치 및 워크플로우 관리 방법을 소개합니다.
- [핵심 개념](./docs/key_concepts_kr.md): 노드, 연결, 포트, 패킷 등의 기본 개념을 설명합니다.
- [아키텍처](./docs/architecture_kr.md): 노드 명세 로딩 및 워크플로우 실행 과정을 상세히 설명합니다.
- [디버깅](./docs/debugging_kr.md): 디버깅 세션을 시작하고, 브레이크포인트를 설정한 후, 상태 조회를 통해 디버깅하는 과정을 다룹니다.
- [사용자 확장](./docs/user_extensions_kr.md): 새로운 기능 추가 및 기존 서비스 통합 방법을 안내합니다.
- [시작하기](./docs/getting_started_kr.md): CLI 설치 및 워크플로우 관리 방법을 알아보세요.
- [핵심 개념](./docs/key_concepts_kr.md): 노드, 연결, 포트, 패킷 등 주요 개념을 이해하세요.
- [아키텍처](./docs/architecture_kr.md): 노드 명세 로딩 및 워크플로우 실행 과정을 살펴보세요.
- [디버깅](./docs/debugging_kr.md): 워크플로우 디버깅을 통해 문제를 해결하는 방법을 배우세요.
- [사용자 확장](./docs/user_extensions_kr.md): 시스템 확장 및 기존 서비스와의 통합 방법을 안내합니다.

## 🌐 커뮤니티 및 지원

- [토론 포럼](https://github.com/siyul-park/uniflow/discussions): 질문 및 피드백을 공유할 수 있습니다.
- [이슈 트래커](https://github.com/siyul-park/uniflow/issues): 버그 보고 및 기능 요청을 제출할 수 있습니다.
- [토론 포럼](https://github.com/siyul-park/uniflow/discussions): 질문 및 피드백을 나눌 수 있습니다.
- [이슈 트래커](https://github.com/siyul-park/uniflow/issues): 버그를 신고하거나 기능 요청을 제출할 수 있습니다.

## 📜 라이센스

이 프로젝트는 [MIT 라이센스](./LICENSE)에 따라 배포됩니다. 라이센스 조건에 따라 자유롭게 사용, 수정 및 배포가 가능합니다.
이 프로젝트는 [MIT 라이센스](./LICENSE)에 따라 배포됩니다. 자유롭게 사용, 수정, 배포할 수 있습니다.

<!-- Go -->

Expand All @@ -178,4 +178,3 @@ Percentage of the requests served within a certain time (ms)
[repo_wiki_faq_url]: https://github.com/siyul-park/uniflow/wiki/FAQ
[repo_check_img]: https://github.com/siyul-park/uniflow/actions/workflows/check.yml/badge.svg
[repo_check_url]: https://github.com/siyul-park/uniflow/actions/workflows/check.yml
```
18 changes: 9 additions & 9 deletions cmd/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# 💻 Command Line Interface (CLI)

Effectively manage the versatile Command Line Interface (CLI) designed for various workflow management tasks. This CLI is provided with the core executable file, including [built-in extensions](../ext/README.md).
Effectively manage your workflows using the versatile Command Line Interface (CLI) designed for a variety of tasks. This CLI is provided as a base executable that includes [built-in extensions](../ext/README.md).

## Configuration

Before executing commands, configure the system using environment variables. You can utilize either the `.uniflow.toml` file or system environment variables.
Before running commands, configure your system using environment variables. You can use either 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` |
| `collection.secrets` | `COLLECTION.SECRETS` | `secrets` |
| 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` |

When using [MongoDB](https://www.mongodb.com/), ensure that [change streams](https://www.mongodb.com/docs/manual/changeStreams/) are enabled so the engine can track changes to node specifications. To utilize change streams, set up a [replica set](https://www.mongodb.com/ko-kr/docs/manual/replication/#std-label-replication).
If using [MongoDB](https://www.mongodb.com/), ensure that [Change Streams](https://www.mongodb.com/docs/manual/changeStreams/) are enabled so that the engine can track changes to node specifications. To utilize Change Streams, set up a [Replica Set](https://www.mongodb.com/docs/manual/replication/#std-label-replication).
Loading

0 comments on commit 08d074e

Please sign in to comment.