In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
First, what is zeromq?
This is a series of interfaces similar to Socket. The difference between Socket and socket is that ordinary socket is end-to-end (1:1 relationship), while ZMQ can be Nsocket-M. people know more about BSD sockets than peer-to-peer connections, which require explicit connection establishment, connection destruction, protocol selection (TCP/UDP), error handling, etc., while ZMQ shields these details, making your network programming easier. ZMQ is used for communication between node and node, and node can be a host or a process.
To quote the official saying: "ZMQ (hereinafter ZeroMQ referred to as ZMQ) is a simple and easy-to-use transport layer, a socket library like a framework, which makes Socket programming simpler, simpler and more efficient." Is a message processing queue library that can scale between multiple threads, kernels, and host boxes. The clear goal of ZMQ is to "become part of the standard network protocol stack and then enter the Linux kernel". Their success has not yet been seen. However, there is no doubt that it is a layer of encapsulation on top of the "traditional" BSD socket that people need more. ZMQ makes writing high-performance web applications extremely simple and fun. "
Second, comparison of mainstream message queues
The following pictures are from the Internet:
Comparison of mainstream message queues
The above picture shows the number of messages received and sent per second. From the above picture, zeromq is the fastest, and his message queue is not at the same level. I don't know how stable it is. As far as I've learned, rabbitmq has enterprise-level stability, so it's up to you to decide what kind of message queue you choose according to your scenario and personal preference.
Third, install zeromq 1 Management tools install [root@localhost workspace] # yum search zeromqczmq.x86_64: High-level C binding for 0MQ (ZeroMQ) php-zmq.x86_64: ZeroMQ messagingpython-txzmq.noarch: Twisted bindings for ZeroMQzeromq-devel.i686: Development files for zeromqzeromq-devel.x86_64: Development files for zeromqzeromq3-devel.i686: Development files for zeromq3zeromq3-devel.x86_64: Development files for zeromq3czmq.i686: High-level C binding for 0MQ (ZeroMQ) fedmsg.noarch: Tools for Fedora Infrastructure real-time messagingmoksha.noarch: a platform For creating real-time web applicationspython-askbot-fedmsg.noarch: Askbot plugin for emitting events to the Fedora message buszeromq.i686: Software library for fast Message-based applicationszeromq.x86_64: Software library for fast, message-based applicationszeromq3.i686: Software library for fast, message-based applicationszeromq3.x86_64: Software library for fast, message-based applications
Just choose the version you want to install.
[root@localhost workspace] # yum install zeromq3 php-zmq
It's easy, and the php extensions for zeromq and zeromq are installed.
2. Install zeromq manually
Download address:
Http://download.zeromq.org/https://github.com/mkoppanen/php-zmq
Install zeromq
Tar zxvf zeromq-4.0.4.tar.gz cd zeromq-4.0.4. / configure-- prefix=/usr/local/zeromq make & & make install install the php extension unzip php-zmq-master.zip cd php-zmq-master / usr/local/php/bin/phpize. / configure-- with-php-config=/usr/local/php/bin/php-config make & & make install
Modify php.ini, join extension=zmq.so, restart php, done. By the way, there are examples in the php-zmq-master/examples directory, you can take a look at them.
The biggest advantage of manual installation is that you can install the latest version, while administrative tools are subject to the source, but the latest is not necessarily the most stable. Choose what the root needs.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.