poc of zmq communications over yapapi and Golem Network
[ not required but recommended ]
sudo apt install libzmq3-dev
In order to run on Golem, one needs to install the yagna daemon.
Please follow the requestor's introduction on running tasks on Golem.
curl -ksSf https://join.golem.network/as-requestor | bash -
and then, when running yagna, specify:
yagna service run
git clone https://github.com/golemfactory/zmqpoc.git
cd zmqpoc
pip install -U pip poetry
poetry install
python server.py --port 4242
python socket_forwarder.py --listen-port 6767 --send-port 4242
python client.py --port 6767
docker build -t zmqpoc -f zmqpoc.Dockerfile .
docker run -p 4242:4242 zmqpoc:latest
pip install gvmkit-build
docker build -t zmqpoc -f zmqpoc.Dockerfile .
gvmkit-build zmqpoc:latest
gvmkit-build zmqpoc:latest --push
The image is already pushed into the repository under the following hash:
3b8b4032194f305aac79d84338851eae46c94cd6efbd02a5009cbfb6
Make sure your yagna
is launched and running on the hybrid net and remember about
initializing the payment driver and about adding your application key as
YAGNA_APPKEY
to the environment.
Then, launch the requestor as:
python -m zmq_requestor
or, if you wish to see more debug info about the performed connections:
python -m zmq_requestor --verbose
for the full usage, see:
python -m zmq_requestor --help
After the requestor announces that it's listening:
ZMQ server started
Listening on local port: 4242
you may run the client:
python client.py --port 4242 --buffer-len 65536 --num-iterations 100