zeromq

Trying to build a distributed crawler with ZeroMQ

谁说我不能喝 提交于 2019-12-03 03:55:35
I just started to learn ZeroMQ and want to build a distributed webcrawler as an example while learing. My idea is to have a "server", written in PHP, which accepts a url where the crawling should start. Workers (C# cli) will have to crawl that url, extract links, and push them back into a stack on the server. The server keeps sending urls in the stack to workers. Perhaps a redis will keep track of all crawled urls, so we dont crawl sites multiple times and have the ability to extract statistics of the current process. I would like to have the server to distribute tasks evenly, be aware of new

Unable to load binary \"libzmq\" from folders

大兔子大兔子 提交于 2019-12-03 03:45:38
背景: 需要对接第三方软件的数据服务, 第三方数据服务采用ZeroMq进行消息推送。 采用NetCore控制台程序完成。 开发环境: 通过NuGet在项目中获取ZeroMq库,依赖库报如下图警告: [ 已使用“.NETFramework,Version=v4.6.1”而不是项目目标框架“.NETCoreApp,Version=v2.1”还原包“ZeroMQ 4.1.0.31”。此包可能与项目不完全兼容。 ] 开发环境运行一切正常。 正式服务环境:Windows Server 2016运行报错 System.TypeInitializationException: The type initializer for 'ZeroMQ.lib.zmq' threw an exception. ---> System.IO.FileNotFoundException: UnmanagedLibrary[libzmq] Unable to load binary "libzmq" from folders C:\Windows\system32\libzmq.dll C:\Users\Administrator\Desktop\20191031_0945\StockGetApi20191031-001\StockGetApi\StockMarketRedisServer-001\libzmq

Scaling WebSockets with a Message Queue

我只是一个虾纸丫 提交于 2019-12-03 03:38:43
I have built a WebSockets server that acts as a chat message router (i.e. receiving messages from clients and pushing them to other clients according to a client ID ). It is a requirement that the service be able to scale to handle many millions of concurrent open socket connections, and I wish to be able to horizontally scale the server. The architecture I have had in mind is to put the websocket server nodes behind a load balancer, which will create a problem because clients connected to different nodes won't know about each other. While both clients A and B enter via the LoadBalancer ,

How to import zeromq libraries in cmake?

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm just starting to learn how to work with zeromq libraries and using them in different C++ projects. The sample code that I wrote (actually copied from there tutorials)is this: // file: main.cpp // Hello World client in C++ // Connects REQ socket to tcp://localhost:5555 // Sends "Hello" to server, expects "World" back // #include <zmq.hpp> #include <string> #include <iostream> int main () { // Prepare our context and socket zmq::context_t context (1); zmq::socket_t socket (context, ZMQ_REQ); std::cout << "Connecting to hello world server…"

Troubles with zmq_bind() in ZeroMQ binding for MQL4 language

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on MT4 and used wrapper mql4zmq.dll as given in link https://github.com/AustenConrad/mql4zmq As I have followed all instruction and successfully loaded DLL as well as lib file at specific locations from pre-compiled. But it can not bind or connect with socket through zmq_connect(,) or zmq_bind(,) . Please some one help me to solve this problem. I am posting my code here // Include the libzmq.dll abstraction wrapper. #include <mql4zmq.mqh> //+------------------------------------------------------------------+ //| variable

Is ZeroMQ production ready?

半世苍凉 提交于 2019-12-03 02:54:07
问题 What are your experiences with ZeroMQ as a general purpose messaging middleware? Did you run into any show-stopping bugs or non-obvious "features"? E.g. 2.0 was not flushing messages properly, and the troubleshooting guide seems to give the most terrifying workaround of them all: " sleep(1) before exit". Did the API reduce complexity of applications or did it prove to be troublesome? Is backwards compatibility often broken? 回答1: I'm using it for research, so "semi-production". It's a

WHY / WHEN using rather DDS instead of ZeroMQ? [closed]

浪尽此生 提交于 2019-12-03 02:49:51
Closed . This question is opinion-based. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . I read the followings: DDS vs AMQP vs ZeroMQ http://mnb.ociweb.com/mnb/MiddlewareNewsBrief-201004.html And it seems that there is no benfit using DDS instead of zmq: the latency of zmq is better. It seem to me that the API of ZMQ is cleared and simple. I cant use ZMQ in order to transfer data between threads / processes / stations. So: When it is better to use DDS ? Are there any

Understanding ZeroMQ

匿名 (未验证) 提交于 2019-12-03 02:28:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So as I have asked in a previous post, I want to be able to make programs or functions written in different languages to communicate between them. I have come across zeromq recently and I'm trying to figure out whether or not this is something that could help me since it provides some sort of sockets. Can zeromq for example exchange data (or pass arguments) between a program written in python with a program or a function written in C++ or is its function for something completely different? 回答1: A: Oh Yes, exactly that is the power of ZeroMQ

Understanding advanced ZeroMQ socket types

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've read the 0MQ guide, and I understand the basic socket types: PUSH / PULL , REQ / REP , and PUB / SUB . I'm very confused though about ROUTER / DEALER and the X - sockets (e.g., XSUB / XPUB , XREQ / XREP ). What are the use cases for these socket types? 回答1: Trivial Archetypes ZeroMQ " sockets " are sounding alike a socket-oriented device, however on a closer look this smart library rather adds a Formal Communication Pattern ( which btw. uses a true socket ) that has a layered design to internally address details like internal

Why is the ZMQ_RCVHWM option of ZeroMQ ineffective?

匿名 (未验证) 提交于 2019-12-03 01:46:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: There is an endpoint, which is Dealer, and an endpoint which is Router. The Dealer is connected to the Router by TCP protocol. I set ZMQ_SNDHWM and ZMQ_RCVHWM to 1 for all of them. Note that the Dealer always sends to Router, but the Router does not receive. The questions are: When the Router is not set up, the Dealer just sends one message and is then obstructed. That is right, because ZMQ_SNDHWM is 1. But when I setup the Router, the Dealer can continue send about 4K msg and obstructed. Why? Another, if I let Router receive just