Skip to content

Commit

Permalink
Add to README.md on how to play with the prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Nov 5, 2024
1 parent 45b716d commit 28773f9
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ Comments:
The Rust application after compiled will be a binary.
There may be two ways to run it from AiiDA:

- Get the binary with install the pyo3 wrapper lib and put the binary of corresponding OS architecture to the python bin path.
- Get the binary with install the pyo3 wrapper lib and put the binary of corresponding OS architecture to the python bin path. In AiiDA maybe keep on using circus to mornitoring the start services.
- Expose the API and have a python coordinator "main" as `main.rs` which is less than 100 lines. Not sure about the performance since python has GIL!!

### TBD
Expand Down
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,63 @@ tatzelwurm is a lightweight persistent queue system to deal with process calls a

- The design consideration is in [DESIGN.md](https://github.com/unkcpz/tatzelwurm/blob/main/DESIGN.md)

#### Architecture
## Architecture

![The architecture summary of the new design](./misc/tatzelwurm-arch-tatz-arch.svg)

## How to play with the prototype

Rust is a compiled language so the binaries can be download from and run.
Three binaries are provided for the coordinator, actioner and worker respectively.

In different terminal or multiplexer, run

```bash
./coordinator
```

to start the coordinator.

Run

```bash
./actioner task add
./actioner task play <id>
./actioner task play -a
```

to add task to table and run it.

Start the worker, multiple workers if want to test load balancing.

```bash
./worker
```

If you want to compile from source code, you can:

[Install Rust](https://www.rust-lang.org/tools/install).

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Clone the repo

```bash
git clone https://github.com/unkcpz/tatzelwurm.git && cd tatzelwurm
```

Build the project

```bash
cargo build --release
```

The binaries will be in folder `target/release/`.
Then run binaries as described above.


## Progress

- [x] Basic communication between coordinator and workers.
Expand Down Expand Up @@ -44,3 +97,4 @@ tatzelwurm is a lightweight persistent queue system to deal with process calls a
- [ ] settle all the todos (should do this frequently when it is at proper timing)
- [ ] Polish the design note (should do this frequently when it is at proper timing)
- [ ] Move aiida specific design note (comparison with the legacy RMQ parts) to wiki for reference, and leave the generic design part in the design note.
- [ ] Take a look at hyperequeue to learn good design and Rust technology.

0 comments on commit 28773f9

Please sign in to comment.