Giter Club home page Giter Club logo

zmqpoc's Introduction

zmqpoc

poc of zmq communications over yapapi and Golem Network

prerequisites

python >= 3.9

libzmq3

[ not required but recommended ]

sudo apt install libzmq3-dev

yagna daemon

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

installing

git clone https://github.com/golemfactory/zmqpoc.git
cd zmqpoc
pip install -U pip poetry
poetry install

running locally (POC of a POC of a POC ;)

the server

python server.py --port 4242

the forwarder

python socket_forwarder.py --listen-port 6767 --send-port 4242

the client

python client.py --port 6767

running the server in a docker container (POC of a POC)

docker build -t zmqpoc -f zmqpoc.Dockerfile .
docker run -p 4242:4242 zmqpoc:latest

running on golem (the proper POC0)

preparing the GVMI image

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

running the requestor

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

zmqpoc's People

Contributors

shadeofblue avatar

Stargazers

Kevin Alexander Scott Jellis avatar

Watchers

Przemysław Rekucki avatar Viggith avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.