zeromq

Ratchet server instantiation: “Unsupported declare 'strict_types'”

一曲冷凌霜 提交于 2019-12-11 13:05:14
问题 I have a Ratchet application running smoothly in my windows local machine with PHP version: 7.1.8 . I tried to install zmq and php binding on linux deployment server with PHP version 5.5.9 and zmq installed version : 4.0.4 . Here's the error I get when I try to instantiate server script on server: org@ktm /var/www/html/project_dir (pusher)$ php index.php "/report-test" PHP Warning: Unsupported declare 'strict_types' in /var/www/html/Test_Gbd_Portal/gbdportal-new/vendor/evenement/evenement/src

Multithreading and ZMQ DEALER/REP hello world doesn't work

折月煮酒 提交于 2019-12-11 11:42:07
问题 First of all my code (largely inspired from ZMQ doc http://zguide.zeromq.org/py:mtserver): import zmq import time import sys import threading #SOCKET_NAME = "tcp://127.0.0.1:8000" SOCKET_NAME = "inproc://mysocket" def dealerRoutine(context): socket = context.socket(zmq.DEALER) socket.bind(SOCKET_NAME) time.sleep(12) socket.send("hello") socket.send("hello") print socket.recv() print socket.recv() socket.close() def workerRoutine(context): socket = context.socket(zmq.REP) socket.connect(SOCKET

How to run zerorpc as a greenlet?

感情迁移 提交于 2019-12-11 10:46:45
问题 I want to run a zeroRPC server as a greenlet with other gevent greenlets in the same loop. The documentation of ZeroRPC is a little light. This is the suggested way to start a zeroRPC server: s = zerorpc.Server(Cooler()) s.bind("tcp://0.0.0.0:4242") s.run() To run the server as a greenlet, I've wrapped the run in a greenlet: s = zerorpc.Server(Cooler()) s.bind("tcp://0.0.0.0:4242") gevent.spawn(s.run) # More code and greenlets started. # ... But it seems a little awkward, considering that

ZeroMQ individual subscriber queues

﹥>﹥吖頭↗ 提交于 2019-12-11 09:42:19
问题 I have a question about ZeroMQ PUB/SUB . Does the publisher create a separate queue for each individual subscriber or is there one queue for all subscribers (and hence limited by the slowest subscriber)? 回答1: Each connected subscriber gets its own queue. When a subscriber is slow, its own queue will fill up and then overflow (high water mark is by default 1,000), and its messages will get dropped. This won't affect other subscribers. 来源: https://stackoverflow.com/questions/16220679/zeromq

Can't install PyZMP for Python — Dependencies

为君一笑 提交于 2019-12-11 09:19:57
问题 I am having trouble installing the PyZMP dependency for iPython. I have tried a number of things such as using pip/brew, but ended up installing the package manually using this answer. Now, pip list packages yields the following pyzmq (14.2.0-dev) pyzmq-static (2.2) (I have also tried using pyzmq-static). Also, my python eggs are clearly present in the proper location: ls /usr/local/lib/python2.7/site-packages/ | grep "pyzmq" pyzmq-14.2.0_dev-py2.7.egg-info pyzmq_static-2.2-py2.7.egg-info

Linux g++ compiling error: /usr/bin/ld: cannot find -l/usr/local/include

你。 提交于 2019-12-11 07:57:10
问题 I am working on a project in which protobuf and zmq are involved. I have finished it on VS2010 and now want to make it work under Linux. I just installed protobuf and zmq on our Linux server and the Makefile looks like this: g++ -c -D_DEBUG TestTDFAPI_v2.cpp -I ../ g++ -c -D_DEBUG Platform.cpp g++ -c -D_DEBUG PathHelper.cpp g++ -c -D_DEBUG MyStruct.pb.cpp g++ -c -D_DEBUG MyStruct.cpp g++ -o Test_TDFAPI_v2 Platform.o PathHelper.o MyStruct.pb.o MyStruct.o TestTDFAPI_v2.o -l /usr/local/include

How get redundancy for forwarder in ZMQ PUB/SUB?

坚强是说给别人听的谎言 提交于 2019-12-11 07:53:18
问题 I tried and made run this example. It worked very well. I can add as many publishers or subscribers as I want, everything will communicate thanks to the forwarder. My concern is about redundancy. If the forwarder does not respond anymore, nothing's gonna work until forwarder is up. I found an example for REQ/REP, but it can't be applied for PUB/SUB as subscribers. But idea is here. Is there a way to have something similar in a pub/sub scenario? Thank you. 回答1: First read this chapter. In the

zmq_getsockopt returns EINVAL on windows x64 when local address of ZMQ_FD option_val passed

妖精的绣舞 提交于 2019-12-11 07:45:03
问题 On windows x64 passing the address of a local variable to zmq_getsockopt for ZMQ_FD consistently results in EINVAL. The code below is the smallest possible to reproduce the problem. #include <zmq.h> #include <stdio.h> void zmq_perror(const char*); int main(void) { const char *endpoint = "tcp://127.0.0.1:7100"; void *ctx = zmq_ctx_new(); if (ctx == NULL) { zmq_perror("zmq_ctx_new"); } void *socket = zmq_socket(ctx, ZMQ_DEALER); if (socket == NULL) { zmq_perror("zmq_socket"); } int rc; rc = zmq

IPython Language Kernel Implementation in Erlang

孤者浪人 提交于 2019-12-11 06:55:48
问题 I'm currently building an Erlang language kernel backend for IPython, and I'm testing it out in the console. What I have working: Start ipython console and the erlang kernel Erlang kernel reads contents of kernel.json file which contains all the port numbers for zmq Create zmq bindings for the shell , heartbeat , control , iopub sockets using the erlzmq2 library. Created functions to parse messages from IPython Create a process for the heartbeat server to run on and return messages to IPython

using openssl with its unblocked bio, ssl_read return SSL_ERROR_SYSCALL and SSL_ERROR_WANT_READ

送分小仙女□ 提交于 2019-12-11 06:29:30
问题 I use zeromq and openssl to write my server and client . After successful handshake, when the client sends message to server again, the ssl_read() in server returns -1 and ssl_get_erro() returns SSL_ERROR_SYSCALL, this situation repeats when server receives messages again. I cannot find the reason. Do i need BIO_flush()? I would really appreciate you even just give me some inspirations to work this out. well, my program is too complicated to show. I was asked to add ssl to rpcz to improve its