This repository contains the implementation of a service host-worker using different languages
┌─────────────┐ POSIX Queue (request) ┌─────────────┐
│ ├───────────────────────────►│ │
│ Service A │◄───────────────────────────│ Service B │
│ (Host) │ POSIX Queue (response) │ (Worker) │
│ │ | │
│ │ ┌────────────┐ | │
│ ├───────│ Shared ├───────│ │
│ │ │ Memory │ | │
└─────────────┘ └────────────┘ └─────────────┘
- 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 --hostC++
- 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/cppserviceRust
- buildrust.sh : Compile Rust code
- runrust.sh : Start service as worker
#!/bin/bash
../rust/target/debug/rsservicehttps://www.parallelcube.com/tutorials/
Patreon: https://www.patreon.com/BYC
Ko-fi: https://ko-fi.com/cristianbarrio
Twitter: https://twitter.com/parallelcube
Instagram: https://www.instagram.com/parallelcube