zeromq

Understanding Celluloid Concurrency

青春壹個敷衍的年華 提交于 2019-12-05 16:50:55
问题 Following are my Celluloid codes. client1.rb One of the 2 clients. (I named it as client 1) client2.rb 2nd of the 2 clients. (named as client 2 ) Note: the only the difference between the above 2 clients is the text that is passed to the server. i.e ( 'client-1' and 'client-2' respectively) On testing this 2 clients (by running them side by side) against following 2 servers (one at time). I found very strange results . server1.rb ( a basic example taken from the README.md of the celluloid-zmq

How do I clear the buffer upon start/exit in ZMQ socket? (to prevent server from connecting with dead clients)

别来无恙 提交于 2019-12-05 15:04:20
I am using a REQ/REP type socket for ZMQ communication in python. There are multiple clients that attempt to connect to one server. Timeouts have been added in the client script to prevent indefinite wait. The problem is that when the server is not running, and a client attempts to establish connection, it's message gets added to the queue buffer, which should not even exist at this moment ideally. When the script starts running and a new client connects, the previous client's data is taken in first by the server. This should not happen. When the server starts, it assumes a client is connected

ZeroMQ push socket causes client to not terminate when no process is listening

本秂侑毒 提交于 2019-12-05 14:48:20
I'm just starting to mess with ZeroMQ and I have a problem with a client that doesn't terminate normally. In particular I have a client that may "push" data when no sink server is listening and that seems to make the process hang after the python code has finished. I assume there is some background thread that needs to be cleaned up -- please tell me how or point to documentation. Here is the relevant piece of code. If I run the process with no listener with the "self.push" line uncommented the process hangs def setup(self): print self.name, "connect to sockets" ctx = self.ctx = zmq.Context()

DDS vs AMQP vs ZeroMQ [closed]

风格不统一 提交于 2019-12-05 13:51:56
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I wanted a feedback on whether my evaluations and concerns are correct. I have been reseaching the three, Data Distribution Service,

Follow up: Boost serialized custom C++ object passed over ZeroMQ pull socket

故事扮演 提交于 2019-12-05 13:07:01
This is a follow up problem that I opened up earlier in another thread at Boost: De-serializing a custom C++ object passed over ZeroMQ pull socket . The problem in that thread has been resolved based on the answer provided. Now I have another problem at runtime. Please, see the below description. I am realtively new to C++ realm so I appreciate if you tell me any necessity for improvement in any part of the code provided in addition to what I descibed under problem statment. Description: I have a C++ class named GenericMessage which simply holds an id and data as its members (See code snippet

Create language kernels for IPython for a language without ZeroMQ bindings

戏子无情 提交于 2019-12-05 10:30:27
There are some interesting descriptions of writing language kernels to allow a language previously unsupported by IPython to be executed from IPython. In all cases, the kernel creation step involves using the target language's ZeroMQ bindings (since ZeroMQ is a major architectural component of IPython's front-end to kernel communication protocol). In my company, a proprietary language was created a few years ago and is maintained with compilers to bytecode (with a bytecode runner written in C++), Flash, and JavaScript ... it's still heavily used today but it has never had anything like a REPL.

php-zmq is not shown on phpinfo() page

∥☆過路亽.° 提交于 2019-12-05 10:28:05
I am using Wamp Server on Windows and I installed zmq library. When I write php --info on console, I see that zmq is shown as intalled. zmq ZMQ extension => enabled ZMQ extension version => 1.1.2 libzmq version => 3.2.2 But when I create a php page with phpinfo() function to show php configuration, it does not show anything about zmq. Plus, it is unable to find ZMQContext and other ZMQ classes, like ZMQSocket. I guess it's not fully installed, but I don't know what to do anymore. I have already modified both php.ini files with required info. C:\wamp\bin\php\php5.5.12\php.ini [ZMQ] extension

消息队列的流派

社会主义新天地 提交于 2019-12-05 10:06:04
什么是 MQ Message Queue(MQ),消息队列中间件。很多人都说:MQ 通过将消息的发送和接收分离来实现应用程序的异步和解偶,这个给人的直觉是——MQ 是异步的,用来解耦的,但是这个只是 MQ 的效果而不是目的。MQ 真正的目的是为了通讯,屏蔽底层复杂的通讯协议,定义了一套应用层的、更加简单的通讯协议。一个分布式系统中两个模块之间通讯要么是 HTTP,要么是自己开发的 TCP,但是这两种协议其实都是原始的协议。HTTP 协议很难实现两端通讯——模块 A 可以调用 B,B 也可以主动调用 A,如果要做到这个两端都要背上 WebServer,而且还不支持长连接(HTTP 2.0 的库根本找不到)。TCP 就更加原始了,粘包、心跳、私有的协议,想一想头皮就发麻。MQ 所要做的就是在这些协议之上构建一个简单的“协议”——生产者/消费者模型。MQ 带给我的“协议”不是具体的通讯协议,而是更高层次通讯模型。它定义了两个对象——发送数据的叫生产者;接收数据的叫消费者, 提供一个 SDK 让我们可以定义自己的生产者和消费者实现消息通讯而无视底层通讯协议 有 Broker 的 MQ 这个流派通常有一台服务器作为 Broker,所有的消息都通过它中转。生产者把消息发送给它就结束自己的任务了,Broker 则把消息主动推送给消费者(或者消费者主动轮询) 重 Topic kafka、JMS

Cannot import zmq in python (install issue)

旧时模样 提交于 2019-12-05 09:42:46
I can't seem to install pyzmq on my macbook (OSX 10.9.1) First call was to run: sudo pip install pyzmq There was an error that libzmq couldn't be found, and it appeared to try and compile the bundled version: jono@air:~ $ sudo pip install pyzmq Password: Downloading/unpacking pyzmq Downloading pyzmq-14.0.1.tar.gz (867kB): 867kB downloaded Running setup.py egg_info for package pyzmq no previously-included directories found matching 'docs/build' no previously-included directories found matching 'docs/gh-pages' warning: no directories found matching 'bundled/uuid' warning: no previously-included

Saltstack 01 简介

只谈情不闲聊 提交于 2019-12-05 09:32:02
什么是saltstack Saltstack是基于python开发的一套C/S架构配置管理工具 使用SSL证书签方的方式进行认证管理 底层使用ZeroMQ消息队列pub/sub方式通信 – 号称世界上最快的消息队列ZeroMQ能快速在成千上万台主机上进行各种操作 – 采用RSA Key方式确认身份 主要功能 Saltstack最主要的两个功能是:配置管理与远程执行 Saltstack不只是一个配置管理工具,还是一个云计算与数据中心架构编排的利器 在友好地支持各大云平台之后,配合Saltstack的Mine实时发现功能可以实现各种云平台业务的自动扩展 通过只带api接口平台化调用 Saltstack架构 Saltstack基于C/S架构 – 服务器端称作Master – 客户端称作Minion 可以实现传统处理方式,即:客户端发送请求给服务器,服务器收到请求后处理请求,再将结果返回 也可以使用消息队列中的发布与订阅(pub/sub)服务模式 Saltstack工作机制 1.Master和Minion都以守护进程的方式运行 2.Master监听配置文件里定义的ret_port(接收minion请求),和publish_port(发布消息)的端口 3.当Minion运行时,它会自动连接到配置文件里定义的Master地址ret_port端口进行连接认证 4