This repository contains the implementation of a service host-worker using different languages
┌─────────────┐ POSIX Queue (request) ┌─────────────┐
│ ├───────────────────────────►│ │
│ Service A │ │ Service B │
│ (Host) │ │ (Worker) │
│ │◄───────────────────────────┤ │
└─────────────┘ POSIX Queue (response) └─────────────┘
- C++
- Python
- Rust
- IPC communication using POSIX queues
We have multiple scripts to build and test the different services
Python
- runpython.sh : activate python virtual environment + Start service as host
#!/bin/bash
. ../venv/bin/activate
python3.11 ../python/main.py --host
C++
- buildcpp.sh : Compile Cpp code
- runcpp_host.sh : Start service host
#!/bin/bash
../cpp/build/host/cppservice
- runcpp_worker.sh : Start service worker
#!/bin/bash
../cpp/build/worker/cppservice
Rust
- buildrust.sh : Compile Rust code
- runrust.sh : Start service as worker
#!/bin/bash
../rust/target/debug/rsservice