zeromq

How to call MATLAB executable for Python on cluster?

て烟熏妆下的殇ゞ 提交于 2019-12-07 23:16:07
问题 I am using a python-matlab-bridge that calls MATLAB from python by starting it on a ZMQ socket. On my own computer, I hand the bridge the location of the executable (in this case MATLAB 2014B): executable='/Applications/MATLAB_R2014b.app/bin/matlab' and everything works as required and the printed statement is: Starting MATLAB on ZMQ socket ipc:///tmp/pymatbridge-49ce56ed-f5b4-43c4-8d53-8ae0cd30136d Now I want to do the same on a cluster. Through module avail I find there are two MATLAB

CZMQ : Unable to receive message

不想你离开。 提交于 2019-12-07 22:53:23
问题 I am trying to write a simple program to demonstrate Publisher/Subscriber communication using 'libczmq'. Although I am able to send the message via the 'zmsg_send' api ( or so I presume based on its return value ), I am unable to receive the message via the 'zmsg_recv' (blocking) API, it is probably unable to receive the message. #include "czmq.h" int main (void) { int rc; const char *ipc_file="ipc://tmp.socket"; const char *str = "Hello World!!!"; /*****************************************/

ZeroMQ无锁队列分析

牧云@^-^@ 提交于 2019-12-07 21:10:28
ZeroMQ无锁队列分析 1. 概述 ZeroMQ使用了一个无锁队列,用于线程间的高性能数据交换。这个无锁队列由两个对象组成: yqueue_t: 一个普通的队列,实现内存块链表,以及内存块的回收和重复利用。 ypipe_t: 基于yqueue_t实现的无锁管道队列,实现一读一写的无锁操作。 2. yqueue_t类 yqueue_t类实现了一个普通的队列(多线程不安全),但为了提高性能,使用了内存块链的方式,每个内存块可支持多个数据元素节点。 begin_chunk: 队列第一个内存块。 end_chunk: 队列最后一个内存块。 begin_pos: 队列中第一个元素在第一个内存块中的位置。 end_pos: 对垒中最后一个元素在最后一个内存块的位置。 同时为了减少内存的分配、释放操作,yqueue_t中包含了一个spare_chunk,存放一个空闲的内存块。该spare_chunk的首节点指针使用atomic变量存放,实现spare_chunk中存取的线程安全。 2.1 push操作 push操作实现向队列中增加一个空元素,此后可使用back方法获取新增元素的引用,然后将数据填入。简要操作过程: // end pos后移, 如果达到当前chunk末尾,就新增一个chunk. // 获取新chunk,可以从spare_chunk获取,也可能是重新内存分配。 if ( ++end

Running code asynchronously inside pollers

纵饮孤独 提交于 2019-12-07 18:12:06
问题 In my ruby script,I am using celluloid-zmq gem. where I am trying to run evaluate_response asynchronously inside pollers using, async.evaluate_response(socket.read_multipart) But if I remove sleep from loop, somehow thats not working out, It is not reaching to "evaluate_response" method. But if I put sleep inside loop it works perfectly. require 'celluloid/zmq' Celluloid::ZMQ.init module Celluloid module ZMQ class Socket def socket @socket end end end end class Indefinite include Celluloid:

RIght ZeroMQ topology

大兔子大兔子 提交于 2019-12-07 17:23:09
问题 I need to write an Order Manager that routes client (stock, FX, whatever) orders to the proper exchange. The clients want to send orders, but know nothing about FIX or other proprietary protocols, only an internal (normalized) format for sending orders. I have applications (servers) that each connect through FIX/Binary/etc connections to each FIX/etc provider. I would like a broker program in between the clients and the servers that take the normalized order and turn it into a proper format

【消息队列MQ】各类MQ比较

混江龙づ霸主 提交于 2019-12-07 16:26:23
目前业界有很多MQ产品,我们作如下对比: RabbitMQ 是使用Erlang编写的一个开源的消息队列,本身支持很多的协议:AMQP,XMPP, SMTP, STOMP,也正是如此,使的它变的非常重量级,更适合于企业级的开发。同时实现了一个经纪人(Broker)构架,这意味着消息在发送给客户端时先在中心队列排队。对路由(Routing),负载均衡(Load balance)或者数据持久化都有很好的支持。 Redis 是一个Key-Value的NoSQL数据库,开发维护很活跃,虽然它是一个Key-Value数据库存储系统,但它本身支持MQ功能,所以完全可以当做一个轻量级的队列服务来使用。对于RabbitMQ和Redis的入队和出队操作,各执行100万次,每10万次记录一次执行时间。测试数据分为128Bytes、512Bytes、1K和10K四个不同大小的数据。实验表明:入队时,当数据比较小时Redis的性能要高于RabbitMQ,而如果数据大小超过了10K,Redis则慢的无法忍受;出队时,无论数据大小,Redis都表现出非常好的性能,而RabbitMQ的出队性能则远低于Redis。 入队 出队 128B 512B 1K 10K 128B 512B 1K 10K Redis 16088 15961 17094 25 15955 20449 18098 9355 RabbitMQ

ZeroMQ XPUB/XSUB Serious Flaw?

↘锁芯ラ 提交于 2019-12-07 14:37:32
问题 It seems as though the XPUB/XSUB socket types have a serious flaw that is difficult to work around: This is my implementation of that center node: #include <zmq.hpp> int main() { zmq::context_t context(1); //Incoming publications come here zmq::socket_t sub(context, ZMQ_XSUB); sub.bind("ipc://subscriber.ipc"); //Outgoing publications go out through here. zmq::socket_t pub(context, ZMQ_XPUB); pub.bind("ipc://publisher.ipc"); zmq::proxy(sub, pub, nullptr); return 0; } The problem is, of course,

ZeroMQ on Heroku

偶尔善良 提交于 2019-12-07 12:35:18
问题 Why doesn't it exist on Heroku? I want to use Akka and a distributed queues system for actors to communicate on different dynos. RabbitMQ doesn't seem to be the best option using Akka, because a lot of tricks are needed to seamlessly work with actors without concerning about the underlying queues. Nevertheless, the best option seems to be Durable Mailboxes but with RabbitMQ: akka-amqp-mailbox. I still have to set it up first though. What other options do you consider that provide a seamless

What open ports are required on firewall to allow for salt-stack remote execution?

强颜欢笑 提交于 2019-12-07 09:05:55
问题 The documentation on saltstack appears to be unclear regarding what ports are required from the salt-master -> salt-minion (apparently none are required). It suggests that ports only need to be opened from the salt-minion -> salt-master. (See: http://docs.saltstack.com/en/latest/topics/tutorials/firewall.html) If however commands are executed remotely on the salt-master targeted to a minion, surely the master needs to be able to push this into the minion and therefore require a network

zeromq performance test. What's the accurate latency?

左心房为你撑大大i 提交于 2019-12-07 07:17:25
I'm using zmq to carry message across process, and I want to do some performance test to get the latency and throughout. The official site gives the guide to tell How to Run Performance Tests For example, I tried: local_lat tcp://*:15213 200 100000 remote_lat tcp://127.0.0.1:15213 200 100000 and get the result: message size: 200 [B] roundtrip count: 100000 average latency: 13.845 [us] But when trying the pub-sub example in C++, I found the time interval between sending and receiving is about 150us. (I get the result by print log with timestamp) Could anybody explain the difference between