ZeroMQ - Pieter Hintjens

ZeroMQ

Pieter Hintjens

出版时间

2013-03-28

ISBN

9781449334062

评分

★★★★★
书籍介绍
Dive into ØMQ (aka ZeroMQ), the smart socket library that gives you fast, easy, message-based concurrency for your applications. With this quick-paced guide, you’ll learn hands-on how to use this scalable, lightweight, and highly flexible networking tool for exchanging messages among clusters, the cloud, and other multi-system environments. ØMQ maintainer Pieter Hintjens takes you on a tour of real-world applications, using extended examples in C to help you work with ØMQ’s API, sockets, and patterns. Learn how to use specific ØMQ programming techniques, build multithreaded applications, and create your own messaging architectures. You’ll discover how ØMQ works with several programming languages and most operating systems—with little or no cost. Learn ØMQ’s main patterns: request-reply, publish-subscribe, and pipeline Work with ØMQ sockets and patterns by building several small applications Explore advanced uses of ØMQ’s request-reply pattern through working examples Build reliable request-reply patterns that keep working when code or hardware fails Extend ØMQ’s core pub-sub patterns for performance, reliability, state distribution, and monitoring Learn techniques for building a distributed architecture with ØMQ Discover what’s required to build a general-purpose framework for distributed applications
AI导读
核心看点
  • 深入解析ZeroMQ核心API与消息模式
  • 掌握无状态并发编程与多线程最佳实践
  • 学习构建高可用、可扩展的消息架构
适合谁读
  • 希望深入理解消息队列底层原理的开发者
  • 从事分布式系统或网络编程的工程师
  • 使用C语言或需跨语言集成ZeroMQ的程序员
读前提醒
  • 中文版翻译质量参差不齐,建议参考英文原版
  • 重点阅读消息模式章节,代码示例以C为主
  • 无需逐字精读,结合官方文档与实战快速上手
读者共识
  • 内容权威且深入,是理解ZeroMQ原理的必读之作
  • 行文略显啰嗦,部分读者认为篇幅可大幅精简
  • 虽为C语言示例,但对理解底层机制极具价值

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "There are three main open source development patterns. The first is the large firm dumping code to break the market for others. This is the Apache Foundation model. The second is tiny teams or small firms building their dreams. This is the most common open source model, which can be very successful "
  • "If there's one lesson we've learned from 30+ years of concurrent programming, it is: just don't share state. You should follow some rules to write happy multithreaded code with ZeroMQ: - Isolate data privately within its thread and never share data in multiple threads. The only exception to this are"
  • "ZeroMQ uses native OS threads rather than virtual "green" threads. The advantage is that you don't need to learn any new threading API, and that ZeroMQ threads map cleanly to your operating system. You can use standard tools like Intel's ThreadChecker to see what your application is doing."
  • "Processes, we believe, should be as vulnerable as possible to internal errors, and as robust as possible against external attacks and errors. To give an analogy, a living cell will self-destruct if it detects a single internal error, yet it will resist attack from the outside by all means possible."
  • "We said that ØMQ does I/O in a background thread. One I/O thread (for all sockets) is sufficient for all but the most extreme applications. When you create a new context, it starts with one I/O thread. The general rule of thumb is to allow one I/O thread per gigabyte of data in or out per second. To"
  • "ZeroMQ's error handling philosophy is a mix of fail-fast and resilience. Processes, we believe, should be as vulnerable as possible to internal errors, and as robust as possible against external attacks and errors. To give an analogy, a living cell will self-destruct if it detects a single internal "
  • "You should think about using zero-copy in the specific case where you are sending large blocks of memory (thousands of bytes), at a high frequency. For short messages, or for lower message rates, using zero-copy will make your code messier and more complex with no measurable benefit. Like all optimi"
  • "ZeroMQ uses the concept of HWM (high-water mark) to define the capacity of its internal pipes. Each connection out of a socket or into a socket has its own pipe, and HWM for sending, and/or receiving, depending on the socket type. Some sockets (PUB, PUSH) only have send buffers. Some (SUB, PULL, REQ"
作者简介
Pieter Hintjens started his first business making video games 30 yearsago and has been building software products since then. Taking as hisprinciple, "the real physics of software is the physics of people", hefocuses now on building communities through "Social Architecture",writing, and helping others use ZeroMQ profitably. For two years he was president of the FFII, a large NGO fightingsoftware patents. He was CEO of Wikidot, founder of the EuropeanPatent Conference, and founder of the Digital Standards Organization. Pieter speaks English, French, Dutch, and bits and pieces of a dozenother languages. He plays with a West African drum group in Brusselsand is becoming a licensed NRA pistol instructor in Texas. Pieterlives with his beautiful wife and three lovely children in Brussels,Belgium and travels extensively.
用户评论
除了最后一章,其他的都看完了, 感觉ZeroMQ很强大。 本来打算在C++中用的,结果现在转做GO了, 现在没有迫切的使用需求了。
只读过一小部分,还是没吃透。效率足够高,工作中要用到
重读第二遍
这货真快
能砍一半
蛮厉害的
收藏