Submit Search
Upload
ZeroMQ简介
•
Download as KEY, PDF
•
12 likes
•
2,656 views
Xu Wang
Follow
简介,与 thrift/protobuf 的关系, 基本玩法, 部分参考
Read less
Read more
Technology
Report
Share
Report
Share
1 of 9
Download now
Recommended
Mininet Learning Guide(Mininet 学习指南)
Mininet Learning Guide(Mininet 学习指南)
呈 李
初窥Java网络IO
初窥Java网络IO
digitalsonic
Track2 -刘继伟--openstack in gamewave
Track2 -刘继伟--openstack in gamewave
OpenCity Community
簡介 Linux 的 Network Namespace 功能
簡介 Linux 的 Network Namespace 功能
John L Chen
使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理
haiyuan ning
Debian Policy - 5.6.12 Version
Debian Policy - 5.6.12 Version
Shih-Yuan Lee
Analysis of Adobe's RTMFP Protocol
Analysis of Adobe's RTMFP Protocol
Changming Sun
Syslog Ng
Syslog Ng
flytod
Recommended
Mininet Learning Guide(Mininet 学习指南)
Mininet Learning Guide(Mininet 学习指南)
呈 李
初窥Java网络IO
初窥Java网络IO
digitalsonic
Track2 -刘继伟--openstack in gamewave
Track2 -刘继伟--openstack in gamewave
OpenCity Community
簡介 Linux 的 Network Namespace 功能
簡介 Linux 的 Network Namespace 功能
John L Chen
使用Rpm&yum进行基础软件管理
使用Rpm&yum进行基础软件管理
haiyuan ning
Debian Policy - 5.6.12 Version
Debian Policy - 5.6.12 Version
Shih-Yuan Lee
Analysis of Adobe's RTMFP Protocol
Analysis of Adobe's RTMFP Protocol
Changming Sun
Syslog Ng
Syslog Ng
flytod
terminal, shell and process group
terminal, shell and process group
nightelf1984
Proxmox: 建立自己的虛擬主機
Proxmox: 建立自己的虛擬主機
維泰 蔡
2010 5 d4d393f6
2010 5 d4d393f6
Y YU
Virtualbox
Virtualbox
fangdun cai
7, vnc server
7, vnc server
ted-xu
Os讀書會20170415
Os讀書會20170415
Jen-Wei Cheng
Linux 系列分享[1] 概览
Linux 系列分享[1] 概览
rainoxu
Docker一期培训
Docker一期培训
青帅 常
Config RouterOS openVPN.pdf
Config RouterOS openVPN.pdf
AkashaC1
Cassandra运维之道(office2003)
Cassandra运维之道(office2003)
haiyuan ning
Analysis on tcp ip protocol stack
Analysis on tcp ip protocol stack
Yueshen Xu
How to Prevent DNS Attacks on MikroTik.pdf
How to Prevent DNS Attacks on MikroTik.pdf
AkashaC1
OpenStack Neutron Introduction
OpenStack Neutron Introduction
Liang Bo
构建ActionScript游戏服务器,支持超过15000并发连接
构建ActionScript游戏服务器,支持超过15000并发连接
Renaun Erickson
Container Security
Container Security
LinuxCon ContainerCon CloudOpen China
遠端Linux桌面程式
遠端Linux桌面程式
Casper Chen
Linux performance analysis cpu
Linux performance analysis cpu
静 丁
Linux Network Monitoring
Linux Network Monitoring
Kenny (netman)
OpenStack Branding and Marketing
OpenStack Branding and Marketing
Open Stack
Quantum essex summary
Quantum essex summary
Dan Wendlandt
Dough: OpenStack Billing Project
Dough: OpenStack Billing Project
Zhongyue Luo
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
Lorin Hochstein
More Related Content
What's hot
terminal, shell and process group
terminal, shell and process group
nightelf1984
Proxmox: 建立自己的虛擬主機
Proxmox: 建立自己的虛擬主機
維泰 蔡
2010 5 d4d393f6
2010 5 d4d393f6
Y YU
Virtualbox
Virtualbox
fangdun cai
7, vnc server
7, vnc server
ted-xu
Os讀書會20170415
Os讀書會20170415
Jen-Wei Cheng
Linux 系列分享[1] 概览
Linux 系列分享[1] 概览
rainoxu
Docker一期培训
Docker一期培训
青帅 常
Config RouterOS openVPN.pdf
Config RouterOS openVPN.pdf
AkashaC1
Cassandra运维之道(office2003)
Cassandra运维之道(office2003)
haiyuan ning
Analysis on tcp ip protocol stack
Analysis on tcp ip protocol stack
Yueshen Xu
How to Prevent DNS Attacks on MikroTik.pdf
How to Prevent DNS Attacks on MikroTik.pdf
AkashaC1
OpenStack Neutron Introduction
OpenStack Neutron Introduction
Liang Bo
构建ActionScript游戏服务器,支持超过15000并发连接
构建ActionScript游戏服务器,支持超过15000并发连接
Renaun Erickson
Container Security
Container Security
LinuxCon ContainerCon CloudOpen China
遠端Linux桌面程式
遠端Linux桌面程式
Casper Chen
Linux performance analysis cpu
Linux performance analysis cpu
静 丁
Linux Network Monitoring
Linux Network Monitoring
Kenny (netman)
What's hot
(18)
terminal, shell and process group
terminal, shell and process group
Proxmox: 建立自己的虛擬主機
Proxmox: 建立自己的虛擬主機
2010 5 d4d393f6
2010 5 d4d393f6
Virtualbox
Virtualbox
7, vnc server
7, vnc server
Os讀書會20170415
Os讀書會20170415
Linux 系列分享[1] 概览
Linux 系列分享[1] 概览
Docker一期培训
Docker一期培训
Config RouterOS openVPN.pdf
Config RouterOS openVPN.pdf
Cassandra运维之道(office2003)
Cassandra运维之道(office2003)
Analysis on tcp ip protocol stack
Analysis on tcp ip protocol stack
How to Prevent DNS Attacks on MikroTik.pdf
How to Prevent DNS Attacks on MikroTik.pdf
OpenStack Neutron Introduction
OpenStack Neutron Introduction
构建ActionScript游戏服务器,支持超过15000并发连接
构建ActionScript游戏服务器,支持超过15000并发连接
Container Security
Container Security
遠端Linux桌面程式
遠端Linux桌面程式
Linux performance analysis cpu
Linux performance analysis cpu
Linux Network Monitoring
Linux Network Monitoring
Viewers also liked
OpenStack Branding and Marketing
OpenStack Branding and Marketing
Open Stack
Quantum essex summary
Quantum essex summary
Dan Wendlandt
Dough: OpenStack Billing Project
Dough: OpenStack Billing Project
Zhongyue Luo
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
Lorin Hochstein
FOSDEM 2011 - 0MQ
FOSDEM 2011 - 0MQ
pieterh
Quantum - Virtual networks for Openstack
Quantum - Virtual networks for Openstack
salv_orlando
Europycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQ
fcrippa
ZeroMQ Is The Answer
ZeroMQ Is The Answer
Ian Barber
Overview of ZeroMQ
Overview of ZeroMQ
pieterh
Viewers also liked
(9)
OpenStack Branding and Marketing
OpenStack Branding and Marketing
Quantum essex summary
Quantum essex summary
Dough: OpenStack Billing Project
Dough: OpenStack Billing Project
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
FOSDEM 2011 - 0MQ
FOSDEM 2011 - 0MQ
Quantum - Virtual networks for Openstack
Quantum - Virtual networks for Openstack
Europycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQ
ZeroMQ Is The Answer
ZeroMQ Is The Answer
Overview of ZeroMQ
Overview of ZeroMQ
Similar to ZeroMQ简介
Rootkit 101
Rootkit 101
WEI CHIEH CHAO
Introduction MQTT in Chinese
Introduction MQTT in Chinese
Eric Xiao
[圣思园][Java SE]Network
[圣思园][Java SE]Network
ArBing Xie
PHP 應用之一 socket funion : 偽 WEB Server
PHP 應用之一 socket funion : 偽 WEB Server
志賢 黃
探索 ISTIO 新型 DATA PLANE 架構 AMBIENT MESH - GOLANG TAIWAN GATHERING #77 X CNTUG
探索 ISTIO 新型 DATA PLANE 架構 AMBIENT MESH - GOLANG TAIWAN GATHERING #77 X CNTUG
YingSiang Geng
MySQL自动切换设计与实现
MySQL自动切换设计与实现
orczhou
主库自动切换 V2.0
主库自动切换 V2.0
jinqing zhu
Unix socket
Unix socket
st900278
intro syslog syslogng
intro syslog syslogng
juruntang
syslog&syslog-ng
syslog&syslog-ng
jurntang
Linux network monitoring hands-on pratice
Linux network monitoring hands-on pratice
Kenny (netman)
Docker容器微服務 x WorkShop
Docker容器微服務 x WorkShop
Philip Zheng
Erlang开发及应用
Erlang开发及应用
litaocheng
IoT開發平台NodeMCU
IoT開發平台NodeMCU
承翰 蔡
一個微信專案從0到000的效能調教
一個微信專案從0到000的效能調教
Bruce Chen
高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕
ideawu
Mysql proxy+mysql-mmm
Mysql proxy+mysql-mmm
Yiwei Ma
实时消息推送系统
实时消息推送系统
Yi Feng Yang
IBM Cloud Private Introduction
IBM Cloud Private Introduction
Guangya Liu
Banquet 09
Banquet 09
Koubei UED
Similar to ZeroMQ简介
(20)
Rootkit 101
Rootkit 101
Introduction MQTT in Chinese
Introduction MQTT in Chinese
[圣思园][Java SE]Network
[圣思园][Java SE]Network
PHP 應用之一 socket funion : 偽 WEB Server
PHP 應用之一 socket funion : 偽 WEB Server
探索 ISTIO 新型 DATA PLANE 架構 AMBIENT MESH - GOLANG TAIWAN GATHERING #77 X CNTUG
探索 ISTIO 新型 DATA PLANE 架構 AMBIENT MESH - GOLANG TAIWAN GATHERING #77 X CNTUG
MySQL自动切换设计与实现
MySQL自动切换设计与实现
主库自动切换 V2.0
主库自动切换 V2.0
Unix socket
Unix socket
intro syslog syslogng
intro syslog syslogng
syslog&syslog-ng
syslog&syslog-ng
Linux network monitoring hands-on pratice
Linux network monitoring hands-on pratice
Docker容器微服務 x WorkShop
Docker容器微服務 x WorkShop
Erlang开发及应用
Erlang开发及应用
IoT開發平台NodeMCU
IoT開發平台NodeMCU
一個微信專案從0到000的效能調教
一個微信專案從0到000的效能調教
高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕
Mysql proxy+mysql-mmm
Mysql proxy+mysql-mmm
实时消息推送系统
实时消息推送系统
IBM Cloud Private Introduction
IBM Cloud Private Introduction
Banquet 09
Banquet 09
More from Xu Wang
Re-Think of Virtualization and Containerization
Re-Think of Virtualization and Containerization
Xu Wang
Hyper: 让Pod以VM为边界
Hyper: 让Pod以VM为边界
Xu Wang
Hyper 基于hypervisor的docker引擎.pptx
Hyper 基于hypervisor的docker引擎.pptx
Xu Wang
Rethink of PaaS
Rethink of PaaS
Xu Wang
Cassandra Technical and history overview
Cassandra Technical and history overview
Xu Wang
何时浮云散尽(在北邮北邮纪阳老师移动互联网课程上的讲义)
何时浮云散尽(在北邮北邮纪阳老师移动互联网课程上的讲义)
Xu Wang
Tgtd illustration
Tgtd illustration
Xu Wang
Metro Beijing
Metro Beijing
Xu Wang
Cloud Computing Seminar with BUPT WTI
Cloud Computing Seminar with BUPT WTI
Xu Wang
Hadoop development in China Mobile Research Institute
Hadoop development in China Mobile Research Institute
Xu Wang
More from Xu Wang
(10)
Re-Think of Virtualization and Containerization
Re-Think of Virtualization and Containerization
Hyper: 让Pod以VM为边界
Hyper: 让Pod以VM为边界
Hyper 基于hypervisor的docker引擎.pptx
Hyper 基于hypervisor的docker引擎.pptx
Rethink of PaaS
Rethink of PaaS
Cassandra Technical and history overview
Cassandra Technical and history overview
何时浮云散尽(在北邮北邮纪阳老师移动互联网课程上的讲义)
何时浮云散尽(在北邮北邮纪阳老师移动互联网课程上的讲义)
Tgtd illustration
Tgtd illustration
Metro Beijing
Metro Beijing
Cloud Computing Seminar with BUPT WTI
Cloud Computing Seminar with BUPT WTI
Hadoop development in China Mobile Research Institute
Hadoop development in China Mobile Research Institute
ZeroMQ简介
1.
ZeroMQ(ØMQ)简介 高效的并发、
步通信框架
2.
什么是 ØMQ •
ØMQ 看起来是一个网络库,实际是一个并发框架。 • 它提供的 Socket,支持在进程内、进程间、或通过TCP、组播传递,提供以一 条完整消息为单位的传输接口。 • 你可以用不同模式进行N:N的连接,这些模式包括fanout、pub-sub、任务分发 和请求响应。 • 它非常快,可以胜任构建集群产品的工作。 • 它的 步模型可以让你的应用 步处理消息,利用多处理器架构的并发能 力。 • 它提供了多 语言的API,并可以运行在大多数的操作系统上。 • ØMQ由iMatrix 发,并在LGPL许可下 源。 译自官方文档 zguide 的“ØMQ in a Hundred Words” http://zguide.zeromq.org/page:all#-MQ-in-a-Hundred-Words
3.
ZMQ 与 Thrift,
Protobuf • ZMQ 是底层传输库 • ZMQ 解决 1:N 乃至 N:N的高效通信 • ZMQ 支持 PUSH/PULL, PUB/SUB, REQ/REP 等模式 • ZMQ 不解决序列化问题 • Thrift 是序列化 + 跨语言通信库 • Thrift 支持跨语言的 杂数据结构的序列化与反序列化 • Thrift 的底层传输(Protocol)是可插拔的 • Thrift 的底层传输是以 RPC 的点到点通信为主的 • 有尝试在 Thrift 下面,用 ZMQ 作为传输 Protocol 的,但更多的用法是和 Protobuf 混用
4.
ZMQ 中的模式
类繁多的玩法
5.
简洁的代码(一) •
N:N PUSH/PULL 模 型,数据源 • 先初始化一个zmq socket • 用这个socket连接所有 worker • 生成任务、发送消息
6.
简洁的代码(二) •
N:N PUSH/PULL 模 型,接收端 • 初始化一个zmq socket • bind 从命令行得到的字 符串 • 接收消息,干活
7.
运行上述代码 •
编译 gcc -o zsource -lzmq p_source.c gcc -o zsink -lzmq p_sink.c • 启动接收进程 ./zsink tcp://*:5001 > log.1 & ./zsink tcp://*:5002 > log.2 & ./zsink tcp://*:5003 > log.3 & • 始发送 ./zsource 1 tcp://localhost:5001 tcp://localhost:5002 tcp://localhost:5003 & ./zsource 2 tcp://localhost:5001 tcp://localhost:5002 tcp://localhost:5003 & ./zsource 3 tcp://localhost:5001 tcp://localhost:5002 tcp://localhost:5003 & ./zsource 4 tcp://localhost:5001 tcp://localhost:5002 tcp://localhost:5003 &
8.
参考 • 官方文档(zguide): http://
zguide.zeromq.org/page:all • Github 仓库: https://github.com/zeromq/ zeromq2-x • 云风的介绍: http://blog.codingnow.com/ 2011/02/zeromq_message_patterns.html
9.
谢谢
Editor's Notes
\n
\n
\n
\n
\n
\n
\n
\n
\n
Download now