https://github.com/lmarzocchetti/rustuple
A Rust tuple space implementation
https://github.com/lmarzocchetti/rustuple
library rust rust-lang server tuple
Last synced: 3 months ago
JSON representation
A Rust tuple space implementation
- Host: GitHub
- URL: https://github.com/lmarzocchetti/rustuple
- Owner: lmarzocchetti
- License: mit
- Created: 2023-12-15T15:34:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-15T17:37:30.000Z (almost 2 years ago)
- Last Synced: 2025-01-07T18:18:49.232Z (about 1 year ago)
- Topics: library, rust, rust-lang, server, tuple
- Language: Rust
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rustuple
A Rust tuple space implementation using Web Socket!
### Project division
This library is composed by a Server and a Library to write components that can communicate with each other in the Tuple Space.
### Operations implemented (Linda)
- Out: Put a Tuple in the Tuple space
- In (non-blocking): Extract a tuple from the Tuple space
- In (blocking): Blocking version of In
- Rd (non-blocking): Read a tuple from the Tuple space
- Rd (blocking): Blocking version of Rd
### Compile and using
Compile the server:
```
$ cargo build --bin --release rustuple
```
Run the server (in the target/release folder):
```
$ ./rustuple
```
I use in the example client IP_ADDR = "127.0.0.1" and PORT_NUM = "9001"
Run the example algorithm (leader election: lcr algorithm) that used the library:
```
$ cargo run --bin --release lcr_algorithm
```
To use the Library create a new [[bin]] in the Cargo.toml file and simply use:
```
use rustuple::data;
use rustuple::tuple_space;
```
In the data module there are all the data structures and in the tuple_space there is the struct to connect and access the Tuple Space. (see the bin folder for the example client)
### Documentation
You can access the documentation by run:
```
$ cargo doc --release --open
```